osgEarth 2.1.1
|
Public Member Functions | |
ObjectLocatorNode () | |
ObjectLocatorNode (ObjectLocator *locator) | |
ObjectLocatorNode (const Map *map) | |
ObjectLocatorNode (const ObjectLocatorNode &rhs, const osg::CopyOp &=osg::CopyOp::SHALLOW_COPY) | |
META_Node (osgEarthUtil, ObjectLocatorNode) | |
void | setLocator (ObjectLocator *locator) |
ObjectLocator * | getLocator () |
const ObjectLocator * | getLocator () const |
virtual void | update () |
virtual void | traverse (osg::NodeVisitor &nv) |
Private Attributes | |
osg::ref_ptr< ObjectLocator > | _locator |
osgEarth::Revision | _matrixRevision |
A transform node that tracks the position/orientation information in an ObjectLocator.
Definition at line 152 of file ObjectLocator.
ObjectLocatorNode::ObjectLocatorNode | ( | ) |
Definition at line 229 of file ObjectLocator.cpp.
{ setNumChildrenRequiringUpdateTraversal( 1 ); }
ObjectLocatorNode::ObjectLocatorNode | ( | ObjectLocator * | locator | ) |
Definition at line 243 of file ObjectLocator.cpp.
: _matrixRevision( -1 ) { setNumChildrenRequiringUpdateTraversal( 1 ); setLocator( locator ); }
ObjectLocatorNode::ObjectLocatorNode | ( | const Map * | map | ) |
Definition at line 250 of file ObjectLocator.cpp.
: _matrixRevision( -1 ) { setNumChildrenRequiringUpdateTraversal( 1 ); setLocator( new ObjectLocator(map) ); }
ObjectLocatorNode::ObjectLocatorNode | ( | const ObjectLocatorNode & | rhs, |
const osg::CopyOp & | op = osg::CopyOp::SHALLOW_COPY |
||
) |
Definition at line 234 of file ObjectLocator.cpp.
: osg::MatrixTransform( rhs, op ), _matrixRevision( rhs._matrixRevision ), _locator( rhs._locator.get() ) { setNumChildrenRequiringUpdateTraversal( 1 ); setLocator( _locator.get() ); // to update the trav count }
ObjectLocator* osgEarth::Util::ObjectLocatorNode::getLocator | ( | ) | [inline] |
Definition at line 166 of file ObjectLocator.
{ return _locator.get(); }
const ObjectLocator* osgEarth::Util::ObjectLocatorNode::getLocator | ( | ) | const [inline] |
Definition at line 167 of file ObjectLocator.
{ return _locator.get(); }
osgEarth::Util::ObjectLocatorNode::META_Node | ( | osgEarthUtil | , |
ObjectLocatorNode | |||
) |
void ObjectLocatorNode::setLocator | ( | ObjectLocator * | locator | ) |
The locator creates the positioning matrix for the component.
Definition at line 258 of file ObjectLocator.cpp.
{ _locator = locator; _matrixRevision = -1; }
void ObjectLocatorNode::traverse | ( | osg::NodeVisitor & | nv | ) | [virtual] |
Definition at line 266 of file ObjectLocator.cpp.
{ if (nv.getVisitorType() == osg::NodeVisitor::UPDATE_VISITOR) { update(); } osg::MatrixTransform::traverse( nv ); }
void ObjectLocatorNode::update | ( | ) | [virtual] |
Synchronizes the transform matrix with the locator.
Definition at line 276 of file ObjectLocator.cpp.
{ if ( _locator.valid() && _locator->outOfSyncWith( _matrixRevision ) ) { osg::Matrix mat; if ( _locator->getLocatorMatrix( mat ) ) { this->setMatrix( mat ); this->dirtyBound(); _locator->sync( _matrixRevision ); } } }
osg::ref_ptr<ObjectLocator> osgEarth::Util::ObjectLocatorNode::_locator [private] |
Definition at line 176 of file ObjectLocator.
Definition at line 177 of file ObjectLocator.