26 #include <osgSim/MultiSwitch>
28 #include <osg/ref_ptr>
29 #include <osg/observer_ptr>
49 struct PerGeomInstance;
50 class DtDynamicTerrainSwitchNode;
51 class DtSwitchInstanceState;
104 virtual void addSwitchPaths(std::vector<PerGeomInstance*>& perGeomInstances,
int containerInstanceId,
106 const osg::NodePath& parentNodePath);
108 virtual void removeSwitchPaths(
int containerInstanceId);
112 virtual void slot_setSwitch(osgSim::MultiSwitch* clone, osgSim::MultiSwitch* master,
int containerInstanceId);
115 virtual bool slot_setSequence(osg::Sequence* clone, osg::Sequence* master,
int containerInstanceId);
122 virtual void update(
const osg::FrameStamp* frameStamp);
125 virtual void processSwitches();
128 virtual void releaseGLObjects(osg::State* state)
const;
131 virtual const DtGlBuffer* gpuSwitchStateBuffer()
const;
136 virtual void addSwitchPath(PerGeomInstance& perGeomInstance,
int vectorSwitchesOffBitMaskIdx,
138 const osg::NodePath& parentNodePath,
int containerInstanceId);
141 virtual void addSwitch(
NodeSwitchInfoPair& switchChildPair,
int bitMaskId,
int vectorSwitchesOffBitMaskIdx,
142 const osg::NodePath& parentNodePath,
int containerInstanceId);
148 virtual void updateSwitches();
151 virtual void updateMultiSwitches();
154 virtual void updateSequences(
const osg::FrameStamp* frameStamp);
157 virtual void updateSwitchStateBufferIfNecessary();
160 virtual void deleteBuffers();
163 virtual void tearDownBuffers()
const;
169 virtual void addSequence(osg::Sequence* sequence,
int containerInstanceId);
172 virtual void printInfo()
const;
175 virtual void printInfoSwitchInfos()
const;
178 virtual void printInfoMapsSize()
const;
181 virtual void printInfoBitMask()
const;
207 void operator()(
int& info);
std::map< int, std::pair< int, int > > myInstanceIdToPairIndices
This maps from instance container instance id to the start and end indices in the myVectorSwitchesOff...
Definition: DtIndirectSwitchManager.h:217
Contains makVrv::DtIndirectSwitchInfo struct.
parent manager class for all Indirect managers. Managers handle information about a specific feature ...
Definition: DtIndirectManager.h:25
DtDynamicTerrainSwitchNode replaces an osgSim::multiswitch in a terrain patch (or page) that is tagge...
Definition: DtDynamicTerrainSwitchNode.h:74
size_t NodePathHash
Typedef used to represent a hash of an OSG Node path to a referenced node.
Definition: DtMultiReferencedNodeContainer.h:26
std::set< DtDynamicTerrainSwitchNode * > mySetDynamicTerrainSwitchNodes
Definition: DtIndirectSwitchManager.h:187
std::map< int, VectorIndirectSwitchInfos > MapIntToVectorIndirectSwitchInfos
Definition: DtIndirectSwitchManager.h:81
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
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
Definition: DtIndirectSwitchManager.h:71
Contains makVrv::DtIndirectManager class.
friend DtIndirectSwitchManagerCreator
only creator can create
Definition: DtIndirectSwitchManager.h:86
std::deque< NodeSwitchInfoPair > DequeNodeSwitchInfoPairs
Definition: DtIndirectSwitchManager.h:77
const char * creatorTypeName< DtIndirectSwitchManager >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtIndirectSwitchManager.h:63
DtGlBuffer * myGpuSwitchStateBuffer
Definition: DtIndirectSwitchManager.h:219
MapSequenceToValue myMapSequenceToValue
Definition: DtIndirectSwitchManager.h:191
std::map< NodeObserverPtr, MapIntToVectorIndirectSwitchInfos > MapNodeToMapIntToVectorIndirectSwitchInfos
Definition: DtIndirectSwitchManager.h:82
VectorSwitchesOffBitMask myVectorSwitchesOffBitMask
Definition: DtIndirectSwitchManager.h:213
DtSignalConnectionManager myConnections
Definition: DtIndirectSwitchManager.h:202
MapSwitchToValueList myMapSwitchToValueList
Definition: DtIndirectSwitchManager.h:195
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:23
MapMultiSwitchToValueList myMapMultiSwitchToValueList
Definition: DtIndirectSwitchManager.h:199
osg::observer_ptr< osg::Node > NodeObserverPtr
Definition: DtIndirectSwitchManager.h:75
Contains makVrv::DtVirtualBaseClass class.
MapNodeToMapIntToVectorIndirectSwitchInfos myMapNodeToVectorIndirectSwitchInfos
Definition: DtIndirectSwitchManager.h:185
bool myMutableSwitchesDirty
Definition: DtIndirectSwitchManager.h:203
std::map< osg::Sequence *, unsigned int > MapSequenceToValue
Definition: DtIndirectSwitchManager.h:190
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
std::map< osg::Switch *, osg::Switch::ValueList > MapSwitchToValueList
Definition: DtIndirectSwitchManager.h:194
std::pair< NodeObserverPtr, DtIndirectSwitchInfo > NodeSwitchInfoPair
Definition: DtIndirectSwitchManager.h:76
std::vector< DequeNodeSwitchInfoPairs > DequeNodeSwitchInfoPairsArray
Definition: DtIndirectSwitchManager.h:78
A generic OpenGL buffer. This can be: -> a vertex buffer -> an index buffer -> a shader storage buffe...
Definition: DtGlBuffer.h:29
Contains makVrv::DtMultiReferencedNodeContainer class.
std::map< osgSim::MultiSwitch *, osgSim::MultiSwitch::ValueList > MapMultiSwitchToValueList
Definition: DtIndirectSwitchManager.h:198
Base class to provide boost signal/slot management.
Contains makVrv::DtReusableMemoryVector class.
std::vector< DtIndirectSwitchInfo > VectorIndirectSwitchInfos
Definition: DtIndirectSwitchManager.h:80
Definition: DtIndirectSwitchManager.h:205
structure for holding the information about a particular instance of a particular switch...
Definition: DtIndirectSwitchInfo.h:25
Contains DLL export macros.
DtReusableMemoryVector< int, SwitchesOffBitMaskInvalidator > VectorSwitchesOffBitMask
Definition: DtIndirectSwitchManager.h:212
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
DtPerGeomInstance class declaration.
DtVirtualBaseClassCreator< DtIndirectSwitchManager > DtIndirectSwitchManagerCreator
creator
Definition: DtIndirectSwitchManager.h:56