ViewProviderTransformDemolding.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (c) 2004 Werner Mayer <wmayer[at]users.sourceforge.net>     *
00003  *                                                                         *
00004  *   This file is part of the FreeCAD CAx development system.              *
00005  *                                                                         *
00006  *   This library is free software; you can redistribute it and/or         *
00007  *   modify it under the terms of the GNU Library General Public           *
00008  *   License as published by the Free Software Foundation; either          *
00009  *   version 2 of the License, or (at your option) any later version.      *
00010  *                                                                         *
00011  *   This library  is distributed in the hope that it will be useful,      *
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00014  *   GNU Library General Public License for more details.                  *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU Library General Public     *
00017  *   License along with this library; see the file COPYING.LIB. If not,    *
00018  *   write to the Free Software Foundation, Inc., 59 Temple Place,         *
00019  *   Suite 330, Boston, MA  02111-1307, USA                                *
00020  *                                                                         *
00021  ***************************************************************************/
00022 
00023 #ifndef MESGUI_VIEWPROVIDERMESHTRANSFORMDEMOLDING_H
00024 #define MESGUI_VIEWPROVIDERMESHTRANSFORMDEMOLDING_H
00025 
00026 #include <Inventor/nodes/SoRotation.h>
00027 
00028 class SoSeparator;
00029 class SbVec3f;
00030 class SoSwitch;
00031 class SoCoordinate3;
00032 class SoDragger;
00033 class SoNormal;
00034 class SoIndexedFaceSet;
00035 class SoFaceSet;
00036 class SoPath;
00037 class SoLocateHighlight;
00038 class SoTrackballDragger;
00039 class SoTransformerManip;
00040 
00041 namespace Gui {
00042   class View3DInventorViewer;
00043 }
00044 
00045 
00046 #include "ViewProvider.h"
00047 #include <Base/Vector3D.h>
00048 
00049 namespace MeshGui {
00050 
00053 class ViewProviderMeshTransformDemolding : public ViewProviderMesh
00054 {
00055   PROPERTY_HEADER(MeshGui::ViewProviderMeshTransformDemolding);
00056 
00057 public:
00058   ViewProviderMeshTransformDemolding();
00059   virtual ~ViewProviderMeshTransformDemolding();
00060 
00061 
00066   virtual void attach(App::DocumentObject *);
00067 
00069   virtual void setDisplayMode(const char* ModeName);
00071   virtual const char* getDefaultDisplayMode() const;
00073   virtual std::vector<std::string> getDisplayModes(void) const;
00074 
00075 protected:
00076   void calcMaterialIndex(const SbRotation &rot);
00077   void calcNormalVector(void);
00078 
00079   static void sValueChangedCallback(void *, SoDragger *);
00080   void valueChangedCallback(void);
00081 
00082   static void sDragEndCallback(void *, SoDragger *);
00083   void DragEndCallback(void);
00084 
00085   SoTrackballDragger *pcTrackballDragger;
00086   SoTransform        *pcTransformDrag;
00087   SoMaterial         *pcColorMat;
00088   std::vector<SbVec3f> normalVector;
00089   Base::Vector3f            center;
00090 
00091 };
00092 
00093 } // namespace MeshGui
00094 
00095 
00096 #endif // MESGUI_VIEWPROVIDERMESHTRANSFORMDEMOLDING_H
00097 

Generated on Wed Nov 23 19:01:01 2011 for FreeCAD by  doxygen 1.6.1