cherish
|
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>
Public Member Functions | |
BookmarkTool (const osg::Vec3d &eye, const osg::Vec3d ¢er, const osg::Vec3d &up) | |
void | setPose (const osg::Vec3d &eye, const osg::Vec3d ¢er, const osg::Vec3d &up) |
void | getPose (osg::Vec3d &eye, osg::Vec3d ¢er, osg::Vec3d &up) |
void | setColorDefault () |
void | setColorSelected () |
void | setVisibility (bool on) |
bool | getVisibility () const |
![]() | |
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 |
![]() | |
ProtectedGroup (const ProtectedGroup &group, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
Protected Member Functions | |
void | initializeSG () |
void | updatePosition () |
![]() | |
void | updateGeometry () |
void | updateGeometry (osg::Geometry *geom) |
Additional Inherited Members | |
![]() | |
osg::Switch * | m_switch |
osg::Geode * | m_geodeWire |
osg::Geometry * | m_geomWire |
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.
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:
eye | is the current view's eye parameter |
center | is the current view's center parameter |
up | is the current view's up parameter |
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.
|
virtual |
A method to obtain visibility of a bookmark tool.
Implements entity::ToolGlobal.
|
protectedvirtual |
A method that provide scene graph initialization.
Implements entity::ToolGlobal.
void entity::BookmarkTool::setColorDefault | ( | ) |
A method to set up the tool's color to default values.
void entity::BookmarkTool::setColorSelected | ( | ) |
A method to set up the tool's color to selected values.
void entity::BookmarkTool::setPose | ( | const osg::Vec3d & | eye, |
const osg::Vec3d & | center, | ||
const osg::Vec3d & | up | ||
) |
A method to edit the tool's position.
|
virtual |
A method to set visibility of a bookmark tool.
Implements entity::ToolGlobal.
|
protected |
A method that uses internal camer parameters (eye, center, up) and sets up the vertices position for the tool.