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

Tool to depict the saved position of a camera and its associated scene state. The BookmarkTool has the following scene graph structure: More...

#include <ToolGlobal.h>

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

Public Member Functions

 BookmarkTool (const osg::Vec3d &eye, const osg::Vec3d &center, const osg::Vec3d &up)
 
void setPose (const osg::Vec3d &eye, const osg::Vec3d &center, const osg::Vec3d &up)
 
void getPose (osg::Vec3d &eye, osg::Vec3d &center, osg::Vec3d &up)
 
void setColorDefault ()
 
void setColorSelected ()
 
void setVisibility (bool on)
 
bool getVisibility () const
 
- 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 ()
 
void updatePosition ()
 
- 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

Tool to depict the saved position of a camera and its associated scene state. The BookmarkTool has the following scene graph structure:

BookmarkTool -> Switch -> AutoTransform -> GeodeWire

The AutoTransform helps to make sure the bookmark's tool scale does not depend on the view point, i.e., the size remains constant disregard how far the current view is located. It is working in the same manner as the entity::AxisGlobalTool.

Constructor & Destructor Documentation

§ BookmarkTool()

entity::BookmarkTool::BookmarkTool ( const osg::Vec3d &  eye,
const osg::Vec3d &  center,
const osg::Vec3d &  up 
)

Default constructor. In order to initialize auto-transform, it is necessary to pass the current view camera position which has {eye, center, up} representation:

Parameters
eyeis the current view's eye parameter
centeris the current view's center parameter
upis the current view's up parameter

Member Function Documentation

§ getPose()

void entity::BookmarkTool::getPose ( osg::Vec3d &  eye,
osg::Vec3d &  center,
osg::Vec3d &  up 
)

A method to obtain the tool's eye, center and up vectors.

§ getVisibility()

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

A method to obtain visibility of a bookmark tool.

Implements entity::ToolGlobal.

§ initializeSG()

void entity::BookmarkTool::initializeSG ( )
protectedvirtual

A method that provide scene graph initialization.

Implements entity::ToolGlobal.

§ setColorDefault()

void entity::BookmarkTool::setColorDefault ( )

A method to set up the tool's color to default values.

§ setColorSelected()

void entity::BookmarkTool::setColorSelected ( )

A method to set up the tool's color to selected values.

§ setPose()

void entity::BookmarkTool::setPose ( const osg::Vec3d &  eye,
const osg::Vec3d &  center,
const osg::Vec3d &  up 
)

A method to edit the tool's position.

§ setVisibility()

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

A method to set visibility of a bookmark tool.

Implements entity::ToolGlobal.

§ updatePosition()

void entity::BookmarkTool::updatePosition ( )
protected

A method that uses internal camer parameters (eye, center, up) and sets up the vertices position for the tool.


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