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) 2023 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 <tbb/atomic.h>
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 
62 
65 
67  template <>
68  inline const char* creatorTypeName<DtIndirectFeatureGeomHandler>(void) { return "DtIndirectFeatureGeomHandlerCreator"; }
69 
77  {
78  public:
81 
82  protected:
84  DtIndirectFeatureGeomHandler(DtDe& de, const osgEarth::Layer& layer, const DtIndirectFadeParameters& fadeParameters, bool dynamicTerrainInstallerActive, bool cullFaceEnabled);
85 
88 
89  private:
93  DtIndirectFeatureGeomHandler &operator=(const DtIndirectFeatureGeomHandler &other) = delete;
94 
95  public:
97  virtual void onDataPremerge(osg::Node* data);
98 
100  virtual void onDataUnloaded(const osg::Node* data);
101 
103  virtual void slot_postTick();
104 
105  protected:
107  virtual void processSubstituteModelFilterNodes(osg::Node* data);
108 
110  virtual void processExtrudeGeometryFilterNodes(osg::Node* data);
111 
113  virtual void processExtrudeGeometryFilterNode(osgEarth::ExtrudeGeometryFilterNode* pFeatureNode, osg::Node* data);
114 
115 
119  virtual void processSubstituteModelFilterNode(const osgEarth::SubstituteModelFilterNode* pFeatureNode, const osg::Node* data);
120 
122  virtual void processSubstituteModelFilterNodeAsGT(const osgEarth::SubstituteModelFilterNode* pFeatureNode, const osg::Group* keyNode);
123 
125  virtual void processSubstituteModelFilterNodeAsGS(const osgEarth::SubstituteModelFilterNode* pFeatureNode, const osg::Group* keyNode);
126 
129  virtual void processCustomFeatures(osg::Node* data);
130 
132  virtual void processCustomFeature(const osgEarth::CustomFeatureNode* pFeatureNode, const osg::Node* key);
133 
135  virtual void setLayerMask(const osgEarth::Layer* layer) const;
136 
138  virtual void turnOffIntersectionsIfSoSpecified(const osgEarth::Layer* layer) const;
139 
140  protected:
141 
148  osg::observer_ptr<const osgEarth::Layer> myLayer;
149 
153 
156 
160 
162 
164 
166  const bool myCullFaceEnabled;
167 
170 
172  };
173 }
friend DtIndirectFeatureGeomHandlerCreator
creator friend class so it is the only one that can create new DtIndirectFeatureGeomHandlers ...
Definition: DtIndirectFeatureGeomHandler.h:87
Helper for managing a map of feature tile nodes (for a layer) to DtCellGeoSpecificIndirectGeo DtCellG...
Definition: DtCellToGeoSpecificIndirectGeoMap.h:39
DtIndirectModelContainerForHandlers & myIndirectModelContainerForHandlers
Definition: DtIndirectFeatureGeomHandler.h:171
#define DT_DLL_VRVOSGEARTH
Definition: vrvOsgEarth.h:21
const bool myDynamicTerrainInstallerActive
Definition: DtIndirectFeatureGeomHandler.h:165
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:161
DtIndirectModelsContainer * myGTModelsContainer
Definition: DtIndirectFeatureGeomHandler.h:152
class used to collect geometry coming in via feature_geom and add it to the indirect engine...
Definition: DtIndirectFeatureGeomHandler.h:76
const char * creatorTypeName< DtIndirectFeatureGeomHandler >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtIndirectFeatureGeomHandler.h:68
DtVirtualBaseClassCreator< DtIndirectFeatureGeomHandler, const osgEarth::Layer &, const DtIndirectFadeParameters &, const bool &, const bool & > DtIndirectFeatureGeomHandlerCreator
creator
Definition: DtIndirectFeatureGeomHandler.h:61
DtIndirectFadeParameters myFadeParameters
Definition: DtIndirectFeatureGeomHandler.h:163
class for holding an indirect geometry registrar (which holds the information about how to draw model...
Definition: DtIndirectModelsContainer.h:55
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:22
Custom Feature Node.
Definition: CustomFeatureNode.h:43
Contains the CustomFeatureNode class declaration.
const bool myCullFaceEnabled
Definition: DtIndirectFeatureGeomHandler.h:166
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:34
struct for holding the fade parameters used by the indirect rendering cull compute shader ...
Definition: DtIndirectFadeParameters.h:17
Base class to provide boost signal/slot management.
DtCellToGeoSpecificIndirectGeoMap * myCellToGSIndirectGeoMap
GeoSpecific stuff.
Definition: DtIndirectFeatureGeomHandler.h:155
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:72
DtCellToGeoTypicalIndirectGeoMap * myCellToGTIndirectGeoMap
GeoTypical stuff.
Definition: DtIndirectFeatureGeomHandler.h:151
DtCellToGeoSpecificIndirectGeoMap * myCellToProceduralGSIndirectGeoMap
Procedural stuff. Is also geospecific in the sense that each tile will have its own registrar...
Definition: DtIndirectFeatureGeomHandler.h:159
DtDe & myDe
Definition: DtIndirectFeatureGeomHandler.h:142
DtSignalConnectionManager myConnections
manager for connections
Definition: DtIndirectFeatureGeomHandler.h:169
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:148

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)