![]() |
VR-Forces Developer's Guide
|
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. Owned by a DtIndirectGeometry 1:1 This manager's switches get updated per frame via looking at the actual switches/multi-switches

Classes | |
| struct | SwitchesOffBitMaskInvalidator |
Public Types | |
| typedef osg::observer_ptr < osg::Node > | NodeObserverPtr |
| typedef std::pair < NodeObserverPtr, DtIndirectSwitchInfo > | NodeSwitchInfoPair |
| typedef std::deque < NodeSwitchInfoPair > | DequeNodeSwitchInfoPairs |
| typedef std::vector < DequeNodeSwitchInfoPairs > | DequeNodeSwitchInfoPairsArray |
| typedef std::vector < DtIndirectSwitchInfo > | VectorIndirectSwitchInfos |
| typedef std::map< int, VectorIndirectSwitchInfos > | MapIntToVectorIndirectSwitchInfos |
| typedef std::map < NodeObserverPtr, MapIntToVectorIndirectSwitchInfos > | MapNodeToMapIntToVectorIndirectSwitchInfos |
Public Types inherited from makVrv::DtIndirectManager | |
| enum | ManagerTypes { BaseClass, LodManager, SwitchManager, DofManager, UvOffsetManager, PerInstanceDataManager } |
Public Member Functions | |
| virtual | ~DtIndirectSwitchManager () |
| virtual void | addSwitchPaths (std::vector< PerGeomInstance * > &perGeomInstances, int containerInstanceId, const DequeNodeSwitchInfoPairs &parentSwitchPaths, const DequeNodeSwitchInfoPairsArray &switchPaths, const osg::NodePath &parentNodePath) |
| virtual void | removeSwitchPaths (int containerInstanceId) |
| virtual void | slot_setSwitch (osgSim::MultiSwitch *clone, osgSim::MultiSwitch *master, int containerInstanceId) |
| virtual bool | slot_setSequence (osg::Sequence *clone, osg::Sequence *master, int containerInstanceId) |
| virtual void | slot_setSwitchDynamicTerrainSwitchNode (DtDynamicTerrainSwitchNode *switchNode, DynamicTerrain::NodePathHash nodePathHash, int childIdx) |
| virtual void | update (const osg::FrameStamp *frameStamp) |
| virtual void | processSwitches () |
| virtual void | releaseGLObjects (osg::State *state) const |
| virtual const DtGlBuffer * | gpuSwitchStateBuffer () const |
Public Member Functions inherited from makVrv::DtIndirectManager | |
| DtIndirectManager (DtDe &de) | |
| virtual | ~DtIndirectManager () |
Public Attributes | |
| friend | DtIndirectSwitchManagerCreator |
Protected Types | |
| typedef std::map < osg::Sequence *, unsigned int > | MapSequenceToValue |
| typedef std::map< osg::Switch *, osg::Switch::ValueList > | MapSwitchToValueList |
| typedef std::map < osgSim::MultiSwitch *, osgSim::MultiSwitch::ValueList > | MapMultiSwitchToValueList |
| typedef DtReusableMemoryVector < int, SwitchesOffBitMaskInvalidator > | VectorSwitchesOffBitMask |
Protected Member Functions | |
| DtIndirectSwitchManager (DtDe &de) | |
| virtual void | addSwitchPath (PerGeomInstance &perGeomInstance, int vectorSwitchesOffBitMaskIdx, const DequeNodeSwitchInfoPairs &parentSwitchPaths, const DequeNodeSwitchInfoPairs &switchPath, const osg::NodePath &parentNodePath, int containerInstanceId) |
| virtual void | addSwitch (NodeSwitchInfoPair &switchChildPair, int bitMaskId, int vectorSwitchesOffBitMaskIdx, const osg::NodePath &parentNodePath, int containerInstanceId) |
| virtual bool | checkSwitchChildActive (osg::ref_ptr< osg::Node > nodeRefPtr, int childIndex, DynamicTerrain::NodePathHash pathHash) |
| virtual void | updateSwitches () |
| virtual void | updateMultiSwitches () |
| virtual void | updateSequences (const osg::FrameStamp *frameStamp) |
| virtual void | updateSwitchStateBufferIfNecessary () |
| virtual void | deleteBuffers () |
| virtual void | tearDownBuffers () const |
| virtual void | updateSwitch (const DtIndirectSwitchInfo &info, bool isSwitchChildActive) |
| virtual void | addSequence (osg::Sequence *sequence, int containerInstanceId) |
| virtual void | printInfo () const |
| virtual void | printInfoSwitchInfos () const |
| virtual void | printInfoMapsSize () const |
| virtual void | printInfoBitMask () const |
Protected Attributes | |
| MapNodeToMapIntToVectorIndirectSwitchInfos | myMapNodeToVectorIndirectSwitchInfos |
| std::set < DtDynamicTerrainSwitchNode * > | mySetDynamicTerrainSwitchNodes |
| MapSequenceToValue | myMapSequenceToValue |
| MapSwitchToValueList | myMapSwitchToValueList |
| MapMultiSwitchToValueList | myMapMultiSwitchToValueList |
| DtSignalConnectionManager | myConnections |
| bool | myMutableSwitchesDirty |
| VectorSwitchesOffBitMask | myVectorSwitchesOffBitMask |
| std::map< int, std::pair< int, int > > | myInstanceIdToPairIndices |
| DtGlBuffer * | myGpuSwitchStateBuffer |
Protected Attributes inherited from makVrv::DtIndirectManager | |
| DtDe & | myDe |
Private Member Functions | |
| DtIndirectSwitchManager ()=delete | |
| DtIndirectSwitchManager (const DtIndirectSwitchManager &other)=delete | |
| DtIndirectSwitchManager & | operator= (const DtIndirectSwitchManager &other)=delete |
Additional Inherited Members | |
Static Public Member Functions inherited from makVrv::DtIndirectManager | |
| static int | managerType () |
| typedef osg::observer_ptr<osg::Node> makVrv::DtIndirectSwitchManager::NodeObserverPtr |
| typedef std::pair<NodeObserverPtr, DtIndirectSwitchInfo> makVrv::DtIndirectSwitchManager::NodeSwitchInfoPair |
| typedef std::deque<NodeSwitchInfoPair> makVrv::DtIndirectSwitchManager::DequeNodeSwitchInfoPairs |
| typedef std::vector<DequeNodeSwitchInfoPairs> makVrv::DtIndirectSwitchManager::DequeNodeSwitchInfoPairsArray |
| typedef std::vector<DtIndirectSwitchInfo> makVrv::DtIndirectSwitchManager::VectorIndirectSwitchInfos |
| typedef std::map<int, VectorIndirectSwitchInfos> makVrv::DtIndirectSwitchManager::MapIntToVectorIndirectSwitchInfos |
| typedef std::map<NodeObserverPtr, MapIntToVectorIndirectSwitchInfos > makVrv::DtIndirectSwitchManager::MapNodeToMapIntToVectorIndirectSwitchInfos |
|
protected |
|
protected |
|
protected |
|
protected |
|
virtual |
DTOR.
|
protected |
CTOR. only creator can create.
|
privatedelete |
default constructor not implemented
|
privatedelete |
Copy Constructor not implemented – Copy Not Allowed.
|
privatedelete |
Assignment Operator Not implemented – Assignment Not Allowed.
|
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 |
Reimplemented in makVrv::DtIndirectSignalBasedSwitchManager.
|
virtual |
set the multi-switch state of an instance/clone, with an instance id. The representative 'master' that is in the indirect switch manager is the parameter 'master'
|
virtual |
set the sequence
Reimplemented in makVrv::DtIndirectSignalBasedSwitchManager.
|
virtual |
slot for handling DtDynamicTerrainSwitchNode switch state changes.
|
virtual |
update sequences (with special handling of dynamic terrain sequences), switches, multi-switches when pure signal based switches is true, this function does nothing
Reimplemented in makVrv::DtIndirectSignalBasedSwitchManager.
|
virtual |
process the switches. TO DO: do this in compute shader
|
virtual |
release gl objects
|
virtual |
get the buffer that holds the gpu swtich state information
|
protectedvirtual |
Adds a single per geometry instances switch paths. Each switch is assigned a bit in the instances switch off mask.
|
protectedvirtual |
Adds a single switch for a single per geometry instance.
|
protectedvirtual |
utility function for checking the switch state for osg::Switch, osgSim::MutliSwitch and DtDynamicTerrainSwitchNode classes.
|
protectedvirtual |
update the switches
|
protectedvirtual |
update the multi-switches
|
protectedvirtual |
update sequences (with special handling of dynamic terrain sequences)
|
protectedvirtual |
update the gpu side buffer if switches are dirty
|
protectedvirtual |
delete the buffers
|
protectedvirtual |
tear down
|
protectedvirtual |
Update a single switch given by 'info'.
|
protectedvirtual |
add a sequence
Reimplemented in makVrv::DtIndirectSignalBasedSwitchManager.
|
protectedvirtual |
print out the information for this manager
|
protectedvirtual |
print out switch info informaton
|
protectedvirtual |
print out map size information
Reimplemented in makVrv::DtIndirectSignalBasedSwitchManager.
|
protectedvirtual |
print out bit mask infomation
| friend makVrv::DtIndirectSwitchManager::DtIndirectSwitchManagerCreator |
only creator can create
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
protected |
|
protected |
This maps from instance container instance id to the start and end indices in the myVectorSwitchesOffBitMask memory pool.
|
protected |