VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtCellIndirectGeo.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 
18 
19 #include <osg/Matrixd>
20 #include <osg/Group>
21 
22 #include <atomic>
23 
24 #define DTCELLINDIRECTGEO_CONSTRUCT_DESTRUCT_DEBUG 0
25 
26 namespace makVrv
27 {
28  class DtDe;
29  class DtCullShaderConfig;
30  class DtIndirectModelsContainer;
31  class DtIndirectGeometry;
32  class DtIndirectFadeParameters;
33 
36  {
37  public:
39  DtCellIndirectGeoInstance(const osg::Matrixd& instanceXForm);
40 
42  virtual ~DtCellIndirectGeoInstance();
43 
44  private:
46  DtCellIndirectGeoInstance() = delete;
50  DtCellIndirectGeoInstance& operator-(const DtCellIndirectGeoInstance& other) = delete;
51 
52  public:
53  int myModelId;
54  const osg::Matrixd& myInstanceXForm;
55  const osg::Node* myModelNode;
56 
57  osg::NodePath myNodePath;
59 
63  };
64 
69  {
70  public:
73  , bool includeIntersectionGeoInNodePath
74  , bool terrainPatch
75  , const DtIndirectFadeParameters& fadeParameters);
76 
78  virtual ~DtCellIndirectGeo();
79 
80  private:
82  DtCellIndirectGeo() = delete;
84  DtCellIndirectGeo(const DtCellIndirectGeo &other) = delete;
86  DtCellIndirectGeo &operator=(const DtCellIndirectGeo &other) = delete;
87 
88  public:
89 
93  virtual void setModelsContainer(DtIndirectModelsContainer* modelsContainer, bool ownsModelsContainer);
94 
96  virtual void setCullShaderConfig(const DtCullShaderConfig& cullShaderConfig);
97 
99  virtual void setParent(const osg::Group* parent);
100 
106  virtual const osg::BoundingBoxd& boundingBox(void) const;
107 
109  virtual const DtIndirectGeometry* indirectGeometry(void) const;
111  virtual DtIndirectGeometry* indirectGeometry(void);
112 
114  virtual osg::Group* indirectIntersectionGroup();
115 
119  virtual int addInstance(const DtCellIndirectGeoInstance& cellIndirectGeoInstance);
120 
121  protected:
124  virtual void expandBoundingBox(const osg::Node* modelNode, const osg::Matrixd& instanceXForm);
125 
126 
127 
128  protected:
131 
132 #if DTCELLINDIRECTGEO_CONSTRUCT_DESTRUCT_DEBUG
133  static std::atomic<int> myBaseRefCount;
134 #endif
135 
138 
140  osg::BoundingBoxd myBoundingBox;
142 
145 
147  };
148 }
DtDe & myDe
Definition: DtCellIndirectGeo.h:143
osg::ref_ptr< osg::Group > myIndirectGeoIntersectionGroup
Definition: DtCellIndirectGeo.h:137
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Helper structure for adding instances to DtCellIndirectGeo.
Definition: DtCellIndirectGeo.h:35
std::deque< NodeSwitchInfoPair > DequeNodeSwitchInfoPairs
Definition: DtIndirectSwitchManager.h:75
osg::NodePath myNodePath
Definition: DtCellIndirectGeo.h:57
shader configuration storage class.
Definition: DtCullShaderConfig.h:19
DtIndirectDofManager::DequeNodeDofInfoPairs myDofStack
Definition: DtCellIndirectGeo.h:62
bool myIncludeIntersectionGeoInNodePath
Definition: DtCellIndirectGeo.h:146
osg::ref_ptr< DtIndirectGeometry > myIndirectGeometry
Definition: DtCellIndirectGeo.h:136
class for holding an indirect geometry registrar (which holds the information about how to draw model...
Definition: DtIndirectModelsContainer.h:43
Helper for managing indirect geometry, its intersection group and registrar corresponding to a &#39;tile ...
Definition: DtCellIndirectGeo.h:68
std::deque< NodeDofInfoPair > DequeNodeDofInfoPairs
Definition: DtIndirectDofManager.h:74
Contains makVrv::DtIndirectDofManager class.
\ ::, which allows us to hook into our indirect engine to render using indirect rendering...
Definition: DtIndirectGeometry.h:102
DtIndirectSwitchManager::DequeNodeSwitchInfoPairs mySwitchStack
Definition: DtCellIndirectGeo.h:61
const osg::Node * myModelNode
Definition: DtCellIndirectGeo.h:55
struct for holding the fade parameters used by the indirect rendering cull compute shader ...
Definition: DtIndirectFadeParameters.h:17
OpenThreads::Mutex Mutex
Definition: DtOsgThreadingUtils.h:12
bool myFirstInstance
Definition: DtCellIndirectGeo.h:144
int myModelId
Definition: DtCellIndirectGeo.h:53
Contains makVrv::DtIndirectSwitchManager class.
DtIndirectLodManager::DequeIndirectLodInfos myLodStack
Definition: DtCellIndirectGeo.h:60
bool myAddToIntersectionGroup
Definition: DtCellIndirectGeo.h:58
osg::BoundingBoxd myBoundingBox
bounding box computation management
Definition: DtCellIndirectGeo.h:140
Contains makVrv::DtIndirectLodManager class.
Contains DLL export macros.
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
bool myOwnsModelsContainer
Definition: DtCellIndirectGeo.h:130
std::deque< IndirectLodInfo > DequeIndirectLodInfos
Definition: DtIndirectLodManager.h:65
const osg::Matrixd & myInstanceXForm
Definition: DtCellIndirectGeo.h:54
DtIndirectModelsContainer * myModelsContainer
Definition: DtCellIndirectGeo.h:129
Threading::Mutex myMutableBoundingBoxMutex
Definition: DtCellIndirectGeo.h:141

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)