VR-Forces 4.8 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) 2019 VT-MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvOsg/vrvOsg.h>
13 
17 
19 
20 #include <osg/Matrixd>
21 #include <osg/Group>
22 
23 #include <tbb/atomic.h>
24 
25 #define DTCELLINDIRECTGEO_CONSTRUCT_DESTRUCT_DEBUG 0
26 
27 namespace makVrv
28 {
29  class DtDe;
30  class DtIndirectGeometryCreator;
31  class DtIndirectGeoComputeBoundCallbackCreator;
32  class DtIndirectVisitorControlGroupCreator;
33  class DtCullShaderConfig;
34  class DtIndirectModelsContainer;
35  class DtIndirectGeometry;
36  struct DtIndirectFadeParameters;
37 
42  {
43  public:
46  DtIndirectGeometryCreator& indirectGeometryCreator,
47  DtIndirectGeoComputeBoundCallbackCreator& indirectGeoComputeCallbackCreator,
48  DtIndirectVisitorControlGroupCreator& indirectGeoIntersectionGroupCreator,
49  bool includeIntersectionGeoInNodePath,
50  bool terrainPatch,
51  const DtIndirectFadeParameters& fadeParameters);
52 
54  virtual ~DtCellIndirectGeo();
55 
56  private:
62  DtCellIndirectGeo &operator=(const DtCellIndirectGeo &other);
63 
64  public:
65 
69  virtual void setModelsContainer(DtIndirectModelsContainer* modelsContainer, bool ownsModelsContainer);
70 
72  virtual void setCullShaderConfig(const DtCullShaderConfig& cullShaderConfig);
73 
75  virtual void setParent(const osg::Group* parent);
76 
77 
83  virtual const osg::BoundingBoxd& boundingBox(void) const;
84 
86  virtual const DtIndirectGeometry* indirectGeometry(void) const;
88  virtual DtIndirectGeometry* indirectGeometry(void);
89 
91  virtual osg::Group* indirectIntersectionGroup();
92 
93  protected:
96  virtual void expandBoundingBox(const osg::Node* modelNode, const osg::Matrixd& instanceXForm);
97 
100  virtual void addInstanceInternal(const osg::Matrixd& instanceXForm,
101  const int modelId,
102  const osg::Node* modelNode,
103  const osg::NodePath& nodePath,
105  bool addToIntersectionGroup = true,
108 
109  protected:
112 
113 #if DTCELLINDIRECTGEO_CONSTRUCT_DESTRUCT_DEBUG
114  static tbb::atomic<int> myBaseRefCount;
115 #endif
116 
119 
121  osg::BoundingBoxd myBoundingBox;
123 
126 
129  };
130 }
DtDe & myDe
Definition: DtCellIndirectGeo.h:124
osg::ref_ptr< osg::Group > myIndirectGeoIntersectionGroup
Definition: DtCellIndirectGeo.h:118
struct for holding the fade parameters used by the indirect rendering cull compute shader ...
Definition: DtGpuCullingAndLodDefines.h:21
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
Definition: featureContext.h:37
creator for DtIndirectGeometry
Definition: DtIndirectGeometry.h:325
std::deque< NodeSwitchInfoPair > DequeNodeSwitchInfoPairs
Definition: DtIndirectSwitchManager.h:72
DtGeometrySpecification class declaration.
shader configuration storage class.
Definition: DtCullShaderConfig.h:19
creator for DtIndirectVisitorControlGroup
Definition: DtIndirectVisitorControlGroup.h:56
bool myIncludeIntersectionGeoInNodePath
Definition: DtCellIndirectGeo.h:128
osg::ref_ptr< DtIndirectGeometry > myIndirectGeometry
Definition: DtCellIndirectGeo.h:117
class for holding an indirect geometry registrar (which holds the information about how to draw model...
Definition: DtIndirectModelsContainer.h:47
creator for osg::Drawable::ComputeBoundingBoxCallback
Definition: DtIndirectGeoComputeBoundCallback.h:54
Helper for managing indirect geometry, its intersection group and registrar corresponding to a &#39;tile ...
Definition: DtCellIndirectGeo.h:41
This class inherits from osg::Drawable, which allows us to hook into our indirect engine to render us...
Definition: DtIndirectGeometry.h:69
OpenThreads::Mutex Mutex
Definition: DtOsgThreadingUtils.h:12
bool myFirstInstance
Definition: DtCellIndirectGeo.h:125
Contains makVrv::DtIndirectSwitchManager class.
osg::BoundingBoxd myBoundingBox
bounding box computation management
Definition: DtCellIndirectGeo.h:121
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:111
std::deque< IndirectLodInfo > DequeIndirectLodInfos
Definition: DtIndirectLodManager.h:95
DtIndirectVisitorControlGroupCreator & myIndirectGeoIntersectionGroupCreator
Definition: DtCellIndirectGeo.h:127
DtIndirectModelsContainer * myModelsContainer
Definition: DtCellIndirectGeo.h:110
Threading::Mutex myMutableBoundingBoxMutex
Definition: DtCellIndirectGeo.h:122

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)