VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtIndirectGeometry.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2021 VT-MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
20 
26 
28 
31 
32 #include <matrix/vlTaitBryan.h>
33 
34 #include <osg/Drawable>
35 #include <osg/Uniform>
36 #include <osg/StateSet>
37 #include <osg/OperationThread>
38 #include <osgSim/MultiSwitch>
39 
40 #include <tbb/concurrent_queue.h>
41 
42 #include <atomic>
43 #include <string>
44 #include <unordered_map>
45 #include <unordered_set>
46 
47 #define INDIRECTGEOMETRY_CONSTRUCT_DESTRUCT_DEBUG 0
48 
49 namespace osg
50 {
51  class NodeVisitor;
52  class State;
53 }
54 
55 namespace osgEarth {
56  class VirtualProgram;
57 };
58 
59 namespace makVrv
60 {
61  class DtIndirectGeometryRegistrar;
62  class DtCullShaderConfig;
63  class DtGpuCulling;
64  class DtGlBuffer;
65  class DtOsgCullVisitorParameters;
66 
67  class DtIndirectGeometryInitMainThreadJob;
68  class DtIndirectGeometryUpdateBuffersMainThreadJob;
69  class DtVirtualProgramCache;
70 
71  class DtIndirectDrawComponent;
72  class DtIndirectDefaultDrawComponent;
73  class DtIndirectLightPointDrawComponent;
74  class DtIndirectDebugCullComponent;
75 
76  class DtIndirectSwitchManager;
77  class DtIndirectDofManager;
78  class DtIndirectLodManager;
79  class DtIndirectUvOffsetManager;
80  class DtIndirectPerInstanceDataManager;
81 
82  class DtIndirectVaoManager;
83 
102  class DT_DLL_VRVOSG DtIndirectGeometry : public osg::Drawable
103  {
104  public:
105 
106 
109  template<class T>
111  {
114  };
115 
118  typedef std::unordered_map<int, Matrix4_32> MapInstanceIdToXform;
119 
125  typedef std::unordered_map< osgSim::MultiSwitch*, MultiSwitchPair> MapCloneToMultiSwitchPair;
126  typedef std::unordered_map< int, MapCloneToMultiSwitchPair> MapInstanceToMapCloneToMasterMultiSwitches;
127 
128  //Use the pair to hold the refs and the raw pointer to index into the map
132  typedef std::unordered_map< osgSim::DOFTransform*, DofTransformPair > MapCloneToDofTransformPair;
133  typedef std::unordered_map< int, MapCloneToDofTransformPair> MapInstanceToMapCloneToMasterDofs;
134 
135  //Use the pair to hold the refs and the raw pointer to index into the map
139  typedef std::unordered_map< osg::Sequence*, SequencePair > MapCloneToSequencePair;
140  typedef std::unordered_map< int, MapCloneToSequencePair> MapInstanceToMapCloneToMasterSequences;
141 
143  typedef std::map< const std::string, DtIndirectUvOffsetManager::UvOffset> MapAnnotationToUvOffsetData;
144  typedef std::unordered_map< int, MapAnnotationToUvOffsetData> MapInstanceToMapAnnotationToUvOffsetData;
145 
146  typedef std::unordered_map< int, DtIndirectUvOffsetManager::UvOffset> MapInstanceToUvOffset;
147 
148  protected:
150  DtIndirectGeometry(DtDe& de, bool terrainPatch);
151 
153  virtual ~DtIndirectGeometry();
154 
155  private:
157  DtIndirectGeometry() = delete;
158 
160  DtIndirectGeometry(const DtIndirectGeometry &other) = delete;
162  DtIndirectGeometry &operator=(const DtIndirectGeometry &other) = delete;
163 
164  public:
165 
167  virtual void setName(const std::string& name) override;
168 
176  virtual void setRegistrar(DtIndirectGeometryRegistrar* registrar);
177 
179  virtual DtIndirectGeometryRegistrar* registrar();
180 
182  virtual void setCullShaderConfig(const DtCullShaderConfig& cullShaderConfig);
183 
185  virtual const char* className() const;
186 
190  virtual void drawImplementation(osg::RenderInfo& renderInfo) const;
191 
193  virtual unsigned int rebuildRegistrar(osg::RenderInfo& renderInfo) const;
194 
200  virtual int addInstance(const DtIndirectGeometryInstance& instance);
201 
207  virtual int addInstance(int modelId, const osg::Matrixd& xForm, float modelScale, float modelRadius, int lightPointGroupId);
208 
210  virtual void setInstanceMatrixTransform(int instanceId, const Matrix4_32& xForm);
211 
213  virtual Matrix4_32 instanceMatrixTransform(int instanceId) const;
214 
216  virtual void removeInstance(int id);
217 
221  virtual void accept(osg::NodeVisitor& nv);
222 
224  virtual void setParent(const osg::Group* parent);
225 
231  virtual void setRegistrarInvalid(void);
232 
234  virtual void releaseGLObjects(osg::State* state) const;
235 
237  virtual void accept(osg::PrimitiveFunctor& functor) const;
238 
242  virtual void setupIndirect();
243 
246  virtual void setupIndirectShadersOnly();
247 
250  virtual const osg::Geode* parentGeode(void) const;
251  virtual osg::Geode* parentGeode(void);
253 
257  virtual void setLocalOriginTransform(const osg::Matrixd& localOriginTransform);
258 
262  virtual const osg::Matrixd& localOriginTransform() const;
263 
265  virtual bool actuallyAddQueuedUpInstances(void);
266 
268  virtual void launchMainThreadJobAndWait(DtDe& de, DtOsgRenderer& renderer);
269 
271  virtual boost::condition_variable & waitCondition();
272 
274  virtual void updateGpuBuffers(osg::RenderInfo& renderInfo);
275 
277  virtual void setManagesIndividualInstances(bool val);
280 
283  virtual bool managesIndividualInstances() const;
285 
288  virtual void setPureSignalBasedUpdates(bool val);
289 
292  virtual bool pureSignalBasedUpdates(void) const;
293 
295  virtual void setInstanceMultiSwitch(int id, osgSim::MultiSwitch* clone, osgSim::MultiSwitch* master);
296 
298  virtual void instanceMultiSwitches(int instanceIdIndirect, MapCloneToMultiSwitchPair& mapCloneToMasterMultiSwitches) const;
299 
301  virtual void setInstanceUvOffset(int id, const std::string& annotation, float uOffset, float vOffset);
302 
304  virtual void scrollUv(int id, float uOffset, float vOffset);
305 
307  virtual void instanceAnnotationsAndUvOffsets(int instanceIdIndirect, std::vector<DtIndirectAnnotationAndUvOffset>& annotations) const;
308 
310  virtual void setInstanceColor(int instanceIdIndirect, const Vector4_32& color);
312  virtual Vector4_32 instanceColor(int instanceIdIndirect) const;
314 
316  virtual void setInstanceOtherData0(int instanceIdIndirect, const Vector4_32& data);
318  virtual Vector4_32 instanceOtherData0(int instanceIdIndirect) const;
320 
322  virtual void setInstanceVisibility(int instanceIdIndirect, bool visible);
324  virtual bool instanceVisibility(int instanceIdIndirect) const;
326 
328  virtual void setInstanceLightPointMaxDistance(int instanceIdIndirect, float lightPointMaxDistance);
330  virtual float instanceLightPointMaxDistance(int instanceIdIndirect) const;
332 
334  virtual void setInstanceDof(int id, osgSim::DOFTransform* clone, osgSim::DOFTransform* master);
335 
337  virtual void setInstanceDofTranslation(int id, osgSim::DOFTransform* clone, osgSim::DOFTransform* master
338  , const Vector3_64& trans
339  , const Vector3_64& transVel);
340 
342  virtual void setInstanceDofOrientation(int id, osgSim::DOFTransform* clone, osgSim::DOFTransform* master
343  , const Vector3_64& hpr
344  , const Vector3_64& hprVel);
345 
347  virtual void setInstanceDofOrientation(int id, osgSim::DOFTransform* clone, osgSim::DOFTransform* master
348  , const Vector3_64& hprVel
349  , bool forceUpdate);
350 
352  virtual void instanceDofs(int instanceIdIndirect, MapCloneToDofTransformPair& mapCloneToDofTransformPair) const;
353 
355  virtual void setInstanceSequence(int id, osg::Sequence* clone, osg::Sequence* master);
356 
358  virtual void instanceSequences(int instanceIdIndirect, MapCloneToSequencePair& mapCloneToMasterSequences) const;
359 
361  virtual void setFadeParameters(const DtIndirectFadeParameters& fadeParameters);
362 
364  virtual const DtIndirectFadeParameters& fadeParameters(void) const;
365 
367  virtual void perCameraUpdateAndCull(osg::RenderInfo& renderInfo, const osg::Camera* camera, const osg::Matrix& modelViewMatrix, const osg::FrameStamp* frameStamp);
368 
370  virtual void fillViewParameters(DtIndirectViewParameters& destViewParameters, const osg::Matrix& modelViewMatrix, const osg::Camera* camera, osg::RenderInfo& renderInfo) const;
371 
372 
374  virtual void setUpdateBuffersJobsRequiredCurrentFrame(bool requiredCurrentFrame);
381  virtual bool updateBuffersJobsRequiredCurrentFrame(void) const;
383 
385  virtual bool readyToRender(const int instanceIdInIndirect) const;
386 
390  virtual bool hasInProgressInstanceMove() const;
392  virtual void addInProgressInstanceMove();
394  virtual void subtractInProgressInstanceMove();
395 
399  virtual bool instanceEverAdded(void) const;
400 
403  virtual int numValidInstances(void) const;
404 
405  protected:
406 
409  virtual bool addInstanceActual(const DtIndirectGeometryInstance& instance);
410 
414  virtual void setupShadersIfNecessary();
415 
418  virtual void setupDebugUniforms();
419 
422  virtual void installDefaultMaterial(osg::StateSet* ss);
423 
425  virtual void slot_reloadShaders();
426 
430  virtual void updateIndicesCount(const DtAggregateModelInfo& modelInfo, int instanceContainerIndex);
431 
434  virtual void removeInstanceFromIndicesCount(int instanceContainerIndex);
435 
437  virtual void updateModelIdsToInstances(int modelId, int instanceId, bool add);
438 
440  virtual void drawFromCommandBuffer(osg::RenderInfo& renderInfo, const DtIndirectViewParameters& viewParameters, const osg::Camera* camera) const;
441 
443  virtual void setMultiSwitchOnInstanceInInstanceContainer(int instanceContainerId, osgSim::MultiSwitch* clone, osgSim::MultiSwitch* master);
444 
446  virtual void setDofOnInstanceInInstanceContainer(int instanceContainerId, osgSim::DOFTransform* clone, osgSim::DOFTransform* master);
447 
451 
453  virtual void updateInstancePositionOrientationAddedActual(const DtIndirectGeometryInstance& instance, int outInstanceIndex);
454 
456  virtual void updateInstanceSwitchesAddedActual(const DtIndirectGeometryInstance& instance, int outInstanceIndex);
457 
459  virtual void updateInstanceSequencesAddedActual(const DtIndirectGeometryInstance& instance, int outInstanceIndex);
460 
462  virtual void setUvOffsetOnInstanceInInstanceContainer(const int instanceId, const std::string& annotation, float uOffset, float vOffset);
463 
465  virtual void updateInstanceUvOffsetsAddedActual(const DtIndirectGeometryInstance& instance, int outInstanceIndex);
466 
468  virtual void updateInstanceColorAddedActual(const DtIndirectGeometryInstance& instance, int outInstanceIndex);
469 
471  virtual void updateInstanceOtherData0AddedActual(const DtIndirectGeometryInstance& instance, int outInstanceIndex);
472 
474  virtual void updateInstanceVisibilityLightPointMaxDistanceActual(const DtIndirectGeometryInstance& instance, int outInstanceIndex);
475 
477  virtual bool updateInstanceDeletionBeforeAddedActual(const DtIndirectGeometryInstance& instance);
478 
480  virtual void updateInstancesDofsAddedActual(const DtIndirectGeometryInstance& instance, int outInstanceIndex);
482  virtual void removeInstanceInInstanceContainer(int instanceContainerId);
483 
486  virtual void reloadShadersIfNecessary(void) const;
487 
491  virtual void update(const osg::FrameStamp* frameStamp);
492 
494  virtual DtIndirectDrawComponent* drawComponent(int stateId) const;
495 
498  virtual bool hasLightPoints(void) const;
499 
500  // do debug drawing of bounding boxes of all geometries within each instance
501  virtual void debugDrawIfNecessary(osg::RenderInfo& renderInfo, const int maxCommands, const osg::Camera* camera);
502 
504  virtual void deleteDrawComponents(void);
505 
507  virtual void initDrawComponents(void);
508 
510  virtual DtIndirectModelScalingAlgorithm scalingAlgorithm(const DtOsgCullVisitorParameters* params) const;
511 
513  virtual const DtOsgCullVisitorParameters* findCullVisitorParameters(osg::RenderInfo& renderInfo) const;
514 
515  protected:
518 
520  tbb::concurrent_queue<DtIndirectGeometryInstance> myQueueInstancesToAdd;
521 
523 
525 
527 
528  const bool myIsTerrainPatch;
529 
535  unsigned int myNumTextCoordArrays;
536 
538 
540 
545 
549 
550  // friend so it can access registrar, culling to make the vaos
551  friend class DtIndirectVaoManager;
553 
554 #if INDIRECTGEOMETRY_CONSTRUCT_DESTRUCT_DEBUG
555  static std::atomic<int> myRefCount;
556  int myId;
557 #endif
558 
561 
567 
569  mutable unsigned int myMutableLastFrameTexturesUpdated;
570 
571  mutable bool myMutableShadersSetup;
572 
575 
578  typedef std::unordered_map<int, int> MapIndirectIdToInstanceContainerId;
580 
581  unsigned int myLastFrameUpdated;
582  const osg::Camera* myLastCamera;
583 
584  boost::condition_variable myWaitCondition;
585  boost::mutex myWaitMutex;
586 
589 
590  boost::mutex myInternalsMutex;
591 
595 
597 
598  // PPP: Is this large enough?
599  std::atomic<int> myRunningInstanceId;
600 
601  //Left the typedefs here commented out so they are easier to follow. They need to be at the
602  // top so they can be used as arguments in the functions.
603 
605  //typedef std::unordered_map<int, Matrix4_32> MapInstanceIdToXform;
607 
612  //typedef CloneMasterPair<osgSim::MultiSwitch> MultiSwitchPair;
613  //typedef std::map< osgSim::MultiSwitch*, MultiSwitchPair> MapCloneToMultiSwitchPair;
614  //typedef std::map< int, MapCloneToMultiSwitchPair> MapInstanceToMapCloneToMasterMultiSwitches;
616 
617  //Use the pair to hold the refs and the raw pointer to index into the map
620  //typedef CloneMasterPair<osgSim::DOFTransform> DofTransformPair;
621  //typedef std::unordered_map< osgSim::DOFTransform*, DofTransformPair > MapCloneToDofTransformPair;
622  //typedef std::unordered_map< int, MapCloneToDofTransformPair> MapInstanceToMapCloneToMasterDofs;
624 
625  //Use the pair to hold the refs and the raw pointer to index into the map
628  //typedef CloneMasterPair<osg::Sequence> SequencePair;
629  //typedef std::unordered_map< osg::Sequence*, SequencePair > MapCloneToSequencePair;
630  //typedef std::unordered_map< int, MapCloneToSequencePair> MapInstanceToMapCloneToMasterSequences;
632 
634  //typedef std::unordered_map< const std::string, DtIndirectUvOffsetManager::UvOffset> MapAnnotationToUvOffsetData;
635  //typedef std::unordered_map< int, MapAnnotationToUvOffsetData> MapInstanceToMapAnnotationToUvOffsetData;
637 
639  //typedef std::unordered_map< int, DtIndirectUvOffsetManager::UvOffset> MapInstanceToUvOffset;
641 
642 
644  std::unordered_map<int, Vector4_32> myMapInstanceToColor;
645 
647  std::unordered_map<int, Vector4_32> myMapInstanceToOtherData0;
648 
650  std::unordered_map<int, bool> myMapInstanceToVisibility;
651 
653  std::unordered_map<int, float> myMapInstanceToLightPointMaxDistance;
654 
656  typedef std::unordered_set<int> SetInstancesToDelete;
658 
660 
662 
663  //osg state management
666 
670 
671  // state set (bin) for the default components
673 
674  // state set (bin) for the light point components
676 
679 
681 
683 
684  protected:
685  // shared across multiple indirect geometries
687 
688  };
689 
692  {
693  public:
696 
698  virtual ~DtIndirectGeometryCreator();
699 
700  private:
704  DtIndirectGeometryCreator &operator=(const DtIndirectGeometryCreator& other) = delete;
705 
706  public:
708  virtual DtIndirectGeometry* create(bool terrainPatch) const;
709 
712  static DtIndirectGeometryCreator& instance(DtDe& de);
713 
715  static const std::string& theClassName();
716 
717  protected:
719  };
720 }
unsigned int myNumTextCoordArrays
Definition: DtIndirectGeometry.h:535
boost::condition_variable myWaitCondition
Definition: DtIndirectGeometry.h:584
Contains the DtCullShaderConfig class declaration.
static DtVirtualProgramCache * theVirtualProgramCache
Definition: DtIndirectGeometry.h:686
MapIntToInt myInstancesToModelIds
Definition: DtIndirectGeometry.h:526
DtIndirectFadeParameters myFadeParameters
Definition: DtIndirectGeometry.h:596
The DtOsgRenderer is the component responsible for rendering 3D images onto the screen via OpenSceneG...
Definition: DtOsgRenderer.h:90
Virtual base class.
Definition: DtVirtualBaseClass.h:19
non virtual container class for holding the information needed to create an indirect geometry instanc...
Definition: DtIndirectGeometryInstance.h:26
std::unordered_map< int, float > myMapInstanceToLightPointMaxDistance
Maps an instance id to the light point max distance for that instance.
Definition: DtIndirectGeometry.h:653
std::unordered_map< osg::Sequence *, SequencePair > MapCloneToSequencePair
Definition: DtIndirectGeometry.h:139
std::unordered_map< int, int > MapIndirectIdToInstanceContainerId
Map of instances&#39; id in indirect geometry to their id in the instance container.
Definition: DtIndirectGeometry.h:578
DtIndirectPerInstanceDataManager * myPerInstanceDataManager
Definition: DtIndirectGeometry.h:566
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
handles the switches for all the indirect geometry.
Definition: DtIndirectSwitchManager.h:69
MapInstanceToMapCloneToMasterDofs myMapInstanceToMapCloneToMasterDofs
Maps an instance id and a master dof to the clone dof so we can get to the cloned dof which contains ...
Definition: DtIndirectGeometry.h:623
Definition: featureContext.h:37
MapInstanceToMapAnnotationToUvOffsetData myMapInstanceToMapAnnotationToUvOffsetData
Maps and instance id and a string to the current uv offset for this particular annotation.
Definition: DtIndirectGeometry.h:636
Definition: DtIndirectDebugCullComponent.h:45
std::map< const std::string, DtIndirectUvOffsetManager::UvOffset > MapAnnotationToUvOffsetData
Maps and instance id and a string to the current uv offset for this particular annotation.
Definition: DtIndirectGeometry.h:143
DtIndirectLodManager * myLodManager
Definition: DtIndirectGeometry.h:564
osg::ref_ptr< T > myClone
Definition: DtIndirectGeometry.h:112
creator for DtIndirectGeometry
Definition: DtIndirectGeometry.h:691
This class is a component of the DtIndirectGeometry It inputs are: -&gt; the instances registered with Dt...
Definition: DtGpuCulling.h:64
bool myLastMissingTextureColorOn
Definition: DtIndirectGeometry.h:548
unsigned int myMutableLastRegistrarRebuildNumber
Definition: DtIndirectGeometry.h:568
Indirect geometry can have multiple models and their corresponding ids registered in it...
Definition: DtIndirectGeometryRegistrar.h:106
DtIndirectLightPointDrawComponent * myLightPointDrawComponent
Definition: DtIndirectGeometry.h:668
std::unordered_map< osgSim::DOFTransform *, DofTransformPair > MapCloneToDofTransformPair
Definition: DtIndirectGeometry.h:132
std::atomic< int > myRunningInstanceId
Definition: DtIndirectGeometry.h:599
osg::Matrixd myLocalOriginTransformMatrix
Definition: DtIndirectGeometry.h:539
Contains makVrv::DtIndirectModelScalingAlgorithm enumeration.
Contains the DtIndirectGeometryUpdateBuffersMainThreadJob class declaration.
bool myUpdateBuffersJobsRequiredCurrentFrame
whether gpu buffers for instances are updated immediately
Definition: DtIndirectGeometry.h:678
DtIndirectModelScalingAlgorithm
Definition: DtIndirectModelScalingAlgorithm.h:14
MapInstanceIdToXform myMapInstanceIdToXform
Structure to hold instance orientation until the instance is actually added.
Definition: DtIndirectGeometry.h:606
std::unordered_map< int, Vector4_32 > myMapInstanceToColor
Maps an instance id to the color for that instance.
Definition: DtIndirectGeometry.h:644
Helper struct to make the code a bit more clear.
Definition: DtIndirectGeometry.h:110
shader configuration storage class.
Definition: DtCullShaderConfig.h:19
Contains the DtIndirectGeometryUpdateMainThreadJob class declaration.
std::map< int, int > MapIntToInt
Definition: DtCommonTypes.h:25
osg::ref_ptr< DtIndirectGeometryUpdateBuffersMainThreadJob > myMainThreadUpdateBuffersJob
Definition: DtIndirectGeometry.h:593
handles the lods for all the indirect geometry.
Definition: DtIndirectLodManager.h:52
osg::ref_ptr< DtIndirectGeometryRegistrar > myRegistrar
pointer to the (external) registrar
Definition: DtIndirectGeometry.h:517
3 dimensional vector
unsigned int myLastFrameUpdateTraversed
Definition: DtIndirectGeometry.h:680
DtSignalConnectionManager myConnections
Definition: DtIndirectGeometry.h:537
osg::ref_ptr< osg::StateSet > myLightPointDrawStateSet
Definition: DtIndirectGeometry.h:675
DtDe & myDe
Definition: DtIndirectGeometry.h:661
osg::ref_ptr< DtIndirectGeometryInitMainThreadJob > myMainThreadInitJob
Definition: DtIndirectGeometry.h:592
std::unordered_map< osgSim::MultiSwitch *, MultiSwitchPair > MapCloneToMultiSwitchPair
Definition: DtIndirectGeometry.h:125
std::unordered_map< int, MapCloneToMultiSwitchPair > MapInstanceToMapCloneToMasterMultiSwitches
Definition: DtIndirectGeometry.h:126
std::unordered_map< int, DtIndirectUvOffsetManager::UvOffset > MapInstanceToUvOffset
Definition: DtIndirectGeometry.h:146
bool myLastDebugIndirectColorByGeomIndex
Definition: DtIndirectGeometry.h:547
std::unordered_map< int, MapAnnotationToUvOffsetData > MapInstanceToMapAnnotationToUvOffsetData
Definition: DtIndirectGeometry.h:144
DtIndirectGeometryInstance, which holds information for creating an indirect geometry instance...
int myNumInProgressInstanceMoves
Definition: DtIndirectGeometry.h:682
DtGpuCulling * myGpuCulling
Definition: DtIndirectGeometry.h:522
osg::ref_ptr< osg::Uniform > myProjectionMatrixUniform
Definition: DtIndirectGeometry.h:665
Contains makVrv::DtVirtualBaseClass class.
DtIndirectDebugCullComponent * myIndirectDebugCullComponent
Definition: DtIndirectGeometry.h:669
DtIndirectVaoManager * myVaoManager
Definition: DtIndirectGeometry.h:552
class to hold a hashed map of strings to equivalent virtual programs to avoid repeated, duplicate creation of a virtual programs
Definition: DtVirtualProgramCache.h:46
std::unordered_set< int > SetInstancesToDelete
Structure to hold instance ids to be deleted.
Definition: DtIndirectGeometry.h:656
\ ::, which allows us to hook into our indirect engine to render using indirect rendering...
Definition: DtIndirectGeometry.h:102
MapIntToInt myModelIDsToInstances
Definition: DtIndirectGeometry.h:524
CloneMasterPair< osgSim::DOFTransform > DofTransformPair
Maps an instance id and a master dof to the clone dof so we can get to the cloned dof which contains ...
Definition: DtIndirectGeometry.h:131
const osg::Camera * myLastCamera
Definition: DtIndirectGeometry.h:582
Contains the DtIndirectGeometryInitMainThreadJob class declaration.
unsigned int myLastFrameUpdated
Definition: DtIndirectGeometry.h:581
MapIndirectIdToInstanceContainerId myMapIndirectIdToInstanceContainerId
Definition: DtIndirectGeometry.h:579
contains the Per Model info which DtAggregatedGeometry needs It is owned by the Indirect geometry reg...
Definition: DtAggregateModelInfo.h:31
handles the dof nodes for all the indirect geometry.
Definition: DtIndirectDofManager.h:63
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
The osg cull vistor parameters class provides additional culling and intersector parameters for choos...
Definition: DtOsgCullVisitorParameters.h:38
bool myLastDebugIndirectColorOn
Definition: DtIndirectGeometry.h:546
&#39;super&#39; class for managing the per camera vaos for an indirect geometry internally uses a DtGlVaoMana...
Definition: DtIndirectVaoManager.h:42
boost::mutex myInternalsMutex
Definition: DtIndirectGeometry.h:590
SetInstancesToDelete mySetInstancesIndirectIdsToDelete
Definition: DtIndirectGeometry.h:657
struct for holding the fade parameters used by the indirect rendering cull compute shader ...
Definition: DtIndirectFadeParameters.h:17
osg::ref_ptr< osg::Uniform > myModelViewMatrixUniform
Definition: DtIndirectGeometry.h:664
std::map< int, int > myInstanceContainerIdToNumIndices
Definition: DtIndirectGeometry.h:544
int myNumIndicesAcrossAllModels
number of indices across all unique models across instances
Definition: DtIndirectGeometry.h:543
std::unordered_map< int, Matrix4_32 > MapInstanceIdToXform
Structure to hold instance orientation until the instance is actually added.
Definition: DtIndirectGeometry.h:118
responsible for initializing the indirect buffers in the main thread
Definition: DtIndirectGeometryInitMainThreadJob.h:42
DtIndirectSwitchManager * mySwitchManager
Definition: DtIndirectGeometry.h:562
tbb::concurrent_queue< DtIndirectGeometryInstance > myQueueInstancesToAdd
addInstance may be called from multiple threads. Hence, concurrent queue
Definition: DtIndirectGeometry.h:520
Contains makVrv::DtIndirectAnnotationAndUvOffset class.
DtIndirectUvOffsetManager * myUvOffsetManager
Definition: DtIndirectGeometry.h:565
bool myMutableShadersSetup
Definition: DtIndirectGeometry.h:571
The class that is used to communicate the camera viewing parameters to the DtICullingAndLOD interface...
Definition: DtIndirectViewParameters.h:26
osg::ref_ptr< DtIndirectGeometryUpdateMainThreadJob > myMainThreadUpdateJob
Definition: DtIndirectGeometry.h:594
Base class to provide boost signal/slot management.
DtDe & myDe
Definition: DtIndirectGeometry.h:718
std::unordered_map< int, bool > myMapInstanceToVisibility
Maps an instance id to the visibility for that instance.
Definition: DtIndirectGeometry.h:650
handles the uv offsets for all the indirect geometry.
Definition: DtIndirectUvOffsetManager.h:49
unsigned int myMutableLastFrameTexturesUpdated
Definition: DtIndirectGeometry.h:569
DtInstanceContainer myInstanceContainer
container for all the instances registered here
Definition: DtIndirectGeometry.h:560
handles data that is specified per instance.
Definition: DtIndirectPerInstanceDataManager.h:59
osg::ref_ptr< osg::StateSet > myDefaultDrawStateSet
Definition: DtIndirectGeometry.h:672
Contains DLL export macros.
bool myMutableShouldReloadShaders
FIXME should be a static but currently the cull shader is per indirect.
Definition: DtIndirectGeometry.h:574
MapInstanceToMapCloneToMasterSequences myMapInstanceToMapCloneToMasterSequences
Maps an instance id and a master sequence to the clone sequence so we can get to the cloned sequence ...
Definition: DtIndirectGeometry.h:631
DtIndirectEffectTexturesTemplate myEffectTexturesState
the accumulated effect textures&#39; state which represents the superset of all effect textures cumulativ...
Definition: DtIndirectGeometry.h:534
Interface class to manage/configure drawing of a subset of rendering components within an indirect ge...
Definition: DtIndirectDrawComponent.h:30
MapInstanceToUvOffset myMapInstanceToUvOffset
Maps and instance id to the current uv offset for all scrollable uv offsets.
Definition: DtIndirectGeometry.h:640
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
class to draw a subset of items of an indirect geometry (everything except light points), the default way
Definition: DtIndirectDefaultDrawComponent.h:36
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
std::unordered_map< int, Vector4_32 > myMapInstanceToOtherData0
Maps an instance id to the other data0 for that instance.
Definition: DtIndirectGeometry.h:647
std::unordered_map< int, MapCloneToSequencePair > MapInstanceToMapCloneToMasterSequences
Definition: DtIndirectGeometry.h:140
boost::mutex myWaitMutex
Definition: DtIndirectGeometry.h:585
MapInstanceToMapCloneToMasterMultiSwitches myMapInstanceToMapCloneToMasterMultiSwitches
Structure to hold instance multi-switches&#39; state until the instance is actually added Use the pair to...
Definition: DtIndirectGeometry.h:615
const bool myIsTerrainPatch
Definition: DtIndirectGeometry.h:528
Contains the DtIndirectGeometryRegistrar class declaration.
Contains makVrv::DtIndirectViewParameters class.
Contains makVrv::DtInstanceContainer.
std::unordered_map< int, MapCloneToDofTransformPair > MapInstanceToMapCloneToMasterDofs
Definition: DtIndirectGeometry.h:133
bool myManagesIndividualInstances
Definition: DtIndirectGeometry.h:659
Class that allows you to abstractly register effect texture types the effect texture types are client...
Definition: DtIndirectEffectTexturesTemplate.h:40
CloneMasterPair< osg::Sequence > SequencePair
Maps an instance id and a master sequence to the clone sequence so we can get to the cloned sequence ...
Definition: DtIndirectGeometry.h:138
DtIndirectDefaultDrawComponent * myDefaultDrawComponent
Definition: DtIndirectGeometry.h:667
CloneMasterPair< osgSim::MultiSwitch > MultiSwitchPair
Structure to hold instance multi-switches&#39; state until the instance is actually added Use the pair to...
Definition: DtIndirectGeometry.h:124
osg::ref_ptr< T > myMaster
Definition: DtIndirectGeometry.h:113
DtIndirectDofManager * myDofManager
Definition: DtIndirectGeometry.h:563
Contains makVrv::DtIndirectFadeParameters class.
class to draw a subset of light points of an indirect geometry
Definition: DtIndirectLightPointDrawComponent.h:48
4 dimensional matrix
Definition: DtMatrix4.h:22

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)