VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtIndirectFeatureGeomHandler.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2026 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
13 
15 
17 
19 
21 
22 #include <osgEarth/StateSetCache>
23 #include <osgEarth/Layer>
24 
25 #include <osg/observer_ptr>
26 
27 #include <boost/thread/mutex.hpp>
28 #include <boost/thread/condition_variable.hpp>
29 
30 #include <atomic>
31 #include <tbb/task.h>
32 
33 #include <unordered_map>
34 #include <unordered_set>
35 
36 namespace osgEarth
37 {
38  class Layer;
39  class SubstituteModelFilterNode;
40  class ExtrudeGeometryFilterNode;
41 }
42 namespace osg
43 {
44  class Node;
45  class Group;
46 }
47 
48 namespace makVrv
49 {
50  class DtDe;
51  class DtCellToGeoTypicalIndirectGeoMap;
52  class DtCellToGeoSpecificIndirectGeoMap;
53  class DtIndirectModelsContainer;
54  class DtModelSemanticsMapper;
55  class DtIndirectFeatureGeomHandler;
56  class DtCellIndirectGeo;
57  class DtIndirectModelRegistrationInfo;
58 
59  class DtIndirectModelContainerForHandlers;
60  class DtIndirectFeatureGeomHandlerSignaler;
61 
64 
67 
69  template <>
70  inline const char* creatorTypeName<DtIndirectFeatureGeomHandler>(void) { return "DtIndirectFeatureGeomHandlerCreator"; }
71 
79  {
80  public:
83 
84  protected:
86  DtIndirectFeatureGeomHandler(DtDe& de, const osgEarth::Layer& layer, const DtIndirectFadeParameters& fadeParameters, bool dynamicTerrainInstallerActive, bool cullFaceEnabled);
87 
90 
91  private:
95  DtIndirectFeatureGeomHandler &operator=(const DtIndirectFeatureGeomHandler &other) = delete;
96 
97  public:
99  virtual void onDataPremerge(osg::Node* data);
100 
102  virtual void onDataUnloaded(const osg::Node* data);
103 
105  virtual void slot_postTick();
106 
107  protected:
109  virtual void processSubstituteModelFilterNodes(osg::Node* data);
110 
112  virtual void processExtrudeGeometryFilterNodes(osg::Node* data);
113 
115  virtual void processExtrudeGeometryFilterNode(osgEarth::ExtrudeGeometryFilterNode* pFeatureNode, osg::Node* data);
116 
117 
121  virtual void processSubstituteModelFilterNode(const osgEarth::SubstituteModelFilterNode* pFeatureNode, const osg::Node* data);
122 
124  virtual void processSubstituteModelFilterNodeAsGT(const osgEarth::SubstituteModelFilterNode* pFeatureNode, const osg::Group* keyNode);
125 
127  virtual void processSubstituteModelFilterNodeAsGS(const osgEarth::SubstituteModelFilterNode* pFeatureNode, const osg::Group* keyNode);
128 
131  virtual void processCustomFeatures(osg::Node* data);
132 
134  virtual void processCustomFeature(const osgEarth::CustomFeatureNode* pFeatureNode, const osg::Node* key);
135 
137  virtual void setLayerMask(const osgEarth::Layer* layer) const;
138 
140  virtual void turnOffIntersectionsIfSoSpecified(const osgEarth::Layer* layer) const;
141 
142  protected:
143 
145 
147 
148  std::function<void(const DtIndirectModelRegistrationInfo&)> myRegisteredModelCallback;
149 
155  osg::observer_ptr<const osgEarth::Layer> myLayer;
156 
160 
163 
167 
169 
171 
173  const bool myCullFaceEnabled;
174 
177 
180  };
181 }
friend DtIndirectFeatureGeomHandlerCreator
creator friend class so it is the only one that can create new DtIndirectFeatureGeomHandlers ...
Definition: DtIndirectFeatureGeomHandler.h:89
Helper for managing a map of feature tile nodes (for a layer) to DtCellGeoSpecificIndirectGeo DtCellG...
Definition: DtCellToGeoSpecificIndirectGeoMap.h:40
DtIndirectModelContainerForHandlers & myIndirectModelContainerForHandlers
Definition: DtIndirectFeatureGeomHandler.h:178
#define DT_DLL_VRVOSGEARTH
Definition: vrvOsgEarth.h:21
const bool myDynamicTerrainInstallerActive
Definition: DtIndirectFeatureGeomHandler.h:172
Helper for managing a map of feature tile nodes (for a layer) to DtCellGeoTypicalIndirectGeo DtCellGe...
Definition: DtCellToGeoTypicalIndirectGeoMap.h:40
osg::ref_ptr< osgEarth::StateSetCache > myStateSetCache
Definition: DtIndirectFeatureGeomHandler.h:168
DtIndirectModelsContainer * myGTModelsContainer
Definition: DtIndirectFeatureGeomHandler.h:159
The signaler object for the makVrv::DtTerrainPatchObject class.
Definition: DtIndirectFeatureGeomHandlerSignaler.h:29
std::function< void(const DtIndirectModelRegistrationInfo &)> myRegisteredModelCallback
Definition: DtIndirectFeatureGeomHandler.h:148
class used to collect geometry coming in via feature_geom and add it to the indirect engine...
Definition: DtIndirectFeatureGeomHandler.h:78
const char * creatorTypeName< DtIndirectFeatureGeomHandler >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtIndirectFeatureGeomHandler.h:70
DtVirtualBaseClassCreator< DtIndirectFeatureGeomHandler, const osgEarth::Layer &, const DtIndirectFadeParameters &, const bool &, const bool & > DtIndirectFeatureGeomHandlerCreator
creator
Definition: DtIndirectFeatureGeomHandler.h:63
DtIndirectFadeParameters myFadeParameters
Definition: DtIndirectFeatureGeomHandler.h:170
class for holding an indirect geometry registrar (which holds the information about how to draw model...
Definition: DtIndirectModelsContainer.h:72
std::string myCurrentSharedDataPath
Definition: DtIndirectFeatureGeomHandler.h:146
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:23
Custom Feature Node.
Definition: CustomFeatureNode.h:43
Contains the CustomFeatureNode class declaration.
const bool myCullFaceEnabled
Definition: DtIndirectFeatureGeomHandler.h:173
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.h:20
Layer Handlers can request models that can be for a dynamic layer or not for a dynamic layer...
Definition: DtIndirectModelContainerForHandlers.h:35
struct for holding the fade parameters used by the indirect rendering cull compute shader ...
Definition: DtIndirectFadeParameters.h:17
DtIndirectFeatureGeomHandlerSignaler & mySignaler
Definition: DtIndirectFeatureGeomHandler.h:179
Base class to provide boost signal/slot management.
DtCellToGeoSpecificIndirectGeoMap * myCellToGSIndirectGeoMap
GeoSpecific stuff.
Definition: DtIndirectFeatureGeomHandler.h:162
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
DtCellToGeoTypicalIndirectGeoMap * myCellToGTIndirectGeoMap
GeoTypical stuff.
Definition: DtIndirectFeatureGeomHandler.h:158
DtCellToGeoSpecificIndirectGeoMap * myCellToProceduralGSIndirectGeoMap
Procedural stuff. Is also geospecific in the sense that each tile will have its own registrar...
Definition: DtIndirectFeatureGeomHandler.h:166
DtDe & myDe
Definition: DtIndirectFeatureGeomHandler.h:144
DtSignalConnectionManager myConnections
manager for connections
Definition: DtIndirectFeatureGeomHandler.h:176
Contains DLL export macros.
Contains makVrv::DtIndirectFadeParameters class.
osg::observer_ptr< const osgEarth::Layer > myLayer
store by observer ptr here onDataPremerge for a node can get launched (in another thread) just after ...
Definition: DtIndirectFeatureGeomHandler.h:155

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)