Logo Search packages:      
Sourcecode: freecad version File versions  Download package

MeshGui::ViewProviderMeshFaceSet Class Reference

#include <ViewProviderMeshFaceSet.h>

Inheritance diagram for MeshGui::ViewProviderMeshFaceSet:

MeshGui::ViewProviderMesh Gui::ViewProviderGeometryObject App::PropertyContainer Base::Persistence Base::BaseClass

List of all members.

Detailed Description

The ViewProviderMeshFaceSet class creates nodes for representing the mesh data structure. Depending on the size of the mesh it uses two ways to render it: For huge meshes it renders directly the data structure. Rendering directly the data structure has the advantage to save memory by not creating the according OpenInventor nodes which would more or less duplicate the memory for a mesh. Especially for huge with several hundred thousands or even millions of triangles the amount of saved memory is considerable. For all other meshes it uses the appropriate OpenInventor nodes. Although this needs more memory its usage is much more flexible. It offers several nice features like a smooth-shaded appearance of a mesh whereas the OpenInventor nodes are already capable to do everything automatically. or the usage with textures.

For more details

See also:
SoFCMeshNode and SoFCMeshFaceSet.
Werner Mayer

Definition at line 46 of file ViewProviderMeshFaceSet.h.

Public Member Functions

virtual App::PropertyaddDynamicProperty (const char *type, const char *name=0, const char *group=0, const char *doc=0, short attr=0, bool ro=false, bool hidden=false)
void attach (App::DocumentObject *pcFeat)
virtual void deselect (SoPath *)
SoSeparator * getAnnotation (void)
virtual SoSeparator * getBackRoot (void) const
virtual const char * getDefaultDisplayMode () const
 Get the default display mode.
virtual std::vector< std::string > getDisplayModes (void) const
 returns a list of all possible modes
virtual App::PropertygetDynamicPropertyByName (const char *name) const
virtual std::vector< std::string > getDynamicPropertyNames () const
virtual SoSeparator * getFrontRoot (void) const
SoFCSelection * getHighlightNode () const
virtual QIcon getIcon () const
virtual unsigned int getMemSize (void) const
virtual const char * getName (const Property *prop) const
 get the name of a property
App::DocumentObjectgetObject (void) const
 Get the object of this ViewProvider object.
std::vector< DocumentObject * > getOutList (void) const
 returns a list of objects this object is pointing to by Links
SoPickedPoint * getPickedPoint (const SbVec2s &pos, const View3DInventorViewer &viewer) const
SoPickedPointList getPickedPoints (const SbVec2s &pos, const View3DInventorViewer &viewer, bool pickAll=false) const
virtual PropertygetPropertyByName (const char *name) const
 find a property by its name
virtual const char * getPropertyDocumentation (const char *name) const
 get the Group of a named Property
virtual const char * getPropertyDocumentation (const Property *prop) const
 get the Group of a Property
virtual const char * getPropertyGroup (const char *name) const
 get the Group of a named Property
virtual const char * getPropertyGroup (const Property *prop) const
 get the Group of a Property
virtual void getPropertyList (std::vector< Property * > &List) const
 get all properties of the class (including properies of the parent)
virtual void getPropertyMap (std::map< std::string, Property * > &Map) const
 get all properties of the class (including properies of the parent)
virtual short getPropertyType (const char *name) const
 get the Type of a named Property
virtual short getPropertyType (const Property *prop) const
 get the Type of a Property
PyObject * getPyObject ()
 Get the python wrapper for that ViewProvider.
virtual SoSeparator * getRoot (void)
virtual void getTaskViewContent (std::vector< Gui::TaskView::TaskContent * > &) const
 Get a list of TaskBoxes associated with this object.
virtual Type getTypeId (void) const
std::vector< DocumentObject * > getWeakOutList (void) const
virtual void hide (void)
 Hide the object in the view.
bool isDerivedFrom (const Type type) const
virtual bool isHidden (const char *name) const
 check if the named property is hidden
virtual bool isHidden (const Property *prop) const
 check if the property is hidden
virtual bool isReadOnly (const char *name) const
 check if the nameed property is read-only
virtual bool isReadOnly (const Property *prop) const
 check if the property is read-only
bool isUpdatesEnabled () const
virtual bool keyPressed (int key)
 is called when the provider is in edit and a key event occurs. Only ESC ends edit.
virtual bool mouseButtonPressed (int Button, bool pressed, const SbVec3f &pos, const SbVec3f &norm, const SoPickedPoint *pp)
 is called when the Provider is in edit and the mouse is clicked
virtual bool mouseMove (const SbVec3f &pos, const SbVec3f &norm, const SoPickedPoint *pp)
 is called when the provider is in edit and the mouse is moved
virtual void Restore (Base::XMLReader &reader)
virtual void RestoreDocFile (Reader &)
virtual void Save (Base::Writer &writer) const
virtual void SaveDocFile (Writer &) const
virtual void select (SoPath *)
void setActiveMode ()
 Set the active mode, i.e. the first item of the 'Display' property.
virtual void setDisplayMode (const char *ModeName)
 Sets the correct display mode.
void setPropertyStatus (unsigned char bit, bool value)
 set the Status bit of all properties at once
virtual void setPyObject (PyObject *)
void setUpdatesEnabled (bool enable)
virtual void show (void)
 Show the object in the view.
std::string toString () const
void update (const App::Property *)
virtual void updateData (const App::Property *)
void updateView ()
 Run a redraw.

void addSelection (const std::vector< unsigned long > &)
void clearSelection ()
void deleteSelection ()
void deselectComponent (unsigned long facet)
void deselectFacet (unsigned long facet)
bool doubleClicked (void)
const char * getEditModeName (void)
 Returns the edit mode.
void getFacetsFromPolygon (const std::vector< SbVec2f > &picked, Gui::View3DInventorViewer &Viewer, SbBool inner, std::vector< unsigned long > &indices) const
void removeSelection (const std::vector< unsigned long > &)
void selectComponent (unsigned long facet)
void selectFacet (unsigned long facet)
bool setEdit (int ModNum=0)
 Sets the edit mode.
void setSelection (const std::vector< unsigned long > &)
void unsetEdit (void)
 Unsets the edit mode.
direct handling methods
This group of methods is to direct influence the appearance of the viewed content. It's only for fast interactions! If you want to set the visual parameters you have to do it on the object viewed by this provider!

SbMatrix convert (const Base::Matrix4D &rcMatrix) const
virtual void setTransformation (const SbMatrix &rcMatrix)
virtual void setTransformation (const Base::Matrix4D &rcMatrix)
 set the viewing transformation of the provider
Display mode methods
std::string getActiveDisplayMode (void) const
virtual bool isShow (void) const
 checks whether the view provider is visible or not
bool isVisible () const
void setVisible (bool)

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 eventCallback (void *ud, SoEventCallback *node)
static void faceInfoCallback (void *ud, SoEventCallback *n)
static void fillHoleCallback (void *ud, SoEventCallback *n)
static 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::PropertyBool BoundingBox
App::PropertyFloatConstraint CreaseAngle
App::PropertyEnumeration DisplayMode
App::PropertyEnumeration Lighting
App::PropertyColor LineColor
App::PropertyPercent LineTransparency
App::PropertyFloatConstraint LineWidth
App::PropertyBool OpenEdges
App::PropertyFloatConstraint PointSize
App::PropertyBool Selectable
App::PropertyColor ShapeColor
App::PropertyMaterial ShapeMaterial
App::PropertyPercent Transparency
App::PropertyBool Visibility
Signals of the view provider

boost::signal< void()> signalChangeIcon
 signal on icon change
boost::signal< void(const
QString &)> 
 signal on status tip change
boost::signal< void(const
QString &)> 
 signal on tooltip change

Protected Member Functions

SoFCSelectioncreateFromSettings () const
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)
SoSeparator * findFrontRootOfType (const SoType &type) const
SoPickedPoint * getPointOnRay (const SbVec3f &pos, const SbVec3f &dir, const View3DInventorViewer &viewer) const
 Helper method to get picked entities while editing.
virtual const PropertyData & getPropertyData (void) const
SoShape * getShapeNode () const
void highlightSelection ()
virtual void onBeforeChange (const Property *)
 get called before the value is changed
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)
void setOpenEdgeColorFrom (const App::Color &col)
void setSelectable (bool Selectable=true)
void showBoundingBox (bool)
void showOpenEdges (bool)
virtual void splitMesh (const MeshCore::MeshKernel &toolMesh, const Base::Vector3f &normal, SbBool inner)
void unhighlightSelection ()
Display mask modes
Mainly controls an SoSwitch node which selects the display mask modes. The number of display mask modes doesn't necessarily match with the number of display modes. E.g. various display modes like Gaussian curvature, mean curvature or gray values are displayed by one display mask mode that handles color values.

void addDisplayMaskMode (SoNode *node, const char *type)
 Adds a new display mask mode.
std::vector< std::string > getDisplayMaskModes () const
 Returns a list of added display mask modes.
void setDefaultMode (int)
void setDisplayMaskMode (const char *type)
 Activates the display mask mode type.

Static Protected Member Functions

static const PropertyData * getPropertyDataPtr (void)
static void initSubclass (Base::Type &toInit, const char *ClassName, const char *ParentName, Type::instantiationMethod method=0)

Protected Attributes

SoSeparator * pcAnnotation
 The root separator for annotations.
SoFCBoundingBox * pcBoundingBox
SoSwitch * pcBoundSwitch
SoFCSelection * pcHighlight
SoDrawStyle * pcLineStyle
SoMaterialBinding * pcMatBinding
SoSwitch * pcModeSwitch
 this is the mode switch, all the different viewing modes are collected here
SoSeparator * pcOpenEdge
SoDrawStyle * pcPointStyle
SoSeparator * pcRoot
 The root Separator of the ViewProvider.
SoMaterial * pcShapeMaterial
SoTransform * pcTransform
 this is transformation for the provider
SoMaterial * pLineColor
SoBaseColor * pOpenColor
SoShapeHints * pShapeHints
ViewProviderPy * pyViewObject
const char * sPixmap

Private Member Functions

 PROPERTY_HEADER (MeshGui::ViewProviderMeshFaceSet)

Private Attributes

bool directRendering
SoCoordinate3 * pcMeshCoord
SoIndexedFaceSet * pcMeshFaces
SoFCMeshObjectNode * pcMeshNode
unsigned long triangleCount


class Property

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

Generated by  Doxygen 1.6.0   Back to index