VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Private Member Functions
makVrv::DtIndirectSwitchManager Class Reference

handles the switches for all the indirect geometry. More...

Classes

struct  IndirectSwitchInfo
 structure for holding the information about a particular instance of a particular switch. More...
 

Public Types

typedef osg::observer_ptr
< osg::Node > 
NodeObserverPtr
 
typedef std::pair
< NodeObserverPtr,
IndirectSwitchInfo
NodeSwitchInfoPair
 
typedef std::deque
< NodeSwitchInfoPair
DequeNodeSwitchInfoPairs
 
typedef std::vector
< DequeNodeSwitchInfoPairs
DequeNodeSwitchInfoPairsArray
 
typedef std::map
< NodeObserverPtr, std::vector
< IndirectSwitchInfo > > 
SwitchInfoMap
 

Public Member Functions

 DtIndirectSwitchManager (DtDe &de, DtInstanceContainer &container)
 CTOR. More...
 
virtual ~DtIndirectSwitchManager ()
 DTOR. More...
 
virtual void addSwitchPaths (DtInstanceContainer &instances, int perGeomInstanceIndex, int size, const DequeNodeSwitchInfoPairs &parentSwitchPaths, const DequeNodeSwitchInfoPairsArray &switchPaths, const osg::NodePath &parentNodePath)
 Add a list of switch paths to the switch manager. Once added they are connected to the signal so changes can be passed down to the indirect buffer. More...
 
virtual void addSwitchPath (DtInstanceContainer &instances, int perGeomInstanceIndex, const DequeNodeSwitchInfoPairs &parentSwitchPaths, const DequeNodeSwitchInfoPairs &switchPath, const osg::NodePath &parentNodePath)
 Adds a single per geometry instances switch paths. Each switch is assigned a bit in the instances switch off mask. More...
 
virtual void addSwitch (NodeSwitchInfoPair &switchChildPair, DtPerGeomInstance &perGeomInstance, int bitMaskId, int perGeomInstanceIndex, const osg::NodePath &parentNodePath)
 Adds a single switch for a single per geometry instance. More...
 
virtual bool areSwitchesDirty (bool clearFlag=true)
 Checks the manager to see if any switches have changed since the last time this was called. More...
 
virtual void slot_setSwitch (DtDynamicTerrainSwitchNode *switchNode, DynamicTerrain::NodePathHash nodePathHash, int childIdx)
 slot for handling DtDynamicTerrainSwitchNode switch state changes. More...
 
virtual void updateSequences (osg::RenderInfo &renderInfo)
 

Protected Types

typedef std::map
< osg::Sequence *, unsigned
int
SequenceMap
 
typedef std::map< osg::Switch
*, osg::Switch::ValueList > 
SwitchMap
 
typedef std::map
< osgSim::MultiSwitch
*, osgSim::MultiSwitch::ValueList > 
MultiSwitchMap
 

Protected Member Functions

virtual bool checkSwitchChildActive (osg::ref_ptr< osg::Node > nodeRefPtr, int childIndex, DynamicTerrain::NodePathHash pathHash)
 utility function for checking the switch state for osg::Switch, osgSim::MutliSwitch and DtDynamicTerrainSwitchNode classes. More...
 

Protected Attributes

SwitchInfoMap mySwitches
 
std::set
< DtDynamicTerrainSwitchNode * > 
myDynamicSwitchSet
 
SequenceMap mySequenceChangedMap
 
SwitchMap mySwitchChangedMap
 
MultiSwitchMap myMultiChangedMap
 
DtSignalConnectionManager myConnections
 
bool mySwitchesDirty
 
DtInstanceContainermyContainer
 
DtDemyDe
 

Private Member Functions

 DtIndirectSwitchManager ()
 default constructor not implemented More...
 
 DtIndirectSwitchManager (const DtIndirectSwitchManager &other)
 Copy Constructor not implemented – Copy Not Allowed. More...
 
DtIndirectSwitchManageroperator= (const DtIndirectSwitchManager &other)
 Assignment Operator Not implemented – Assignment Not Allowed. More...
 

Detailed Description

handles the switches for all the indirect geometry.

Sets up the default state of osg::Switch, osgSim::MultiSwitch, and DtDynamicTerrainSwitchNode. Connects to a signal for the DtDynamicTerrainSwitchNode so it can update the indirect buffer when a switch changes. saves off the node path hash for every switch path that is added.

Member Typedef Documentation

typedef osg::observer_ptr<osg::Node> makVrv::DtIndirectSwitchManager::NodeObserverPtr
typedef std::map<osg::Sequence*, unsigned int> makVrv::DtIndirectSwitchManager::SequenceMap
protected
typedef std::map<osg::Switch*, osg::Switch::ValueList> makVrv::DtIndirectSwitchManager::SwitchMap
protected
typedef std::map<osgSim::MultiSwitch*, osgSim::MultiSwitch::ValueList> makVrv::DtIndirectSwitchManager::MultiSwitchMap
protected

Constructor & Destructor Documentation

makVrv::DtIndirectSwitchManager::DtIndirectSwitchManager ( DtDe de,
DtInstanceContainer container 
)

CTOR.

virtual makVrv::DtIndirectSwitchManager::~DtIndirectSwitchManager ( )
virtual

DTOR.

makVrv::DtIndirectSwitchManager::DtIndirectSwitchManager ( )
private

default constructor not implemented

makVrv::DtIndirectSwitchManager::DtIndirectSwitchManager ( const DtIndirectSwitchManager other)
private

Copy Constructor not implemented – Copy Not Allowed.

Member Function Documentation

DtIndirectSwitchManager& makVrv::DtIndirectSwitchManager::operator= ( const DtIndirectSwitchManager other)
private

Assignment Operator Not implemented – Assignment Not Allowed.

virtual void makVrv::DtIndirectSwitchManager::addSwitchPaths ( DtInstanceContainer instances,
int  perGeomInstanceIndex,
int  size,
const DequeNodeSwitchInfoPairs parentSwitchPaths,
const DequeNodeSwitchInfoPairsArray switchPaths,
const osg::NodePath &  parentNodePath 
)
virtual

Add a list of switch paths to the switch manager. Once added they are connected to the signal so changes can be passed down to the indirect buffer.

virtual void makVrv::DtIndirectSwitchManager::addSwitchPath ( DtInstanceContainer instances,
int  perGeomInstanceIndex,
const DequeNodeSwitchInfoPairs parentSwitchPaths,
const DequeNodeSwitchInfoPairs switchPath,
const osg::NodePath &  parentNodePath 
)
virtual

Adds a single per geometry instances switch paths. Each switch is assigned a bit in the instances switch off mask.

virtual void makVrv::DtIndirectSwitchManager::addSwitch ( NodeSwitchInfoPair switchChildPair,
DtPerGeomInstance perGeomInstance,
int  bitMaskId,
int  perGeomInstanceIndex,
const osg::NodePath &  parentNodePath 
)
virtual

Adds a single switch for a single per geometry instance.

virtual bool makVrv::DtIndirectSwitchManager::areSwitchesDirty ( bool  clearFlag = true)
virtual

Checks the manager to see if any switches have changed since the last time this was called.

virtual void makVrv::DtIndirectSwitchManager::slot_setSwitch ( DtDynamicTerrainSwitchNode switchNode,
DynamicTerrain::NodePathHash  nodePathHash,
int  childIdx 
)
virtual

slot for handling DtDynamicTerrainSwitchNode switch state changes.

virtual void makVrv::DtIndirectSwitchManager::updateSequences ( osg::RenderInfo &  renderInfo)
virtual
virtual bool makVrv::DtIndirectSwitchManager::checkSwitchChildActive ( osg::ref_ptr< osg::Node >  nodeRefPtr,
int  childIndex,
DynamicTerrain::NodePathHash  pathHash 
)
protectedvirtual

utility function for checking the switch state for osg::Switch, osgSim::MutliSwitch and DtDynamicTerrainSwitchNode classes.

Member Data Documentation

SwitchInfoMap makVrv::DtIndirectSwitchManager::mySwitches
protected
std::set<DtDynamicTerrainSwitchNode*> makVrv::DtIndirectSwitchManager::myDynamicSwitchSet
protected
SequenceMap makVrv::DtIndirectSwitchManager::mySequenceChangedMap
protected
SwitchMap makVrv::DtIndirectSwitchManager::mySwitchChangedMap
protected
MultiSwitchMap makVrv::DtIndirectSwitchManager::myMultiChangedMap
protected
DtSignalConnectionManager makVrv::DtIndirectSwitchManager::myConnections
protected
bool makVrv::DtIndirectSwitchManager::mySwitchesDirty
protected
DtInstanceContainer& makVrv::DtIndirectSwitchManager::myContainer
protected
DtDe& makVrv::DtIndirectSwitchManager::myDe
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)