#include <ViewProvider.h>
Public Member Functions | |
virtual void | attach (App::DocumentObject *) |
Attaches the document object to this view provider. | |
virtual std::vector< std::string > | getDisplayModes (void) const |
returns a list of all possible modes | |
TopoDS_Shape | getShape (const SoPickedPoint *) const |
virtual Base::Type | getTypeId (void) const |
void | reload () |
Update the view representation. | |
virtual void | setDisplayMode (const char *ModeName) |
set the display mode | |
virtual void | updateData (const App::Property *) |
Gets called if some of the property hade bin changed. | |
ViewProviderPartBase () | |
constructor | |
virtual | ~ViewProviderPartBase () |
destructor | |
Static Public Member Functions | |
static void * | create (void) |
static Base::Type | getClassTypeId (void) |
static void | init (void) |
static void | shapeInfoCallback (void *ud, SoEventCallback *n) |
Public Attributes | |
App::PropertyBool | ControlPoints |
App::PropertyEnumeration | Lighting |
App::PropertyColor | LineColor |
App::PropertyMaterial | LineMaterial |
App::PropertyFloatConstraint | LineWidth |
App::PropertyColor | PointColor |
App::PropertyMaterial | PointMaterial |
App::PropertyFloatConstraint | PointSize |
Protected Member Functions | |
Standard_Boolean | computeEdges (SoGroup *root, const TopoDS_Shape &myShape) |
Standard_Boolean | computeFaces (SoGroup *root, const TopoDS_Shape &myShape, double defl) |
Standard_Boolean | computeVertices (SoGroup *root, const TopoDS_Shape &myShape) |
virtual const App::PropertyData & | getPropertyData (void) const |
bool | loadParameter () |
virtual void | onChanged (const App::Property *prop) |
get called by the container whenever a property has been changed | |
void | showControlPoints (bool, const App::Property *prop) |
void | showControlPointsOfEdge (const TopoDS_Edge &) |
void | showControlPointsOfFace (const TopoDS_Face &) |
void | showControlPointsOfWire (const TopoDS_Wire &) |
void | transferToArray (const TopoDS_Face &aFace, SbVec3f **vertices, SbVec3f **vertexnormals, int32_t **cons, int &nbNodesInFace, int &nbTriInFace) |
Static Protected Member Functions | |
static const App::PropertyData * | getPropertyDataPtr (void) |
Protected Attributes | |
SoGroup * | EdgeRoot |
SoGroup * | FaceRoot |
SoSwitch * | pcControlPoints |
SoMaterial * | pcLineMaterial |
SoDrawStyle * | pcLineStyle |
SoMaterial * | pcPointMaterial |
SoDrawStyle * | pcPointStyle |
SoShapeHints * | pShapeHints |
SoGroup * | VertexRoot |
Definition at line 64 of file Mod/Part/Gui/ViewProvider.h.
ViewProviderPartBase::ViewProviderPartBase | ( | ) |
constructor
Definition at line 143 of file Mod/Part/Gui/ViewProvider.cpp.
References ADD_PROPERTY, App::Material::ambientColor, ControlPoints, App::Material::diffuseColor, EdgeRoot, App::Material::emissiveColor, SketcherExample::f, FaceRoot, App::PropertyFloat::getValue(), Lighting, LineColor, LineMaterial, LineWidth, loadParameter(), pcLineMaterial, pcLineStyle, pcPointMaterial, pcPointStyle, PointColor, PointMaterial, PointSize, pShapeHints, App::PropertyFloatConstraint::setConstraints(), App::PropertyEnumeration::setEnums(), App::Material::shininess, App::Material::specularColor, Gui::ViewProvider::sPixmap, App::Property::touch(), App::Material::transparency, and VertexRoot.
ViewProviderPartBase::~ViewProviderPartBase | ( | ) | [virtual] |
destructor
Definition at line 197 of file Mod/Part/Gui/ViewProvider.cpp.
References EdgeRoot, FaceRoot, pcLineMaterial, pcLineStyle, pcPointMaterial, pcPointStyle, pShapeHints, and VertexRoot.
void ViewProviderPartBase::attach | ( | App::DocumentObject * | pcObject | ) | [virtual] |
Attaches the document object to this view provider.
Reimplemented from Gui::ViewProviderGeometryObject.
Definition at line 267 of file Mod/Part/Gui/ViewProvider.cpp.
References Gui::ViewProvider::addDisplayMaskMode(), EdgeRoot, FaceRoot, offset(), pShapeHints, and VertexRoot.
Standard_Boolean ViewProviderPartBase::computeEdges | ( | SoGroup * | root, | |
const TopoDS_Shape & | myShape | |||
) | [protected] |
Definition at line 478 of file Mod/Part/Gui/ViewProvider.cpp.
References Gui::ViewProviderGeometryObject::createFromSettings(), Gui::SoFCSelection::documentName, Gui::SoFCSelection::EMISSIVE_DIFFUSE, App::DocumentObject::getDocument(), App::Document::getName(), App::DocumentObject::getNameInDocument(), Handle(), Gui::SoFCSelection::objectName, pcLineMaterial, pcLineStyle, Gui::ViewProviderDocumentObject::pcObject, RobotExample::pos, Gui::SoFCSelection::style, and Gui::SoFCSelection::subElementName.
Referenced by updateData().
Standard_Boolean ViewProviderPartBase::computeFaces | ( | SoGroup * | root, | |
const TopoDS_Shape & | myShape, | |||
double | defl | |||
) | [protected] |
Definition at line 689 of file Mod/Part/Gui/ViewProvider.cpp.
References Gui::ViewProviderGeometryObject::createFromSettings(), Gui::SoFCSelection::documentName, Gui::SoFCSelection::EMISSIVE, App::DocumentObject::getDocument(), App::Document::getName(), App::DocumentObject::getNameInDocument(), Gui::SoFCSelection::objectName, Gui::ViewProviderDocumentObject::pcObject, Gui::ViewProviderGeometryObject::pcShapeMaterial, Gui::SoFCSelection::style, Gui::SoFCSelection::subElementName, and transferToArray().
Referenced by updateData().
Standard_Boolean ViewProviderPartBase::computeVertices | ( | SoGroup * | root, | |
const TopoDS_Shape & | myShape | |||
) | [protected] |
Definition at line 596 of file Mod/Part/Gui/ViewProvider.cpp.
References Gui::ViewProviderGeometryObject::createFromSettings(), Gui::SoFCSelection::documentName, Gui::SoFCSelection::EMISSIVE_DIFFUSE, App::DocumentObject::getDocument(), App::Document::getName(), App::DocumentObject::getNameInDocument(), Gui::SoFCSelection::objectName, Gui::ViewProviderDocumentObject::pcObject, pcPointMaterial, pcPointStyle, Gui::SoFCSelection::style, and Gui::SoFCSelection::subElementName.
Referenced by updateData().
void * PartGui::ViewProviderPartBase::create | ( | void | ) | [static] |
Reimplemented from Gui::ViewProviderGeometryObject.
Reimplemented in PartGui::ViewProviderEllipsoid.
Definition at line 134 of file Mod/Part/Gui/ViewProvider.cpp.
Base::Type PartGui::ViewProviderPartBase::getClassTypeId | ( | void | ) | [static] |
Reimplemented from Gui::ViewProviderGeometryObject.
Reimplemented in PartGui::ViewProviderEllipsoid.
Definition at line 134 of file Mod/Part/Gui/ViewProvider.cpp.
Referenced by shapeInfoCallback(), showControlPoints(), and updateData().
std::vector< std::string > ViewProviderPartBase::getDisplayModes | ( | void | ) | const [virtual] |
returns a list of all possible modes
Reimplemented from Gui::ViewProviderDocumentObject.
Definition at line 324 of file Mod/Part/Gui/ViewProvider.cpp.
const App::PropertyData & PartGui::ViewProviderPartBase::getPropertyData | ( | void | ) | const [protected, virtual] |
Reimplemented from Gui::ViewProviderGeometryObject.
Reimplemented in PartGui::ViewProviderEllipsoid.
Definition at line 134 of file Mod/Part/Gui/ViewProvider.cpp.
const App::PropertyData * PartGui::ViewProviderPartBase::getPropertyDataPtr | ( | void | ) | [static, protected] |
Reimplemented from Gui::ViewProviderGeometryObject.
Reimplemented in PartGui::ViewProviderEllipsoid.
Definition at line 134 of file Mod/Part/Gui/ViewProvider.cpp.
TopoDS_Shape ViewProviderPartBase::getShape | ( | const SoPickedPoint * | point | ) | const |
Definition at line 374 of file Mod/Part/Gui/ViewProvider.cpp.
Referenced by shapeInfoCallback().
Base::Type PartGui::ViewProviderPartBase::getTypeId | ( | void | ) | const [virtual] |
Reimplemented from Gui::ViewProviderGeometryObject.
Reimplemented in PartGui::ViewProviderEllipsoid.
Definition at line 134 of file Mod/Part/Gui/ViewProvider.cpp.
void PartGui::ViewProviderPartBase::init | ( | void | ) | [static] |
Reimplemented from Gui::ViewProviderGeometryObject.
Reimplemented in PartGui::ViewProviderEllipsoid.
Definition at line 134 of file Mod/Part/Gui/ViewProvider.cpp.
Referenced by initPartGui().
bool ViewProviderPartBase::loadParameter | ( | ) | [protected] |
Definition at line 386 of file Mod/Part/Gui/ViewProvider.cpp.
References App::GetApplication(), and App::Application::GetParameterGroupByPath().
Referenced by reload(), and ViewProviderPartBase().
void ViewProviderPartBase::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 209 of file Mod/Part/Gui/ViewProvider.cpp.
References App::Material::ambientColor, App::Color::b, ControlPoints, App::Material::diffuseColor, App::Material::emissiveColor, App::Color::g, App::PropertyContainer::getPropertyByName(), App::PropertyInteger::getValue(), App::PropertyBool::getValue(), App::PropertyMaterial::getValue(), App::PropertyColor::getValue(), App::PropertyFloat::getValue(), Lighting, LineColor, LineMaterial, LineWidth, pcLineMaterial, pcLineStyle, Gui::ViewProviderDocumentObject::pcObject, pcPointMaterial, pcPointStyle, PointColor, PointMaterial, PointSize, pShapeHints, App::Color::r, App::PropertyMaterial::setDiffuseColor(), App::PropertyColor::setValue(), App::Material::shininess, showControlPoints(), App::Material::specularColor, and App::Material::transparency.
void ViewProviderPartBase::reload | ( | ) |
Update the view representation.
Definition at line 411 of file Mod/Part/Gui/ViewProvider.cpp.
References App::PropertyContainer::getPropertyByName(), loadParameter(), Gui::ViewProviderDocumentObject::pcObject, and Gui::ViewProvider::update().
void ViewProviderPartBase::setDisplayMode | ( | const char * | ModeName | ) | [virtual] |
set the display mode
If you add new viewing modes in getDisplayModes() then you need to reimplement also seDisplaytMode() to handle these new modes by setting the appropriate display mode.
Reimplemented from Gui::ViewProvider.
Definition at line 310 of file Mod/Part/Gui/ViewProvider.cpp.
References Gui::ViewProvider::setDisplayMaskMode().
void ViewProviderPartBase::shapeInfoCallback | ( | void * | ud, | |
SoEventCallback * | n | |||
) | [static] |
Definition at line 338 of file Mod/Part/Gui/ViewProvider.cpp.
References Base::Console(), getClassTypeId(), getShape(), Gui::ViewProvider::getTypeId(), Gui::View3DInventorViewer::getViewProviderByPath(), Base::Type::isDerivedFrom(), Gui::View3DInventorViewer::removeEventCallback(), and Gui::View3DInventorViewer::setEditing().
void ViewProviderPartBase::showControlPoints | ( | bool | show, | |
const App::Property * | prop | |||
) | [protected] |
Definition at line 888 of file Mod/Part/Gui/ViewProvider.cpp.
References getClassTypeId(), App::Property::getTypeId(), pcControlPoints, Gui::ViewProvider::pcRoot, showControlPointsOfEdge(), showControlPointsOfFace(), and showControlPointsOfWire().
Referenced by onChanged(), and updateData().
void ViewProviderPartBase::showControlPointsOfEdge | ( | const TopoDS_Edge & | edge | ) | [protected] |
Definition at line 930 of file Mod/Part/Gui/ViewProvider.cpp.
References Handle(), k, PartGui::SoFCControlPoints::numPolesU, PartGui::SoFCControlPoints::numPolesV, draftTools::p, and pcControlPoints.
Referenced by showControlPoints().
void ViewProviderPartBase::showControlPointsOfFace | ( | const TopoDS_Face & | face | ) | [protected] |
Definition at line 1030 of file Mod/Part/Gui/ViewProvider.cpp.
References Handle(), k, PartGui::SoFCControlPoints::numPolesU, PartGui::SoFCControlPoints::numPolesV, and pcControlPoints.
Referenced by showControlPoints().
void ViewProviderPartBase::showControlPointsOfWire | ( | const TopoDS_Wire & | wire | ) | [protected] |
Definition at line 993 of file Mod/Part/Gui/ViewProvider.cpp.
References Sketcher::end, Handle(), and Sketcher::start.
Referenced by showControlPoints().
void ViewProviderPartBase::transferToArray | ( | const TopoDS_Face & | aFace, | |
SbVec3f ** | vertices, | |||
SbVec3f ** | vertexnormals, | |||
int32_t ** | cons, | |||
int & | nbNodesInFace, | |||
int & | nbTriInFace | |||
) | [protected] |
Definition at line 775 of file Mod/Part/Gui/ViewProvider.cpp.
References Handle(), and draftlibs::fcgeo::v1().
Referenced by computeFaces().
void ViewProviderPartBase::updateData | ( | const App::Property * | ) | [virtual] |
Gets called if some of the property hade bin changed.
Reimplemented from Gui::ViewProviderGeometryObject.
Reimplemented in PartGui::ViewProviderEllipsoid.
Definition at line 419 of file Mod/Part/Gui/ViewProvider.cpp.
References KDL::Add(), computeEdges(), computeFaces(), computeVertices(), App::Application::Config(), Base::Console(), ControlPoints, EdgeRoot, FaceRoot, getClassTypeId(), App::DocumentObject::getNameInDocument(), App::Property::getTypeId(), App::PropertyBool::getValue(), pcControlPoints, Gui::ViewProviderDocumentObject::pcObject, showControlPoints(), and VertexRoot.
Definition at line 81 of file Mod/Part/Gui/ViewProvider.h.
Referenced by onChanged(), updateData(), and ViewProviderPartBase().
SoGroup* PartGui::ViewProviderPartBase::EdgeRoot [protected] |
Definition at line 112 of file Mod/Part/Gui/ViewProvider.h.
Referenced by attach(), PartGui::ViewProviderEllipsoid::updateData(), updateData(), ViewProviderPartBase(), and ~ViewProviderPartBase().
SoGroup* PartGui::ViewProviderPartBase::FaceRoot [protected] |
Definition at line 113 of file Mod/Part/Gui/ViewProvider.h.
Referenced by attach(), PartGui::ViewProviderEllipsoid::updateData(), updateData(), ViewProviderPartBase(), and ~ViewProviderPartBase().
Definition at line 82 of file Mod/Part/Gui/ViewProvider.h.
Referenced by onChanged(), and ViewProviderPartBase().
Definition at line 77 of file Mod/Part/Gui/ViewProvider.h.
Referenced by onChanged(), and ViewProviderPartBase().
Definition at line 79 of file Mod/Part/Gui/ViewProvider.h.
Referenced by onChanged(), and ViewProviderPartBase().
Definition at line 75 of file Mod/Part/Gui/ViewProvider.h.
Referenced by onChanged(), and ViewProviderPartBase().
SoSwitch* PartGui::ViewProviderPartBase::pcControlPoints [protected] |
Definition at line 119 of file Mod/Part/Gui/ViewProvider.h.
Referenced by showControlPoints(), showControlPointsOfEdge(), showControlPointsOfFace(), and updateData().
SoMaterial* PartGui::ViewProviderPartBase::pcLineMaterial [protected] |
Definition at line 115 of file Mod/Part/Gui/ViewProvider.h.
Referenced by computeEdges(), onChanged(), ViewProviderPartBase(), and ~ViewProviderPartBase().
SoDrawStyle* PartGui::ViewProviderPartBase::pcLineStyle [protected] |
Definition at line 117 of file Mod/Part/Gui/ViewProvider.h.
Referenced by computeEdges(), onChanged(), ViewProviderPartBase(), and ~ViewProviderPartBase().
SoMaterial* PartGui::ViewProviderPartBase::pcPointMaterial [protected] |
Definition at line 116 of file Mod/Part/Gui/ViewProvider.h.
Referenced by computeVertices(), onChanged(), ViewProviderPartBase(), and ~ViewProviderPartBase().
SoDrawStyle* PartGui::ViewProviderPartBase::pcPointStyle [protected] |
Definition at line 118 of file Mod/Part/Gui/ViewProvider.h.
Referenced by computeVertices(), onChanged(), ViewProviderPartBase(), and ~ViewProviderPartBase().
Definition at line 78 of file Mod/Part/Gui/ViewProvider.h.
Referenced by onChanged(), and ViewProviderPartBase().
Definition at line 80 of file Mod/Part/Gui/ViewProvider.h.
Referenced by onChanged(), and ViewProviderPartBase().
Definition at line 76 of file Mod/Part/Gui/ViewProvider.h.
Referenced by onChanged(), and ViewProviderPartBase().
SoShapeHints* PartGui::ViewProviderPartBase::pShapeHints [protected] |
Definition at line 120 of file Mod/Part/Gui/ViewProvider.h.
Referenced by attach(), onChanged(), ViewProviderPartBase(), and ~ViewProviderPartBase().
SoGroup* PartGui::ViewProviderPartBase::VertexRoot [protected] |
Definition at line 114 of file Mod/Part/Gui/ViewProvider.h.
Referenced by attach(), PartGui::ViewProviderEllipsoid::updateData(), updateData(), ViewProviderPartBase(), and ~ViewProviderPartBase().