24 #include <osgSim/MultiSwitch>
26 #include <osg/ref_ptr>
27 #include <osg/observer_ptr>
49 struct PerGeomInstance;
50 class DtInstanceContainer;
51 class DtDynamicTerrainSwitchNode;
52 class DtSwitchInstanceState;
112 virtual void update(
const osg::FrameStamp* frameStamp);
115 virtual void processSwitches(
void);
118 virtual void releaseGLObjects(osg::State* state)
const;
121 virtual const DtGlBuffer* gpuSwitchStateBuffer(
void)
const;
125 virtual void removeMultiSwitchNode(osg::Node* node);
133 virtual void addSwitch(
NodeSwitchInfoPair& switchChildPair,
int bitMaskId,
int perGeomInstanceIndex,
const osg::NodePath& parentNodePath,
int uniqueId);
139 virtual void updateSwitches(
void);
142 virtual void updateMultiSwitches(
void);
145 virtual void updateSequences(
const osg::FrameStamp* frameStamp);
148 virtual void updateSwitchStateBufferIfNecessary(
void);
151 virtual void deleteBuffers(
void);
154 virtual void tearDownBuffers(
void)
const;
160 virtual void addSequence(osg::Sequence* sequence,
int instanceId);
186 void operator()(
int& info);
234 bool replaceChild(osg::Node *origNode, osg::Node *newNode)
override;
257 static void registerInstance(
DtDe& de,
Contains makVrv::DtIndirectSwitchInfo struct.
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
parent manager class for all Indirect managers. Managers handle information about a specific feature ...
Definition: DtIndirectManager.h:26
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:25
std::set< DtDynamicTerrainSwitchNode * > mySetDynamicTerrainSwitchNodes
Definition: DtIndirectSwitchManager.h:166
std::map< int, VectorIndirectSwitchInfos > MapIntToVectorIndirectSwitchInfos
Definition: DtIndirectSwitchManager.h:82
DtIndirectSwitchManager * myIndirectSwitchManager
Definition: DtIndirectSwitchManager.h:244
#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:72
Contains makVrv::DtIndirectManager class.
voidpf void uLong size
Definition: ioapi.h:39
friend DtIndirectSwitchManagerCreator
only creator can create
Definition: DtIndirectSwitchManager.h:87
std::deque< NodeSwitchInfoPair > DequeNodeSwitchInfoPairs
Definition: DtIndirectSwitchManager.h:78
const char * creatorTypeName< DtIndirectSwitchManager >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtIndirectSwitchManager.h:64
DtGlBuffer * myGpuSwitchStateBuffer
Definition: DtIndirectSwitchManager.h:194
MapSequenceToValue myMapSequenceToValue
Definition: DtIndirectSwitchManager.h:170
std::map< NodeObserverPtr, MapIntToVectorIndirectSwitchInfos > MapNodeToMapIntToVectorIndirectSwitchInfos
Definition: DtIndirectSwitchManager.h:83
VectorSwitchesOffBitMask myVectorSwitchesOffBitMask
Definition: DtIndirectSwitchManager.h:192
DtSignalConnectionManager myConnections
Definition: DtIndirectSwitchManager.h:181
MapSwitchToValueList myMapSwitchToValueList
Definition: DtIndirectSwitchManager.h:174
Creator that is used to create the DtIndirectMultiSwitchTrackingNode.
Definition: DtIndirectSwitchManager.h:248
Definition: DtIndirectSwitchManager.h:216
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:22
MapMultiSwitchToValueList myMapMultiSwitchToValueList
Definition: DtIndirectSwitchManager.h:178
osg::observer_ptr< osg::Node > NodeObserverPtr
Definition: DtIndirectSwitchManager.h:76
Contains makVrv::DtVirtualBaseClass class.
MapNodeToMapIntToVectorIndirectSwitchInfos myMapNodeToVectorIndirectSwitchInfos
Definition: DtIndirectSwitchManager.h:164
bool myMutableSwitchesDirty
Definition: DtIndirectSwitchManager.h:182
std::map< osg::Sequence *, unsigned int > MapSequenceToValue
Definition: DtIndirectSwitchManager.h:169
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
std::map< osg::Switch *, osg::Switch::ValueList > MapSwitchToValueList
Definition: DtIndirectSwitchManager.h:173
DtVirtualBaseClassCreator< DtIndirectSwitchManager, DtInstanceContainer & > DtIndirectSwitchManagerCreator
creator
Definition: DtIndirectSwitchManager.h:57
std::pair< NodeObserverPtr, DtIndirectSwitchInfo > NodeSwitchInfoPair
Definition: DtIndirectSwitchManager.h:77
std::vector< DequeNodeSwitchInfoPairs > DequeNodeSwitchInfoPairsArray
Definition: DtIndirectSwitchManager.h:79
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.
osg::ref_ptr< osg::Group > myMultiSwitchTrackingNode
Definition: DtIndirectSwitchManager.h:202
std::map< osgSim::MultiSwitch *, osgSim::MultiSwitch::ValueList > MapMultiSwitchToValueList
Definition: DtIndirectSwitchManager.h:177
Base class to provide boost signal/slot management.
Contains makVrv::DtReusableMemoryVector class.
std::vector< DtIndirectSwitchInfo > VectorIndirectSwitchInfos
Definition: DtIndirectSwitchManager.h:81
Definition: DtIndirectSwitchManager.h:184
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:191
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:70
Helper class to manage instances This class allows you to add a DtInstance_64 Internally, however it stores this as a DtInstance (which the GPU can directly read)
Definition: DtInstanceContainer.h:31