|
cherish
|
An abstract class that denotes tool functionality and scene graph. The base tool entity has a starter scene graph structure, however, it is assumed that inherited class will redefine and fill the gaps within that structure. The base structure is as follows: More...
#include <ToolGlobal.h>
Public Member Functions | |
| ToolGlobal (int nVerts, osg::Array::Binding colorBind, osg::PrimitiveSet *primitiveSet, float linewidth=3.f) | |
| virtual void | setVertices (const std::vector< osg::Vec3f > &source) |
| virtual const osg::Vec3Array * | getVertices () const |
| virtual void | setColor (const osg::Vec4f &color) |
| virtual const osg::Vec4f & | getColor () const |
| virtual void | setVisibility (bool on)=0 |
| virtual bool | getVisibility () const =0 |
| osg::Geode * | getGeodeWire () const |
| osg::Vec3f | getCenterLocal () const |
Public Member Functions inherited from osg::ProtectedGroup | |
| ProtectedGroup (const ProtectedGroup &group, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
Protected Member Functions | |
| virtual void | initializeSG ()=0 |
| void | updateGeometry () |
| void | updateGeometry (osg::Geometry *geom) |
Protected Attributes | |
| osg::Switch * | m_switch |
| osg::Geode * | m_geodeWire |
| osg::Geometry * | m_geomWire |
An abstract class that denotes tool functionality and scene graph. The base tool entity has a starter scene graph structure, however, it is assumed that inherited class will redefine and fill the gaps within that structure. The base structure is as follows:
ToolGlobal -> Switch -> ... WireGeode
While the wire geode is initialized, it is not a part of the scene graph yet. The inhereted class are assumed to connect the dots between the switch and the wire geode.
| entity::ToolGlobal::ToolGlobal | ( | int | nVerts, |
| osg::Array::Binding | colorBind, | ||
| osg::PrimitiveSet * | primitiveSet, | ||
| float | linewidth = 3.f |
||
| ) |
Default constructor.
| nVerts | is the number of vertices that basic geometry will have |
| colorBind | indicates whether the color bind is per vertex, or overall |
| primitiveSet | is the type of geometry used, e.g., polilyne |
| linewidth | is not mandatary, but indicates the line width of a geometry. It is set to 3.f by default. |
| osg::Vec3f entity::ToolGlobal::getCenterLocal | ( | ) | const |
A method to obtain local 2D center of the wire geometry. It is assumed to be used within entity::Canvas tool mainly.
|
virtual |
A method to obtain a color of the wire geometry.
| osg::Geode * entity::ToolGlobal::getGeodeWire | ( | ) | const |
A method to obtain a pointer on wire geode.
|
virtual |
A getter method to obtain a pointer on vertex array of a wire geode.
|
pure virtual |
A method to obtain visibility of the whole tool.
Implemented in entity::FrameTool, entity::AxisGlobalTool, and entity::BookmarkTool.
|
protectedpure virtual |
A method that assures full initialization of a scene graph, i.e., provide a filling structure between a switch and a wire geode variables. Must be re-defined in inhereted classes.
Implemented in entity::FrameTool, entity::AxisGlobalTool, and entity::BookmarkTool.
|
virtual |
A method to set a specify color to a wire geometry.
|
virtual |
A setter method to set vertex array of wire geode.
|
pure virtual |
A method to set visibility of the whole tool.
Implemented in entity::FrameTool, entity::AxisGlobalTool, and entity::BookmarkTool.
|
protected |
contains all the geometry and color properties
|
protected |
is contained in m_geodeWire and contains all the geometries
|
protected |
switch is responsible for visibility of the tool
1.8.12