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) 2024 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 
58  class DtIndirectModelContainerForHandlers;
59  class DtIndirectFeatureGeomHandlerSignaler;
60 
63 
66 
68  template <>
69  inline const char* creatorTypeName<DtIndirectFeatureGeomHandler>(void) { return "DtIndirectFeatureGeomHandlerCreator"; }
70 
78  {
79  public:
82 
83  protected:
85  DtIndirectFeatureGeomHandler(DtDe& de, const osgEarth::Layer& layer, const DtIndirectFadeParameters& fadeParameters, bool dynamicTerrainInstallerActive, bool cullFaceEnabled);
86 
89 
90  private:
94  DtIndirectFeatureGeomHandler &operator=(const DtIndirectFeatureGeomHandler &other) = delete;
95 
96  public:
98  virtual void onDataPremerge(osg::Node* data);
99 
101  virtual void onDataUnloaded(const osg::Node* data);
102 
104  virtual void slot_postTick();
105 
106  protected:
108  virtual void processSubstituteModelFilterNodes(osg::Node* data);
109 
111  virtual void processExtrudeGeometryFilterNodes(osg::Node* data);
112 
114  virtual void processExtrudeGeometryFilterNode(osgEarth::ExtrudeGeometryFilterNode* pFeatureNode, osg::Node* data);
115 
116 
120  virtual void processSubstituteModelFilterNode(const osgEarth::SubstituteModelFilterNode* pFeatureNode, const osg::Node* data);
121 
123  virtual void processSubstituteModelFilterNodeAsGT(const osgEarth::SubstituteModelFilterNode* pFeatureNode, const osg::Group* keyNode);
124 
126  virtual void processSubstituteModelFilterNodeAsGS(const osgEarth::SubstituteModelFilterNode* pFeatureNode, const osg::Group* keyNode);
127 
130  virtual void processCustomFeatures(osg::Node* data);
131 
133  virtual void processCustomFeature(const osgEarth::CustomFeatureNode* pFeatureNode, const osg::Node* key);
134 
136  virtual void setLayerMask(const osgEarth::Layer* layer) const;
137 
139  virtual void turnOffIntersectionsIfSoSpecified(const osgEarth::Layer* layer) const;
140 
141  protected:
142 
149  osg::observer_ptr<const osgEarth::Layer> myLayer;
150 
154 
157 
161 
163 
165 
167  const bool myCullFaceEnabled;
168 
171 
174  };
175 }
friend DtIndirectFeatureGeomHandlerCreator
creator friend class so it is the only one that can create new DtIndirectFeatureGeomHandlers ...
Definition: DtIndirectFeatureGeomHandler.h:88
Helper for managing a map of feature tile nodes (for a layer) to DtCellGeoSpecificIndirectGeo DtCellG...
Definition: DtCellToGeoSpecificIndirectGeoMap.h:39
DtIndirectModelContainerForHandlers & myIndirectModelContainerForHandlers
Definition: DtIndirectFeatureGeomHandler.h:172
#define DT_DLL_VRVOSGEARTH
Definition: vrvOsgEarth.h:21
const bool myDynamicTerrainInstallerActive
Definition: DtIndirectFeatureGeomHandler.h:166
Helper for managing a map of feature tile nodes (for a layer) to DtCellGeoTypicalIndirectGeo DtCellGe...
Definition: DtCellToGeoTypicalIndirectGeoMap.h:39
osg::ref_ptr< osgEarth::StateSetCache > myStateSetCache
Definition: DtIndirectFeatureGeomHandler.h:162
DtIndirectModelsContainer * myGTModelsContainer
Definition: DtIndirectFeatureGeomHandler.h:153
The signaler object for the makVrv::DtTerrainPatchObject class.
Definition: DtIndirectFeatureGeomHandlerSignaler.h:29
class used to collect geometry coming in via feature_geom and add it to the indirect engine...
Definition: DtIndirectFeatureGeomHandler.h:77
const char * creatorTypeName< DtIndirectFeatureGeomHandler >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtIndirectFeatureGeomHandler.h:69
DtVirtualBaseClassCreator< DtIndirectFeatureGeomHandler, const osgEarth::Layer &, const DtIndirectFadeParameters &, const bool &, const bool & > DtIndirectFeatureGeomHandlerCreator
creator
Definition: DtIndirectFeatureGeomHandler.h:62
DtIndirectFadeParameters myFadeParameters
Definition: DtIndirectFeatureGeomHandler.h:164
class for holding an indirect geometry registrar (which holds the information about how to draw model...
Definition: DtIndirectModelsContainer.h:71
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:167
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:173
Base class to provide boost signal/slot management.
DtCellToGeoSpecificIndirectGeoMap * myCellToGSIndirectGeoMap
GeoSpecific stuff.
Definition: DtIndirectFeatureGeomHandler.h:156
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:152
DtCellToGeoSpecificIndirectGeoMap * myCellToProceduralGSIndirectGeoMap
Procedural stuff. Is also geospecific in the sense that each tile will have its own registrar...
Definition: DtIndirectFeatureGeomHandler.h:160
DtDe & myDe
Definition: DtIndirectFeatureGeomHandler.h:143
DtSignalConnectionManager myConnections
manager for connections
Definition: DtIndirectFeatureGeomHandler.h:170
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:149

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)