The ViewProviderPoints class creates a node representing the point data structure. More...
#include <ViewProvider.h>
Public Member Functions | |
virtual void | attach (App::DocumentObject *) |
Extracts the point 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) |
set the viewing mode | |
bool | setEdit (int ModNum) |
Sets the edit mnode. | |
void | unsetEdit (int ModNum) |
Unsets the edit mode. | |
virtual void | updateData (const App::Property *) |
Update the point representation. | |
ViewProviderPoints () | |
virtual | ~ViewProviderPoints () |
Static Public Member Functions | |
static void | clipPointsCallback (void *ud, SoEventCallback *n) |
static void * | create (void) |
static Base::Type | getClassTypeId (void) |
static void | init (void) |
Public Attributes | |
App::PropertyFloatConstraint | PointSize |
Protected Member Functions | |
virtual void | cut (const std::vector< SbVec2f > &picked, Gui::View3DInventorViewer &Viewer) |
virtual const App::PropertyData & | getPropertyData (void) const |
void | onChanged (const App::Property *prop) |
get called by the container whenever a property has been changed | |
void | setVertexColorMode (App::PropertyColorList *) |
void | setVertexGreyvalueMode (Points::PropertyGreyValueList *) |
void | setVertexNormalMode (Points::PropertyNormalList *) |
Static Protected Member Functions | |
static const App::PropertyData * | getPropertyDataPtr (void) |
Protected Attributes | |
SoMaterial * | pcColorMat |
SoPointSet * | pcPoints |
SoCoordinate3 * | pcPointsCoord |
SoNormal * | pcPointsNormal |
SoDrawStyle * | pcPointStyle |
The ViewProviderPoints class creates a node representing the point data structure.
Definition at line 71 of file Mod/Points/Gui/ViewProvider.h.
ViewProviderPoints::ViewProviderPoints | ( | ) |
Definition at line 70 of file Mod/Points/Gui/ViewProvider.cpp.
References ADD_PROPERTY, SketcherExample::f, App::PropertyFloat::getValue(), pcColorMat, pcPoints, pcPointsCoord, pcPointsNormal, pcPointStyle, PointSize, and App::PropertyFloatConstraint::setConstraints().
ViewProviderPoints::~ViewProviderPoints | ( | ) | [virtual] |
Definition at line 90 of file Mod/Points/Gui/ViewProvider.cpp.
References pcColorMat, pcPoints, pcPointsCoord, pcPointsNormal, and pcPointStyle.
void ViewProviderPoints::attach | ( | App::DocumentObject * | pcObj | ) | [virtual] |
Extracts the point data from the feature pcFeature and creates an Inventor node SoNode with these data.
Reimplemented from Gui::ViewProviderGeometryObject.
Definition at line 160 of file Mod/Points/Gui/ViewProvider.cpp.
References Gui::ViewProvider::addDisplayMaskMode(), pcColorMat, Gui::ViewProviderGeometryObject::pcHighlight, pcPoints, pcPointsCoord, pcPointsNormal, pcPointStyle, and Gui::ViewProviderGeometryObject::pcShapeMaterial.
void ViewProviderPoints::clipPointsCallback | ( | void * | ud, | |
SoEventCallback * | n | |||
) | [static] |
Definition at line 359 of file Mod/Points/Gui/ViewProvider.cpp.
References cut(), Gui::ViewProvider::finishEditing(), getClassTypeId(), Gui::ViewProvider::getEditingMode(), Gui::View3DInventorViewer::getGLPolygon(), Gui::View3DInventorViewer::getViewProvidersOfType(), Gui::View3DInventorViewer::removeEventCallback(), and Gui::View3DInventorViewer::setEditing().
Referenced by CmdPointsPolyCut::activated().
void * PointsGui::ViewProviderPoints::create | ( | void | ) | [static] |
Reimplemented from Gui::ViewProviderGeometryObject.
Definition at line 65 of file Mod/Points/Gui/ViewProvider.cpp.
void ViewProviderPoints::cut | ( | const std::vector< SbVec2f > & | picked, | |
Gui::View3DInventorViewer & | Viewer | |||
) | [protected, virtual] |
Definition at line 385 of file Mod/Points/Gui/ViewProvider.cpp.
References Base::Polygon2D::Add(), Points::PointKernel::begin(), Base::Polygon2D::Contains(), Points::PointKernel::end(), Points::PropertyPointKernel::getValue(), Gui::Application::Instance, Gui::ViewProviderDocumentObject::pcObject, Points::Feature::Points, App::DocumentObject::purgeTouched(), Points::PointKernel::push_back(), Points::PropertyPointKernel::setValue(), and Points::PointKernel::size().
Referenced by clipPointsCallback().
Base::Type PointsGui::ViewProviderPoints::getClassTypeId | ( | void | ) | [static] |
Reimplemented from Gui::ViewProviderGeometryObject.
Definition at line 65 of file Mod/Points/Gui/ViewProvider.cpp.
Referenced by clipPointsCallback(), initPointsGui(), and updateData().
std::vector< std::string > ViewProviderPoints::getDisplayModes | ( | void | ) | const [virtual] |
returns a list of all possible modes
Reimplemented from Gui::ViewProviderDocumentObject.
Definition at line 285 of file Mod/Points/Gui/ViewProvider.cpp.
References App::PropertyColorList::getClassTypeId(), Points::PropertyGreyValueList::getClassTypeId(), Points::PropertyNormalList::getClassTypeId(), App::PropertyContainer::getPropertyMap(), Gui::ViewProviderDocumentObject::pcObject, and RobotExample::t.
QIcon ViewProviderPoints::getIcon | ( | void | ) | const [virtual] |
deliver the icon shown in the tree view
Reimplemented from Gui::ViewProvider.
Definition at line 322 of file Mod/Points/Gui/ViewProvider.cpp.
References px.
const App::PropertyData & PointsGui::ViewProviderPoints::getPropertyData | ( | void | ) | const [protected, virtual] |
Reimplemented from Gui::ViewProviderGeometryObject.
Definition at line 65 of file Mod/Points/Gui/ViewProvider.cpp.
const App::PropertyData * PointsGui::ViewProviderPoints::getPropertyDataPtr | ( | void | ) | [static, protected] |
Reimplemented from Gui::ViewProviderGeometryObject.
Definition at line 65 of file Mod/Points/Gui/ViewProvider.cpp.
Base::Type PointsGui::ViewProviderPoints::getTypeId | ( | void | ) | const [virtual] |
Reimplemented from Gui::ViewProviderGeometryObject.
Definition at line 65 of file Mod/Points/Gui/ViewProvider.cpp.
void PointsGui::ViewProviderPoints::init | ( | void | ) | [static] |
Reimplemented from Gui::ViewProviderGeometryObject.
Definition at line 65 of file Mod/Points/Gui/ViewProvider.cpp.
Referenced by initPointsGui().
void ViewProviderPoints::onChanged | ( | const App::Property * | prop | ) | [protected, virtual] |
get called by the container whenever a property has been changed
Reimplemented from Gui::ViewProviderGeometryObject.
Definition at line 99 of file Mod/Points/Gui/ViewProvider.cpp.
References App::PropertyFloat::getValue(), pcPointStyle, and PointSize.
void ViewProviderPoints::setDisplayMode | ( | const char * | ModeName | ) | [virtual] |
set the viewing mode
Reimplemented from Gui::ViewProvider.
Definition at line 198 of file Mod/Points/Gui/ViewProvider.cpp.
References colors, Points::PropertyNormalList::getClassTypeId(), Points::PropertyGreyValueList::getClassTypeId(), App::PropertyColorList::getClassTypeId(), App::PropertyContainer::getPropertyMap(), App::PropertyVectorList::getSize(), App::PropertyFloatList::getSize(), App::PropertyColorList::getSize(), UnitParser::if(), Gui::ViewProviderDocumentObject::pcObject, pcPointsCoord, Gui::ViewProvider::setDisplayMaskMode(), setVertexColorMode(), setVertexGreyvalueMode(), setVertexNormalMode(), and RobotExample::t.
bool ViewProviderPoints::setEdit | ( | int | ModNum | ) | [virtual] |
Sets the edit mnode.
Reimplemented from Gui::ViewProviderGeometryObject.
Definition at line 350 of file Mod/Points/Gui/ViewProvider.cpp.
void ViewProviderPoints::setVertexColorMode | ( | App::PropertyColorList * | pcProperty | ) | [protected] |
Definition at line 109 of file Mod/Points/Gui/ViewProvider.cpp.
References App::PropertyColorList::getValues(), and pcColorMat.
Referenced by setDisplayMode().
void ViewProviderPoints::setVertexGreyvalueMode | ( | Points::PropertyGreyValueList * | pcProperty | ) | [protected] |
Definition at line 126 of file Mod/Points/Gui/ViewProvider.cpp.
References App::PropertyFloatList::getValues(), and pcColorMat.
Referenced by setDisplayMode().
void ViewProviderPoints::setVertexNormalMode | ( | Points::PropertyNormalList * | pcProperty | ) | [protected] |
Definition at line 143 of file Mod/Points/Gui/ViewProvider.cpp.
References App::PropertyVectorList::getValues(), and pcPointsNormal.
Referenced by setDisplayMode().
void ViewProviderPoints::unsetEdit | ( | int | ModNum | ) | [virtual] |
Unsets the edit mode.
Reimplemented from Gui::ViewProviderGeometryObject.
Definition at line 355 of file Mod/Points/Gui/ViewProvider.cpp.
void ViewProviderPoints::updateData | ( | const App::Property * | prop | ) | [virtual] |
Update the point representation.
Reimplemented from Gui::ViewProviderGeometryObject.
Definition at line 310 of file Mod/Points/Gui/ViewProvider.cpp.
References PointsGui::ViewProviderPointsBuilder::createPoints(), getClassTypeId(), App::Property::getTypeId(), pcPoints, pcPointsCoord, and Gui::ViewProviderDocumentObject::setActiveMode().
SoMaterial* PointsGui::ViewProviderPoints::pcColorMat [protected] |
Definition at line 112 of file Mod/Points/Gui/ViewProvider.h.
Referenced by attach(), setVertexColorMode(), setVertexGreyvalueMode(), ViewProviderPoints(), and ~ViewProviderPoints().
SoPointSet* PointsGui::ViewProviderPoints::pcPoints [protected] |
Definition at line 111 of file Mod/Points/Gui/ViewProvider.h.
Referenced by attach(), updateData(), ViewProviderPoints(), and ~ViewProviderPoints().
SoCoordinate3* PointsGui::ViewProviderPoints::pcPointsCoord [protected] |
Definition at line 110 of file Mod/Points/Gui/ViewProvider.h.
Referenced by attach(), setDisplayMode(), updateData(), ViewProviderPoints(), and ~ViewProviderPoints().
SoNormal* PointsGui::ViewProviderPoints::pcPointsNormal [protected] |
Definition at line 113 of file Mod/Points/Gui/ViewProvider.h.
Referenced by attach(), setVertexNormalMode(), ViewProviderPoints(), and ~ViewProviderPoints().
SoDrawStyle* PointsGui::ViewProviderPoints::pcPointStyle [protected] |
Definition at line 114 of file Mod/Points/Gui/ViewProvider.h.
Referenced by attach(), onChanged(), ViewProviderPoints(), and ~ViewProviderPoints().
Definition at line 79 of file Mod/Points/Gui/ViewProvider.h.
Referenced by onChanged(), and ViewProviderPoints().