Gui::ViewProviderGeometryObject Class Reference

The base class for all view providers that display geometric data, like mesh, point cloudes and shapes. More...

#include <ViewProviderGeometryObject.h>

Inheritance diagram for Gui::ViewProviderGeometryObject:
Gui::ViewProviderDocumentObject Gui::ViewProvider App::PropertyContainer Base::Persistence Base::BaseClass FemGui::ViewProviderFemMesh ImageGui::ViewProviderImagePlane MeshGui::ViewProviderMesh MeshGui::ViewProviderMeshNode PartGui::ViewProviderPartBase PartGui::ViewProviderPartExt PartGui::ViewProviderPartReference PointsGui::ViewProviderPoints RobotGui::ViewProviderRobotObject RobotGui::ViewProviderTrajectory

List of all members.

Public Member Functions

void attach (App::DocumentObject *pcObject)
 Attaches the document object to this view provider.
SoFCSelectiongetHighlightNode () const
SoPickedPoint * getPickedPoint (const SbVec2s &pos, const View3DInventorViewer &viewer) const
 This method is provided for convenience and does basically the same as getPickedPoints() unless that only the closest point to the camera will be picked.
SoPickedPointList getPickedPoints (const SbVec2s &pos, const View3DInventorViewer &viewer, bool pickAll=false) const
 Returns a list of picked points from the geometry under pcHighlight.
virtual Base::Type getTypeId (void) const
bool isSelectable (void) const
 indicates if the ViewProvider can be selected
void updateData (const App::Property *)
 Gets called if some of the property hade bin changed.
 ViewProviderGeometryObject ()
 constructor.
virtual ~ViewProviderGeometryObject ()
 destructor.

Static Public Member Functions

static void * create (void)
static Base::Type getClassTypeId (void)
static void init (void)

Public Attributes

App::PropertyBool BoundingBox
App::PropertyBool Selectable
App::PropertyColor ShapeColor
App::PropertyMaterial ShapeMaterial
App::PropertyPercent Transparency

Protected Member Functions

SoFCSelectioncreateFromSettings () const
virtual const App::PropertyDatagetPropertyData (void) const
void onChanged (const App::Property *prop)
 get called by the container whenever a property has been changed
void setSelectable (bool Selectable=true)
void showBoundingBox (bool)

Static Protected Member Functions

static const App::PropertyDatagetPropertyDataPtr (void)

Protected Attributes

SoFCBoundingBoxpcBoundingBox
SoSwitch * pcBoundSwitch
SoFCSelectionpcHighlight
SoMaterial * pcShapeMaterial

Edit methods



bool doubleClicked (void)
 is called by the tree if the user double click on the object
void setupContextMenu (QMenu *, QObject *, const char *)
 set up the context-menu with the supported edit modes
bool setEdit (int ModNum)
 is called by the document when the provider goes in edit mode
void setEditViewer (View3DInventorViewer *, int ModNum)
 adjust viewer settings when editing a view provider
void unsetEdit (int ModNum)
 is called when you loose the edit mode
void unsetEditViewer (View3DInventorViewer *)
 restores viewer settings when leaving editing mode

Detailed Description

The base class for all view providers that display geometric data, like mesh, point cloudes and shapes.

Author:
Werner Mayer

Definition at line 46 of file ViewProviderGeometryObject.h.


Constructor & Destructor Documentation

ViewProviderGeometryObject::ViewProviderGeometryObject (  ) 
ViewProviderGeometryObject::~ViewProviderGeometryObject (  )  [virtual]

destructor.

Definition at line 96 of file ViewProviderGeometryObject.cpp.

References pcBoundingBox, pcHighlight, and pcShapeMaterial.


Member Function Documentation

void ViewProviderGeometryObject::attach ( App::DocumentObject pcObject  )  [virtual]
void * Gui::ViewProviderGeometryObject::create ( void   )  [static]

Reimplemented from Gui::ViewProviderDocumentObject.

Reimplemented in FemGui::ViewProviderFemMesh, ImageGui::ViewProviderImagePlane, MeshGui::ViewProviderMesh, MeshGui::ViewProviderIndexedFaceSet, MeshGui::ViewProviderMeshObject, MeshGui::ViewProviderMeshFaceSet, MeshGui::ViewProviderMeshNode, MeshGui::ViewProviderMeshTransform, MeshGui::ViewProviderMeshTransformDemolding, PartGui::ViewProviderPartBase, PartGui::ViewProviderEllipsoid, PartGui::ViewProviderPart, PartGui::ViewProvider2DObject, PartGui::ViewProviderBoolean, PartGui::ViewProviderMultiFuse, PartGui::ViewProviderMultiCommon, PartGui::ViewProviderBox, PartGui::ViewProviderCurveNet, PartGui::ViewProviderPartExt, PartGui::ViewProviderExtrusion, PartGui::ViewProviderImport, PartGui::ViewProviderMirror, PartGui::ViewProviderFillet, PartGui::ViewProviderChamfer, PartGui::ViewProviderCustom, PartGui::ViewProviderPartReference, PartDesignGui::ViewProviderChamfer, PartDesignGui::ViewProvider, PartDesignGui::ViewProviderFillet, PartDesignGui::ViewProviderHole, PartDesignGui::ViewProviderMainPart, PartDesignGui::ViewProviderPad, PartDesignGui::ViewProviderPatternRectangular, PartDesignGui::ViewProviderPocket, PartDesignGui::ViewProviderRevolution, PointsGui::ViewProviderPoints, RobotGui::ViewProviderEdge2TracObject, RobotGui::ViewProviderRobotObject, RobotGui::ViewProviderTrajectory, RobotGui::ViewProviderTrajectoryCompound, RobotGui::ViewProviderTrajectoryDressUp, SketcherGui::ViewProviderCustom, and SketcherGui::ViewProviderSketch.

Definition at line 67 of file ViewProviderGeometryObject.cpp.

SoFCSelection * ViewProviderGeometryObject::createFromSettings (  )  const [protected]
bool ViewProviderGeometryObject::doubleClicked ( void   )  [virtual]
Base::Type Gui::ViewProviderGeometryObject::getClassTypeId ( void   )  [static]

Reimplemented from Gui::ViewProviderDocumentObject.

Reimplemented in FemGui::ViewProviderFemMesh, ImageGui::ViewProviderImagePlane, MeshGui::ViewProviderMesh, MeshGui::ViewProviderIndexedFaceSet, MeshGui::ViewProviderMeshObject, MeshGui::ViewProviderMeshFaceSet, MeshGui::ViewProviderMeshNode, MeshGui::ViewProviderMeshTransform, MeshGui::ViewProviderMeshTransformDemolding, PartGui::ViewProviderPartBase, PartGui::ViewProviderEllipsoid, PartGui::ViewProviderPart, PartGui::ViewProvider2DObject, PartGui::ViewProviderBoolean, PartGui::ViewProviderMultiFuse, PartGui::ViewProviderMultiCommon, PartGui::ViewProviderBox, PartGui::ViewProviderCurveNet, PartGui::ViewProviderPartExt, PartGui::ViewProviderExtrusion, PartGui::ViewProviderImport, PartGui::ViewProviderMirror, PartGui::ViewProviderFillet, PartGui::ViewProviderChamfer, PartGui::ViewProviderCustom, PartGui::ViewProviderPartReference, PartDesignGui::ViewProviderChamfer, PartDesignGui::ViewProvider, PartDesignGui::ViewProviderFillet, PartDesignGui::ViewProviderHole, PartDesignGui::ViewProviderMainPart, PartDesignGui::ViewProviderPad, PartDesignGui::ViewProviderPatternRectangular, PartDesignGui::ViewProviderPocket, PartDesignGui::ViewProviderRevolution, PointsGui::ViewProviderPoints, RobotGui::ViewProviderEdge2TracObject, RobotGui::ViewProviderRobotObject, RobotGui::ViewProviderTrajectory, RobotGui::ViewProviderTrajectoryCompound, RobotGui::ViewProviderTrajectoryDressUp, SketcherGui::ViewProviderCustom, and SketcherGui::ViewProviderSketch.

Definition at line 67 of file ViewProviderGeometryObject.cpp.

SoFCSelection* Gui::ViewProviderGeometryObject::getHighlightNode (  )  const [inline]
SoPickedPoint * ViewProviderGeometryObject::getPickedPoint ( const SbVec2s &  pos,
const View3DInventorViewer viewer 
) const

This method is provided for convenience and does basically the same as getPickedPoints() unless that only the closest point to the camera will be picked.

Note:
It is in the response of the client programmer to delete the returned SoPickedPoint object.

Definition at line 453 of file ViewProviderGeometryObject.cpp.

References pcHighlight.

SoPickedPointList ViewProviderGeometryObject::getPickedPoints ( const SbVec2s &  pos,
const View3DInventorViewer viewer,
bool  pickAll = false 
) const

Returns a list of picked points from the geometry under pcHighlight.

If pickAll is false (the default) only the intersection point closest to the camera will be picked, otherwise all intersection points will be picked.

Definition at line 435 of file ViewProviderGeometryObject.cpp.

References pcHighlight.

const App::PropertyData & Gui::ViewProviderGeometryObject::getPropertyData ( void   )  const [protected, virtual]

Reimplemented from Gui::ViewProviderDocumentObject.

Reimplemented in FemGui::ViewProviderFemMesh, ImageGui::ViewProviderImagePlane, MeshGui::ViewProviderMesh, MeshGui::ViewProviderIndexedFaceSet, MeshGui::ViewProviderMeshObject, MeshGui::ViewProviderMeshFaceSet, MeshGui::ViewProviderMeshNode, MeshGui::ViewProviderMeshTransform, MeshGui::ViewProviderMeshTransformDemolding, PartGui::ViewProviderPartBase, PartGui::ViewProviderEllipsoid, PartGui::ViewProviderPart, PartGui::ViewProvider2DObject, PartGui::ViewProviderBoolean, PartGui::ViewProviderMultiFuse, PartGui::ViewProviderMultiCommon, PartGui::ViewProviderBox, PartGui::ViewProviderCurveNet, PartGui::ViewProviderPartExt, PartGui::ViewProviderExtrusion, PartGui::ViewProviderImport, PartGui::ViewProviderMirror, PartGui::ViewProviderFillet, PartGui::ViewProviderChamfer, PartGui::ViewProviderCustom, PartGui::ViewProviderPartReference, PartDesignGui::ViewProviderChamfer, PartDesignGui::ViewProvider, PartDesignGui::ViewProviderFillet, PartDesignGui::ViewProviderHole, PartDesignGui::ViewProviderMainPart, PartDesignGui::ViewProviderPad, PartDesignGui::ViewProviderPatternRectangular, PartDesignGui::ViewProviderPocket, PartDesignGui::ViewProviderRevolution, PointsGui::ViewProviderPoints, RobotGui::ViewProviderEdge2TracObject, RobotGui::ViewProviderRobotObject, RobotGui::ViewProviderTrajectory, RobotGui::ViewProviderTrajectoryCompound, RobotGui::ViewProviderTrajectoryDressUp, SketcherGui::ViewProviderCustom, and SketcherGui::ViewProviderSketch.

Definition at line 67 of file ViewProviderGeometryObject.cpp.

const App::PropertyData * Gui::ViewProviderGeometryObject::getPropertyDataPtr ( void   )  [static, protected]

Reimplemented from Gui::ViewProviderDocumentObject.

Reimplemented in FemGui::ViewProviderFemMesh, ImageGui::ViewProviderImagePlane, MeshGui::ViewProviderMesh, MeshGui::ViewProviderIndexedFaceSet, MeshGui::ViewProviderMeshObject, MeshGui::ViewProviderMeshFaceSet, MeshGui::ViewProviderMeshNode, MeshGui::ViewProviderMeshTransform, MeshGui::ViewProviderMeshTransformDemolding, PartGui::ViewProviderPartBase, PartGui::ViewProviderEllipsoid, PartGui::ViewProviderPart, PartGui::ViewProvider2DObject, PartGui::ViewProviderBoolean, PartGui::ViewProviderMultiFuse, PartGui::ViewProviderMultiCommon, PartGui::ViewProviderBox, PartGui::ViewProviderCurveNet, PartGui::ViewProviderPartExt, PartGui::ViewProviderExtrusion, PartGui::ViewProviderImport, PartGui::ViewProviderMirror, PartGui::ViewProviderFillet, PartGui::ViewProviderChamfer, PartGui::ViewProviderCustom, PartGui::ViewProviderPartReference, PartDesignGui::ViewProviderChamfer, PartDesignGui::ViewProvider, PartDesignGui::ViewProviderFillet, PartDesignGui::ViewProviderHole, PartDesignGui::ViewProviderMainPart, PartDesignGui::ViewProviderPad, PartDesignGui::ViewProviderPatternRectangular, PartDesignGui::ViewProviderPocket, PartDesignGui::ViewProviderRevolution, PointsGui::ViewProviderPoints, RobotGui::ViewProviderEdge2TracObject, RobotGui::ViewProviderRobotObject, RobotGui::ViewProviderTrajectory, RobotGui::ViewProviderTrajectoryCompound, RobotGui::ViewProviderTrajectoryDressUp, SketcherGui::ViewProviderCustom, and SketcherGui::ViewProviderSketch.

Definition at line 67 of file ViewProviderGeometryObject.cpp.

Base::Type Gui::ViewProviderGeometryObject::getTypeId ( void   )  const [virtual]

Reimplemented from Gui::ViewProviderDocumentObject.

Reimplemented in FemGui::ViewProviderFemMesh, ImageGui::ViewProviderImagePlane, MeshGui::ViewProviderMesh, MeshGui::ViewProviderIndexedFaceSet, MeshGui::ViewProviderMeshObject, MeshGui::ViewProviderMeshFaceSet, MeshGui::ViewProviderMeshNode, MeshGui::ViewProviderMeshTransform, MeshGui::ViewProviderMeshTransformDemolding, PartGui::ViewProviderPartBase, PartGui::ViewProviderEllipsoid, PartGui::ViewProviderPart, PartGui::ViewProvider2DObject, PartGui::ViewProviderBoolean, PartGui::ViewProviderMultiFuse, PartGui::ViewProviderMultiCommon, PartGui::ViewProviderBox, PartGui::ViewProviderCurveNet, PartGui::ViewProviderPartExt, PartGui::ViewProviderExtrusion, PartGui::ViewProviderImport, PartGui::ViewProviderMirror, PartGui::ViewProviderFillet, PartGui::ViewProviderChamfer, PartGui::ViewProviderCustom, PartGui::ViewProviderPartReference, PartDesignGui::ViewProviderChamfer, PartDesignGui::ViewProvider, PartDesignGui::ViewProviderFillet, PartDesignGui::ViewProviderHole, PartDesignGui::ViewProviderMainPart, PartDesignGui::ViewProviderPad, PartDesignGui::ViewProviderPatternRectangular, PartDesignGui::ViewProviderPocket, PartDesignGui::ViewProviderRevolution, PointsGui::ViewProviderPoints, RobotGui::ViewProviderEdge2TracObject, RobotGui::ViewProviderRobotObject, RobotGui::ViewProviderTrajectory, RobotGui::ViewProviderTrajectoryCompound, RobotGui::ViewProviderTrajectoryDressUp, SketcherGui::ViewProviderCustom, and SketcherGui::ViewProviderSketch.

Definition at line 67 of file ViewProviderGeometryObject.cpp.

void Gui::ViewProviderGeometryObject::init ( void   )  [static]

Reimplemented from Gui::ViewProviderDocumentObject.

Reimplemented in FemGui::ViewProviderFemMesh, ImageGui::ViewProviderImagePlane, MeshGui::ViewProviderMesh, MeshGui::ViewProviderIndexedFaceSet, MeshGui::ViewProviderMeshObject, MeshGui::ViewProviderMeshFaceSet, MeshGui::ViewProviderMeshNode, MeshGui::ViewProviderMeshTransform, MeshGui::ViewProviderMeshTransformDemolding, PartGui::ViewProviderPartBase, PartGui::ViewProviderEllipsoid, PartGui::ViewProviderPart, PartGui::ViewProvider2DObject, PartGui::ViewProviderBoolean, PartGui::ViewProviderMultiFuse, PartGui::ViewProviderMultiCommon, PartGui::ViewProviderBox, PartGui::ViewProviderCurveNet, PartGui::ViewProviderPartExt, PartGui::ViewProviderExtrusion, PartGui::ViewProviderImport, PartGui::ViewProviderMirror, PartGui::ViewProviderFillet, PartGui::ViewProviderChamfer, PartGui::ViewProviderCustom, PartGui::ViewProviderPartReference, PartDesignGui::ViewProviderChamfer, PartDesignGui::ViewProvider, PartDesignGui::ViewProviderFillet, PartDesignGui::ViewProviderHole, PartDesignGui::ViewProviderMainPart, PartDesignGui::ViewProviderPad, PartDesignGui::ViewProviderPatternRectangular, PartDesignGui::ViewProviderPocket, PartDesignGui::ViewProviderRevolution, PointsGui::ViewProviderPoints, RobotGui::ViewProviderEdge2TracObject, RobotGui::ViewProviderRobotObject, RobotGui::ViewProviderTrajectory, RobotGui::ViewProviderTrajectoryCompound, RobotGui::ViewProviderTrajectoryDressUp, SketcherGui::ViewProviderCustom, and SketcherGui::ViewProviderSketch.

Definition at line 67 of file ViewProviderGeometryObject.cpp.

Referenced by Gui::Application::initTypes().

bool Gui::ViewProviderGeometryObject::isSelectable ( void   )  const [inline, virtual]

indicates if the ViewProvider can be selected

Reimplemented from Gui::ViewProvider.

Reimplemented in SketcherGui::ViewProviderSketch.

Definition at line 71 of file ViewProviderGeometryObject.h.

void ViewProviderGeometryObject::onChanged ( const App::Property prop  )  [protected, virtual]
bool ViewProviderGeometryObject::setEdit ( int  ModNum  )  [protected, virtual]
void ViewProviderGeometryObject::setEditViewer ( Gui::View3DInventorViewer ,
int  ModNum 
) [protected, virtual]

adjust viewer settings when editing a view provider

Reimplemented from Gui::ViewProvider.

Reimplemented in SketcherGui::ViewProviderSketch.

Definition at line 305 of file ViewProviderGeometryObject.cpp.

References Gui::ViewProvider::Transform.

void ViewProviderGeometryObject::setSelectable ( bool  Selectable = true  )  [protected]
void ViewProviderGeometryObject::setupContextMenu ( QMenu *  ,
QObject *  ,
const char *   
) [virtual]
void ViewProviderGeometryObject::showBoundingBox ( bool  show  )  [protected]
void ViewProviderGeometryObject::unsetEdit ( int  ModNum  )  [protected, virtual]
void ViewProviderGeometryObject::unsetEditViewer ( Gui::View3DInventorViewer  )  [protected, virtual]

restores viewer settings when leaving editing mode

Reimplemented from Gui::ViewProvider.

Reimplemented in SketcherGui::ViewProviderSketch.

Definition at line 313 of file ViewProviderGeometryObject.cpp.

References Gui::ViewProvider::getEditingMode(), and Gui::ViewProvider::Transform.

void ViewProviderGeometryObject::updateData ( const App::Property  )  [virtual]

Member Data Documentation

Definition at line 61 of file ViewProviderGeometryObject.h.

Referenced by onChanged(), and ViewProviderGeometryObject().

Definition at line 113 of file ViewProviderGeometryObject.h.

Referenced by showBoundingBox(), and updateData().

Definition at line 59 of file ViewProviderGeometryObject.h.

Referenced by onChanged(), and ViewProviderGeometryObject().


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

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