cherish
Public Member Functions | Protected Member Functions | List of all members
entity::AxisGlobalTool Class Reference

A tool to depict position of global axis X, Y and Z. The tool has the following scene graph structure: More...

#include <ToolGlobal.h>

Inheritance diagram for entity::AxisGlobalTool:
entity::ToolGlobal osg::ProtectedGroup

Public Member Functions

 AxisGlobalTool ()
 
void setVisibility (bool on)
 
bool getVisibility () const
 
virtual void setColor (const osg::Vec4f c1, const osg::Vec4f c2, const osg::Vec4f c3)
 
- Public Member Functions inherited from entity::ToolGlobal
 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
 
osg::Geode * getGeodeWire () const
 
osg::Vec3f getCenterLocal () const
 
- Public Member Functions inherited from osg::ProtectedGroup
 ProtectedGroup (const ProtectedGroup &group, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 

Protected Member Functions

void initializeSG ()
 
- Protected Member Functions inherited from entity::ToolGlobal
void updateGeometry ()
 
void updateGeometry (osg::Geometry *geom)
 

Additional Inherited Members

- Protected Attributes inherited from entity::ToolGlobal
osg::Switch * m_switch
 
osg::Geode * m_geodeWire
 
osg::Geometry * m_geomWire
 

Detailed Description

A tool to depict position of global axis X, Y and Z. The tool has the following scene graph structure:

AxisGlobalTool -> Switch -> Camera -> AutoTransform -> GeodeWire

The AutoTransform is to assure the global axis tool size remains constand disregarding the current camera view. The Camera node is necessary in order to set the rendering order to post order, so that the axis tool is always rendered on the top of any other elements.

Constructor & Destructor Documentation

§ AxisGlobalTool()

entity::AxisGlobalTool::AxisGlobalTool ( )

Default contructor. All the default sizing is taken from Settings file.

Member Function Documentation

§ getVisibility()

bool entity::AxisGlobalTool::getVisibility ( ) const
virtual

A method to obtain tool's visibility.

Implements entity::ToolGlobal.

§ initializeSG()

void entity::AxisGlobalTool::initializeSG ( )
protectedvirtual

A method to initialize the scene graph as shown on the class description.

Implements entity::ToolGlobal.

§ setColor()

void entity::AxisGlobalTool::setColor ( const osg::Vec4f  c1,
const osg::Vec4f  c2,
const osg::Vec4f  c3 
)
virtual

A method to set color is re-defined since each axis has different color.

Parameters
c1is the color for axis X
c2is the color for axis Y
c3is the color for axis Z

§ setVisibility()

void entity::AxisGlobalTool::setVisibility ( bool  on)
virtual

A method to set tool's visibility.

Implements entity::ToolGlobal.


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