![]() |
VR-Forces 5.0.2 Developer's Guide
|
DtDynamicTerrainSequenceNode replaces an osg::Sequence in a terrain patch (or page) that is tagged with a WRM ' animation' comment if that patch/page is parsed by the dynamic terrain parser. It supports multiple references to itself by extending DtMultiReferencedNodeContainer, with DtSequenceInstanceState as its template parameter. During a traversal of this node, a node path hash is requested and used to look up the state of the sequence for that particular reference. The osg::Sequence has its state set according to the current reference; it is 'accept'ed; and then any changed state is retrieved and stored for the next time this reference is visited.

Protected Member Functions | |
| virtual void | traverse (osg::NodeVisitor &nv) |
| virtual void | collectState (DynamicTerrain::NodePathHash hashIndex) |
| virtual void | instantiateState (DynamicTerrain::NodePathHash hashIndex) |
Additional Inherited Members | |
Public Types inherited from makVrv::DtMultiReferencedNodeContainer< DtSequenceInstanceState > | |
| typedef boost::function< void(DynamicTerrain::NodePathHash)> | NodeReferenceFunction |
Protected Types inherited from makVrv::DtMultiReferencedNodeContainer< DtSequenceInstanceState > | |
| typedef boost::unordered_map < DynamicTerrain::NodePathHash, DtSequenceInstanceState > | NodeInstanceMap |
Protected Attributes inherited from makVrv::DtMultiReferencedNodeContainer< DtSequenceInstanceState > | |
| NodeInstanceMap | myNodeInstanceMap |
| std::set< int > | myNodePathDepths |
| DtSequenceInstanceState | myDefaultState |
| boost::mutex | myMapMutex |
| makVrv::DtDynamicTerrainSequenceNode::DtDynamicTerrainSequenceNode | ( | ) |
CTOR.
| makVrv::DtDynamicTerrainSequenceNode::DtDynamicTerrainSequenceNode | ( | const DtDynamicTerrainSequenceNode & | sequence, |
| const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY |
||
| ) |
Copy CTOR param[in] sequence the DtDynamicTerrainSequenceNode to copy param[in] copyop what type of copy should be used for the underlying osg::Sequence (ignored for members of this derived class). Defaults to SHALLOW_COPY.
| makVrv::DtDynamicTerrainSequenceNode::DtDynamicTerrainSequenceNode | ( | const osg::Sequence & | sequence, |
| const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY |
||
| ) |
Construct from an osg::Sequence param[in] sequence the osg::Sequence to copy from param[in] copyop the type of copy to use; defaults to SHALLOW_COPY.
|
virtual |
DTOR.
|
virtual |
Set the state of the sequence to START and reset all internal state accordingly param[in] hashIndex the node path hash for the reference to reset.
|
protectedvirtual |
Traverse this node. The path that the node visitor used to traverse to this node is used the calculate a node path hash, which in turn is used to find the state of the reference to this node, which is set for all internal osg::Sequence variables. The sequence is then 'accept'ed. Any changed state is then retrieved and store for the next visit to this reference param[in] nv the node visitor performing the traversal.
|
protectedvirtual |
Collect the animation state information from the underlying osg::sequence and store it. param[in] hashIndex the node path hash for the reference to associate the collected state with.
|
protectedvirtual |
Look up the state for a sequence reference and set the osg::Sequence internal variables to that state param[in] hashIndex the node path hash for the reference to instantiate.