The ViewProviderMeshNode class creates a node representing the mesh data structure. More...
#include <ViewProviderMeshNode.h>
Public Member Functions | |
void | attach (App::DocumentObject *pcFeat) |
Attaches the document object to this view provider. | |
virtual std::vector< std::string > | getDisplayModes () const |
Return 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 display mode | |
virtual void | updateData (const App::Property *) |
Gets called if some of the property hade bin changed. | |
ViewProviderMeshNode () | |
virtual | ~ViewProviderMeshNode () |
Polygon picking | |
const char * | getEditModeName (void) |
Returns the edit mode. | |
bool | handleEvent (const SoEvent *const ev, Gui::View3DInventorViewer &Viewer) |
bool | setEdit (int ModNum=0) |
Sets the edit mnode. | |
void | unsetEdit (void) |
Unsets the edit mode. | |
Static Public Member Functions | |
static void * | create (void) |
static Base::Type | getClassTypeId (void) |
static void | init (void) |
Public Attributes | |
App::PropertyFloatConstraint | LineWidth |
App::PropertyBool | OpenEdges |
App::PropertyFloatConstraint | PointSize |
Protected Member Functions | |
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 | setOpenEdgeColorFrom (const App::Color &col) |
void | showOpenEdges (bool) |
Static Protected Member Functions | |
static const App::PropertyData * | getPropertyDataPtr (void) |
Protected Attributes | |
SoDrawStyle * | pcLineStyle |
SoSeparator * | pcOpenEdge |
SoDrawStyle * | pcPointStyle |
SoBaseColor * | pOpenColor |
The ViewProviderMeshNode class creates a node representing the mesh data structure.
Definition at line 45 of file ViewProviderMeshNode.h.
ViewProviderMeshNode::ViewProviderMeshNode | ( | ) |
Definition at line 77 of file ViewProviderMeshNode.cpp.
References ADD_PROPERTY, SketcherExample::f, Mesh::floatRange, Gui::WindowParameter::getDefaultParameter(), App::Color::getPackedValue(), and App::Color::setPackedValue().
ViewProviderMeshNode::~ViewProviderMeshNode | ( | ) | [virtual] |
Definition at line 111 of file ViewProviderMeshNode.cpp.
References pcLineStyle, pcPointStyle, and pOpenColor.
void ViewProviderMeshNode::attach | ( | App::DocumentObject * | pcObject | ) | [virtual] |
Attaches the document object to this view provider.
Reimplemented from Gui::ViewProviderGeometryObject.
Definition at line 145 of file ViewProviderMeshNode.cpp.
References Gui::ViewProvider::addDisplayMaskMode(), Gui::WindowParameter::getDefaultParameter(), Mesh::Feature::Mesh, Mesh2Shape::mesh, Gui::ViewProviderGeometryObject::pcHighlight, pcLineStyle, pcPointStyle, Gui::ViewProviderGeometryObject::pcShapeMaterial, and MeshGui::SoFCMeshNode::setMesh().
void * MeshGui::ViewProviderMeshNode::create | ( | void | ) | [static] |
Reimplemented from Gui::ViewProviderGeometryObject.
Definition at line 75 of file ViewProviderMeshNode.cpp.
Base::Type MeshGui::ViewProviderMeshNode::getClassTypeId | ( | void | ) | [static] |
Reimplemented from Gui::ViewProviderGeometryObject.
Definition at line 75 of file ViewProviderMeshNode.cpp.
std::vector< std::string > ViewProviderMeshNode::getDisplayModes | ( | void | ) | const [virtual] |
Return a list of all possible modes.
Reimplemented from Gui::ViewProviderDocumentObject.
Definition at line 246 of file ViewProviderMeshNode.cpp.
const char * ViewProviderMeshNode::getEditModeName | ( | void | ) |
Returns the edit mode.
Definition at line 271 of file ViewProviderMeshNode.cpp.
QIcon ViewProviderMeshNode::getIcon | ( | void | ) | const [virtual] |
deliver the icon shown in the tree view
Reimplemented from Gui::ViewProvider.
Definition at line 204 of file ViewProviderMeshNode.cpp.
References px.
const App::PropertyData & MeshGui::ViewProviderMeshNode::getPropertyData | ( | void | ) | const [protected, virtual] |
Reimplemented from Gui::ViewProviderGeometryObject.
Definition at line 75 of file ViewProviderMeshNode.cpp.
const App::PropertyData * MeshGui::ViewProviderMeshNode::getPropertyDataPtr | ( | void | ) | [static, protected] |
Reimplemented from Gui::ViewProviderGeometryObject.
Definition at line 75 of file ViewProviderMeshNode.cpp.
Base::Type MeshGui::ViewProviderMeshNode::getTypeId | ( | void | ) | const [virtual] |
Reimplemented from Gui::ViewProviderGeometryObject.
Definition at line 75 of file ViewProviderMeshNode.cpp.
bool ViewProviderMeshNode::handleEvent | ( | const SoEvent *const | ev, | |
Gui::View3DInventorViewer & | Viewer | |||
) |
Definition at line 276 of file ViewProviderMeshNode.cpp.
References FemExample::b, Base::Console(), MeshGui::ViewProviderMesh::createToolMesh(), Mesh::PropertyMeshKernel::deleteFacetIndices(), Gui::View3DInventorViewer::getNearPlane(), Mesh::PropertyMeshKernel::getValue(), Gui::ViewProviderDocumentObject::pcObject, and unsetEdit().
void MeshGui::ViewProviderMeshNode::init | ( | void | ) | [static] |
Reimplemented from Gui::ViewProviderGeometryObject.
Definition at line 75 of file ViewProviderMeshNode.cpp.
void ViewProviderMeshNode::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 118 of file ViewProviderMeshNode.cpp.
References App::PropertyMaterial::getValue(), App::PropertyColor::getValue(), App::PropertyBool::getValue(), App::PropertyFloat::getValue(), LineWidth, OpenEdges, pcLineStyle, pcPointStyle, PointSize, setOpenEdgeColorFrom(), Gui::ViewProviderGeometryObject::ShapeColor, Gui::ViewProviderGeometryObject::ShapeMaterial, and showOpenEdges().
void ViewProviderMeshNode::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 232 of file ViewProviderMeshNode.cpp.
References Gui::ViewProvider::setDisplayMaskMode().
bool ViewProviderMeshNode::setEdit | ( | int | ModNum = 0 |
) | [virtual] |
Sets the edit mnode.
Reimplemented from Gui::ViewProviderGeometryObject.
Definition at line 259 of file ViewProviderMeshNode.cpp.
void ViewProviderMeshNode::setOpenEdgeColorFrom | ( | const App::Color & | col | ) | [protected] |
Definition at line 137 of file ViewProviderMeshNode.cpp.
References App::Color::b, FemExample::b, App::Color::g, pOpenColor, and App::Color::r.
Referenced by onChanged().
void ViewProviderMeshNode::showOpenEdges | ( | bool | show | ) | [protected] |
Definition at line 326 of file ViewProviderMeshNode.cpp.
References MeshCore::MeshKernel::GetFacets(), MeshCore::MeshKernel::GetPoints(), Mesh::Feature::Mesh, Mesh2Shape::mesh, Gui::ViewProviderGeometryObject::pcHighlight, pcLineStyle, Gui::ViewProviderDocumentObject::pcObject, pcOpenEdge, pOpenColor, MeshGui::SoFCMeshOpenEdge::setMesh(), Base::Vector3< _Precision >::x, Base::Vector3< _Precision >::y, and Base::Vector3< _Precision >::z.
Referenced by onChanged().
void ViewProviderMeshNode::unsetEdit | ( | void | ) |
Unsets the edit mode.
Definition at line 266 of file ViewProviderMeshNode.cpp.
Referenced by handleEvent().
void ViewProviderMeshNode::updateData | ( | const App::Property * | ) | [virtual] |
Gets called if some of the property hade bin changed.
Reimplemented from Gui::ViewProviderGeometryObject.
Definition at line 198 of file ViewProviderMeshNode.cpp.
References Gui::ViewProviderGeometryObject::pcHighlight.
Definition at line 54 of file ViewProviderMeshNode.h.
Referenced by onChanged().
Definition at line 56 of file ViewProviderMeshNode.h.
Referenced by onChanged().
SoDrawStyle* MeshGui::ViewProviderMeshNode::pcLineStyle [protected] |
Definition at line 82 of file ViewProviderMeshNode.h.
Referenced by attach(), onChanged(), showOpenEdges(), and ~ViewProviderMeshNode().
SoSeparator* MeshGui::ViewProviderMeshNode::pcOpenEdge [protected] |
Definition at line 84 of file ViewProviderMeshNode.h.
Referenced by showOpenEdges().
SoDrawStyle* MeshGui::ViewProviderMeshNode::pcPointStyle [protected] |
Definition at line 83 of file ViewProviderMeshNode.h.
Referenced by attach(), onChanged(), and ~ViewProviderMeshNode().
Definition at line 55 of file ViewProviderMeshNode.h.
Referenced by onChanged().
SoBaseColor* MeshGui::ViewProviderMeshNode::pOpenColor [protected] |
Definition at line 85 of file ViewProviderMeshNode.h.
Referenced by setOpenEdgeColorFrom(), showOpenEdges(), and ~ViewProviderMeshNode().