![]() |
VR-Forces 4.6 Class Documentation
|
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. More...

Public Member Functions | |
| DtDynamicTerrainSequenceNode () | |
| CTOR. | |
| DtDynamicTerrainSequenceNode (const DtDynamicTerrainSequenceNode &sequence, const osg::CopyOp ©op=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). | |
| DtDynamicTerrainSequenceNode (const osg::Sequence &sequence, const osg::CopyOp ©op=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 | ~DtDynamicTerrainSequenceNode () |
| DTOR. | |
| virtual void | reset (DynamicTerrain::NodePathHash hashIndex) |
| 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. | |
Public Member Functions inherited from makVrv::DtMultiReferencedNodeContainer< DtSequenceInstanceState > | |
| DtMultiReferencedNodeContainer () | |
| CTOR. | |
| DtMultiReferencedNodeContainer (const DtMultiReferencedNodeContainer &orig) | |
| Copy CTOR param[in] orig the DtMultiReferencedNodeContainer to copy. | |
| virtual | ~DtMultiReferencedNodeContainer () |
| DTOR. | |
| virtual DynamicTerrain::NodePathHash | addNodeInstance (const osg::NodePath &nodePath) |
| Add a reference to a node and return the hash for the passed in node path. | |
| virtual void | setDefaultState (const DtSequenceInstanceState &state) |
| Specify a default state used to initialize each node reference when added. | |
| virtual const DtSequenceInstanceState & | defaultState () const |
| Get the default state used for node references. | |
| virtual void | setState (DynamicTerrain::NodePathHash hashIndex, const DtSequenceInstanceState &state) |
| Set the state of a node reference. | |
| virtual void | setState (const DtSequenceInstanceState &state) |
| Set the state of all node references. | |
| virtual bool | getState (DynamicTerrain::NodePathHash hashIndex, DtSequenceInstanceState &state) |
| Get the state of node instance. | |
| virtual DynamicTerrain::NodePathHash | calcNodePathHashValue (const osg::NodePath &nodePath) |
| Calculate a node hash, checks all known depths that nodes werer added at. | |
| virtual void | forEachNodeReference (NodeReferenceFunction &perNodeFunction) |
| Execute a function on each node reference in the container. | |
Protected Member Functions | |
| virtual void | traverse (osg::NodeVisitor &nv) |
| Traverse this node. | |
| virtual void | collectState (DynamicTerrain::NodePathHash hashIndex) |
| Collect the animation state information from the underlying osg::sequence and store it. | |
| virtual void | instantiateState (DynamicTerrain::NodePathHash hashIndex) |
| 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. | |
Additional Inherited Members | |
Public Types inherited from makVrv::DtMultiReferencedNodeContainer< DtSequenceInstanceState > | |
| typedef boost::function< void(DynamicTerrain::NodePathHash)> | NodeReferenceFunction |
| Function type that runs on node reference. | |
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 |
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.
| 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.