MeshGui::ViewProviderMesh Class Reference

The ViewProviderMesh class offers the visualization of the mesh data structure and many algorithms to work on or edit the mesh. More...

#include <ViewProvider.h>

Inheritance diagram for MeshGui::ViewProviderMesh:
Gui::ViewProviderGeometryObject Gui::ViewProviderDocumentObject Gui::ViewProvider App::PropertyContainer Base::Persistence Base::BaseClass MeshGui::ViewProviderIndexedFaceSet MeshGui::ViewProviderMeshFaceSet MeshGui::ViewProviderMeshObject MeshGui::ViewProviderMeshTransform MeshGui::ViewProviderMeshTransformDemolding

List of all members.

Public Member Functions

virtual void attach (App::DocumentObject *)
 Extracts the mesh data from the feature pcFeature and creates an Inventor node SoNode with these data.
virtual std::vector< std::string > getDisplayModes (void) const
 returns a list of all possible modes
virtual QIcon getIcon () const
 deliver the icon shown in the tree view
virtual Base::Type getTypeId (void) const
virtual void setDisplayMode (const char *ModeName)
 Sets the correct display mode.
 ViewProviderMesh ()
virtual ~ViewProviderMesh ()
Editing



void addSelection (const std::vector< unsigned long > &)
void clearSelection ()
void deleteSelection ()
void deselectComponent (unsigned long facet)
void deselectFacet (unsigned long facet)
bool doubleClicked (void)
 is called by the tree if the user double click on the object
void getFacetsFromPolygon (const std::vector< SbVec2f > &picked, Gui::View3DInventorViewer &Viewer, SbBool inner, std::vector< unsigned long > &indices) const
std::vector< unsigned long > getFacetsOfRegion (const SbViewportRegion &, const SbViewportRegion &, SoCamera *) const
std::vector< unsigned long > getVisibleFacets (const SbViewportRegion &, SoCamera *) const
std::vector< unsigned long > getVisibleFacetsAfterZoom (const SbBox2s &, const SbViewportRegion &, SoCamera *) const
void removeSelection (const std::vector< unsigned long > &)
void selectComponent (unsigned long facet)
void selectFacet (unsigned long facet)
void setSelection (const std::vector< unsigned long > &)

Static Public Member Functions

static void clipMeshCallback (void *ud, SoEventCallback *n)
static void * create (void)
static bool createToolMesh (const std::vector< SbVec2f > &rclPoly, const SbViewVolume &vol, const Base::Vector3f &rcNormal, std::vector< MeshCore::MeshGeomFacet > &)
 Creates a tool mesh from the previous picked polygon on the viewer.
static void faceInfoCallback (void *ud, SoEventCallback *n)
static void fillHoleCallback (void *ud, SoEventCallback *n)
static Base::Type getClassTypeId (void)
static void init (void)
static void markPartCallback (void *ud, SoEventCallback *n)
static void partMeshCallback (void *ud, SoEventCallback *n)
static void segmMeshCallback (void *ud, SoEventCallback *n)
static void selectGLCallback (void *ud, SoEventCallback *n)

Public Attributes

App::PropertyFloatConstraint CreaseAngle
App::PropertyEnumeration Lighting
App::PropertyColor LineColor
App::PropertyPercent LineTransparency
App::PropertyFloatConstraint LineWidth
App::PropertyBool OpenEdges
App::PropertyFloatConstraint PointSize

Protected Member Functions

virtual void cutMesh (const std::vector< SbVec2f > &picked, Gui::View3DInventorViewer &Viewer, SbBool inner)
virtual void faceInfo (unsigned long facet)
virtual void fillHole (unsigned long facet)
virtual SoNode * getCoordNode () const
virtual const App::PropertyDatagetPropertyData (void) const
virtual SoShape * getShapeNode () const
void highlightSelection ()
void onChanged (const App::Property *prop)
 get called by the container whenever a property has been changed
virtual void segmentMesh (const MeshCore::MeshKernel &toolMesh, const Base::Vector3f &normal, SbBool inner)
virtual void selectArea (short, short, short, short, const SbViewportRegion &, SoCamera *)
bool setEdit (int ModNum)
 Sets the edit mode.
void setOpenEdgeColorFrom (const App::Color &col)
virtual void showOpenEdges (bool)
virtual void splitMesh (const MeshCore::MeshKernel &toolMesh, const Base::Vector3f &normal, SbBool inner)
void unhighlightSelection ()
void unsetEdit (int ModNum)
 Unsets the edit mode.

Static Protected Member Functions

static const App::PropertyDatagetPropertyDataPtr (void)

Protected Attributes

SoDrawStyle * pcLineStyle
SoMaterialBinding * pcMatBinding
SoSeparator * pcOpenEdge
SoDrawStyle * pcPointStyle
SoMaterial * pLineColor
SoBaseColor * pOpenColor
SoShapeHints * pShapeHints

Detailed Description

The ViewProviderMesh class offers the visualization of the mesh data structure and many algorithms to work on or edit the mesh.

Author:
Werner Mayer

Definition at line 102 of file Mod/Mesh/Gui/ViewProvider.h.


Constructor & Destructor Documentation

ViewProviderMesh::ViewProviderMesh (  ) 
ViewProviderMesh::~ViewProviderMesh (  )  [virtual]

Member Function Documentation

void ViewProviderMesh::addSelection ( const std::vector< unsigned long > &  indices  ) 
void ViewProviderMesh::attach ( App::DocumentObject pcFeat  )  [virtual]
void ViewProviderMesh::clearSelection ( void   ) 
void ViewProviderMesh::clipMeshCallback ( void *  ud,
SoEventCallback *  n 
) [static]
void * MeshGui::ViewProviderMesh::create ( void   )  [static]
bool ViewProviderMesh::createToolMesh ( const std::vector< SbVec2f > &  rclPoly,
const SbViewVolume &  vol,
const Base::Vector3f rcNormal,
std::vector< MeshCore::MeshGeomFacet > &  aFaces 
) [static]
void ViewProviderMesh::cutMesh ( const std::vector< SbVec2f > &  picked,
Gui::View3DInventorViewer Viewer,
SbBool  inner 
) [protected, virtual]
void ViewProviderMesh::deleteSelection (  ) 
void ViewProviderMesh::deselectComponent ( unsigned long  facet  ) 
void ViewProviderMesh::deselectFacet ( unsigned long  facet  ) 
bool MeshGui::ViewProviderMesh::doubleClicked ( void   )  [inline, virtual]

is called by the tree if the user double click on the object

Reimplemented from Gui::ViewProviderGeometryObject.

Definition at line 128 of file Mod/Mesh/Gui/ViewProvider.h.

void ViewProviderMesh::faceInfo ( unsigned long  facet  )  [protected, virtual]
void ViewProviderMesh::faceInfoCallback ( void *  ud,
SoEventCallback *  n 
) [static]
void ViewProviderMesh::fillHole ( unsigned long  facet  )  [protected, virtual]
void ViewProviderMesh::fillHoleCallback ( void *  ud,
SoEventCallback *  n 
) [static]
Base::Type MeshGui::ViewProviderMesh::getClassTypeId ( void   )  [static]
SoNode * ViewProviderMesh::getCoordNode (  )  const [protected, virtual]
std::vector< std::string > ViewProviderMesh::getDisplayModes ( void   )  const [virtual]

returns a list of all possible modes

Reimplemented from Gui::ViewProviderDocumentObject.

Reimplemented in MeshGui::ViewProviderMeshTransform, and MeshGui::ViewProviderMeshTransformDemolding.

Definition at line 472 of file Mod/Mesh/Gui/ViewProvider.cpp.

void ViewProviderMesh::getFacetsFromPolygon ( const std::vector< SbVec2f > &  picked,
Gui::View3DInventorViewer Viewer,
SbBool  inner,
std::vector< unsigned long > &  indices 
) const
std::vector< unsigned long > ViewProviderMesh::getFacetsOfRegion ( const SbViewportRegion &  select,
const SbViewportRegion &  region,
SoCamera *  camera 
) const
QIcon ViewProviderMesh::getIcon ( void   )  const [virtual]

deliver the icon shown in the tree view

Reimplemented from Gui::ViewProvider.

Definition at line 425 of file Mod/Mesh/Gui/ViewProvider.cpp.

References Gui::BitmapFactory(), and px.

const App::PropertyData & MeshGui::ViewProviderMesh::getPropertyData ( void   )  const [protected, virtual]
const App::PropertyData * MeshGui::ViewProviderMesh::getPropertyDataPtr ( void   )  [static, protected]
SoShape * ViewProviderMesh::getShapeNode (  )  const [protected, virtual]
Base::Type MeshGui::ViewProviderMesh::getTypeId ( void   )  const [virtual]
std::vector< unsigned long > ViewProviderMesh::getVisibleFacets ( const SbViewportRegion &  vp,
SoCamera *  camera 
) const
std::vector< unsigned long > ViewProviderMesh::getVisibleFacetsAfterZoom ( const SbBox2s &  rect,
const SbViewportRegion &  vp,
SoCamera *  camera 
) const

Definition at line 919 of file Mod/Mesh/Gui/ViewProvider.cpp.

References getVisibleFacets().

void ViewProviderMesh::highlightSelection (  )  [protected]
void MeshGui::ViewProviderMesh::init ( void   )  [static]
void ViewProviderMesh::markPartCallback ( void *  ud,
SoEventCallback *  n 
) [static]
void ViewProviderMesh::onChanged ( const App::Property prop  )  [protected, virtual]
void ViewProviderMesh::partMeshCallback ( void *  ud,
SoEventCallback *  n 
) [static]
void ViewProviderMesh::removeSelection ( const std::vector< unsigned long > &  indices  ) 
void ViewProviderMesh::segmentMesh ( const MeshCore::MeshKernel toolMesh,
const Base::Vector3f normal,
SbBool  inner 
) [protected, virtual]
void ViewProviderMesh::segmMeshCallback ( void *  ud,
SoEventCallback *  n 
) [static]
void ViewProviderMesh::selectArea ( short  x,
short  y,
short  w,
short  h,
const SbViewportRegion &  region,
SoCamera *  camera 
) [protected, virtual]
void ViewProviderMesh::selectComponent ( unsigned long  facet  ) 
void ViewProviderMesh::selectFacet ( unsigned long  facet  ) 
void ViewProviderMesh::selectGLCallback ( void *  ud,
SoEventCallback *  n 
) [static]
void ViewProviderMesh::setDisplayMode ( const char *  ModeName  )  [virtual]

Sets the correct display mode.

Reimplemented from Gui::ViewProvider.

Reimplemented in MeshGui::ViewProviderMeshTransform, and MeshGui::ViewProviderMeshTransformDemolding.

Definition at line 458 of file Mod/Mesh/Gui/ViewProvider.cpp.

References Gui::ViewProvider::setDisplayMaskMode().

bool ViewProviderMesh::setEdit ( int  ModNum  )  [protected, virtual]

Sets the edit mode.

Reimplemented from Gui::ViewProviderGeometryObject.

Definition at line 485 of file Mod/Mesh/Gui/ViewProvider.cpp.

void ViewProviderMesh::setOpenEdgeColorFrom ( const App::Color col  )  [protected]

Definition at line 352 of file Mod/Mesh/Gui/ViewProvider.cpp.

References App::Color::b, FemExample::b, App::Color::g, pOpenColor, and App::Color::r.

Referenced by onChanged().

void ViewProviderMesh::setSelection ( const std::vector< unsigned long > &  indices  ) 
void ViewProviderMesh::showOpenEdges ( bool  show  )  [protected, virtual]
void ViewProviderMesh::splitMesh ( const MeshCore::MeshKernel toolMesh,
const Base::Vector3f normal,
SbBool  inner 
) [protected, virtual]
void ViewProviderMesh::unhighlightSelection (  )  [protected]
void ViewProviderMesh::unsetEdit ( int  ModNum  )  [protected, virtual]

Unsets the edit mode.

Reimplemented from Gui::ViewProviderGeometryObject.

Definition at line 492 of file Mod/Mesh/Gui/ViewProvider.cpp.


Member Data Documentation

Definition at line 117 of file Mod/Mesh/Gui/ViewProvider.h.

Referenced by onChanged().

Definition at line 111 of file Mod/Mesh/Gui/ViewProvider.h.

Referenced by onChanged().

Definition at line 112 of file Mod/Mesh/Gui/ViewProvider.h.

Referenced by onChanged().

SoDrawStyle* MeshGui::ViewProviderMesh::pcLineStyle [protected]
SoMaterialBinding* MeshGui::ViewProviderMesh::pcMatBinding [protected]
SoSeparator* MeshGui::ViewProviderMesh::pcOpenEdge [protected]
SoDrawStyle* MeshGui::ViewProviderMesh::pcPointStyle [protected]

Definition at line 186 of file Mod/Mesh/Gui/ViewProvider.h.

Referenced by attach(), onChanged(), and ~ViewProviderMesh().

SoMaterial* MeshGui::ViewProviderMesh::pLineColor [protected]

Definition at line 189 of file Mod/Mesh/Gui/ViewProvider.h.

Referenced by attach(), onChanged(), and ~ViewProviderMesh().

Definition at line 113 of file Mod/Mesh/Gui/ViewProvider.h.

Referenced by onChanged().

SoBaseColor* MeshGui::ViewProviderMesh::pOpenColor [protected]
SoShapeHints* MeshGui::ViewProviderMesh::pShapeHints [protected]

Definition at line 190 of file Mod/Mesh/Gui/ViewProvider.h.

Referenced by attach(), onChanged(), and ~ViewProviderMesh().


The documentation for this class was generated from the following files:

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