VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions
makVrv::DtDynamicTerrainSequenceNode Class Reference

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.

Inheritance diagram for makVrv::DtDynamicTerrainSequenceNode:
Inheritance graph
[legend]

Public Member Functions

 DtDynamicTerrainSequenceNode ()
 
 DtDynamicTerrainSequenceNode (const DtDynamicTerrainSequenceNode &sequence, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 
 DtDynamicTerrainSequenceNode (const osg::Sequence &sequence, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 
virtual ~DtDynamicTerrainSequenceNode ()
 
virtual void reset (DynamicTerrain::NodePathHash hashIndex)
 
- Public Member Functions inherited from makVrv::DtMultiReferencedNodeContainer< DtSequenceInstanceState >
 DtMultiReferencedNodeContainer ()
 
 DtMultiReferencedNodeContainer (const DtMultiReferencedNodeContainer &orig)
 
virtual ~DtMultiReferencedNodeContainer ()
 
virtual
DynamicTerrain::NodePathHash 
addNodeInstance (const osg::NodePath &nodePath)
 
virtual void setDefaultState (const DtSequenceInstanceState &state)
 
virtual const
DtSequenceInstanceState
defaultState () const
 
virtual void setState (DynamicTerrain::NodePathHash hashIndex, const DtSequenceInstanceState &state)
 
virtual void setState (const DtSequenceInstanceState &state)
 
virtual bool getState (DynamicTerrain::NodePathHash hashIndex, DtSequenceInstanceState &state)
 
virtual
DynamicTerrain::NodePathHash 
calcNodePathHashValue (const osg::NodePath &nodePath)
 
virtual void forEachNodeReference (NodeReferenceFunction &perNodeFunction)
 

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 std::function< void(DynamicTerrain::NodePathHash)> NodeReferenceFunction
 
- Protected Types inherited from makVrv::DtMultiReferencedNodeContainer< DtSequenceInstanceState >
typedef std::unordered_map
< DynamicTerrain::NodePathHash,
DtSequenceInstanceState
NodeInstanceMap
 
- Protected Attributes inherited from makVrv::DtMultiReferencedNodeContainer< DtSequenceInstanceState >
NodeInstanceMap myNodeInstanceMap
 
std::set< intmyNodePathDepths
 
DtSequenceInstanceState myDefaultState
 
boost::mutex myMapMutex
 

Constructor & Destructor Documentation

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 makVrv::DtDynamicTerrainSequenceNode::~DtDynamicTerrainSequenceNode ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtDynamicTerrainSequenceNode::reset ( DynamicTerrain::NodePathHash  hashIndex)
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.

virtual void makVrv::DtDynamicTerrainSequenceNode::traverse ( osg::NodeVisitor &  nv)
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.

virtual void makVrv::DtDynamicTerrainSequenceNode::collectState ( DynamicTerrain::NodePathHash  hashIndex)
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.

virtual void makVrv::DtDynamicTerrainSequenceNode::instantiateState ( DynamicTerrain::NodePathHash  hashIndex)
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.


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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)