VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtIndirectGeometryCallback.h
Go to the documentation of this file.
1 /******************************************************************************
2 ** Copyright (c) 2025 MAK Technologies, Inc.
3 ** All rights reserved.
4 ******************************************************************************/
5 
9 
10 #pragma once
11 
13 
15 
17 
19 
20 #include <unordered_map>
21 
22 namespace osg
23 {
24  class Node;
25 }
26 
27 
28 namespace osgEarth
29 {
30  namespace Buildings
31  {
32  class BuildingLayer;
33  }
34 
35  class MapNode;
36  class Layer;
37  class Map;
38 }
39 
40 namespace makVrv
41 {
42  class DtIndirectGeometryLayerManager;
43 
46 
49 
51  template <>
52  inline const char* creatorTypeName<DtIndirectGeometryCallback>(void) { return "DtIndirectGeometryCallbackCreator"; }
53 
60  {
61  public:
63  virtual ~DtIndirectGeometryCallback();
64 
65  protected:
68 
71 
72  private:
74  DtIndirectGeometryCallback() = delete;
75 
77  DtIndirectGeometryCallback &operator=(const DtIndirectGeometryCallback &other) = delete;
78 
81 
82  public:
83 
86  virtual void onLayerLoaded(const osgEarth::MapNode* mapNode, osgEarth::Layer* layer) override;
87 
89  virtual void onLayerOpened(const osgEarth::MapNode* mapNode, osgEarth::Layer* layer);
90 
92  virtual void onLayerClosed(const osgEarth::MapNode* mapNode, osgEarth::Layer* layer);
93 
95  virtual void processLayer(const osgEarth::MapNode* mapNode, osgEarth::Layer* layer);
96 
99  virtual void onDataPreMerge(const osgEarth::Layer* layer, osg::Node* newData) override;
100 
102  virtual void onDataLoaded(const osgEarth::Layer* layer, const osg::Node* newData) override;
103 
105  virtual void onDataUnloaded(const osgEarth::Layer* layer, const osg::Node* oldData) override;
106 
108  virtual const std::string& instanceClassName() const override;
109 
111  virtual void setFeatureDataBroker(DtOsgEarthFeatureDataBroker* featureDataBroker);
112 
113  protected:
114 
116  virtual bool checkForIndirectRenderingParameter(osgEarth::Layer* layer);
117 
120  virtual void processBuildingLayer(osgEarth::Buildings::BuildingLayer* buildingLayer) const;
121 
124  virtual void processModelLayer(osgEarth::Layer* layer) const;
125 
126  public:
128  static const std::string& className();
129 
130  protected:
131  static const std::string theClassName;
133 
135 
137  typedef std::unordered_map<const osgEarth::Layer*, DtIndirectGeometryLayerManager* > MapLayerToLayerManagerIndirectGeometry;
139 
140  };
141 }
#define DT_DLL_VRVOSGEARTH
Definition: vrvOsgEarth.h:21
DtOsgEarthFeatureDataBroker listens to osgEarth feature layers (i.e. model layers with a feature sour...
Definition: DtOsgEarthFeatureDataBroker.h:60
Variadic templated creator class for defining a DtVirtualBaseClass creator that is automatically regi...
Definition: DtVirtualBaseClassCreator.h:23
Contains makVrv::DtVirtualBaseClass class.
std::unordered_map< const osgEarth::Layer *, DtIndirectGeometryLayerManager * > MapLayerToLayerManagerIndirectGeometry
map of layers in the osg earth terrain to the layer manager for each layer
Definition: DtIndirectGeometryCallback.h:137
MapLayerToLayerManagerIndirectGeometry myMapLayerToLayerManagerIndirectGeometry
Definition: DtIndirectGeometryCallback.h:138
Definition: DtOsgEarthFeatureDataBroker.h:65
DtOsgEarthFeatureDataBroker * myFeatureDataBroker
Definition: DtIndirectGeometryCallback.h:134
DtIndirectGeometryCallback is a data broker callback that handles feature tile load/unload callbacks ...
Definition: DtIndirectGeometryCallback.h:58
Contains makVrv::DtOsgEarthFeatureDataBroker class.
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
DtDe & myDe
Definition: DtIndirectGeometryCallback.h:132
static const std::string theClassName
Definition: DtIndirectGeometryCallback.h:131
friend DtIndirectGeometryCallbackCreator
creator friend class so it is the only one that can create new DtIndirectGeometryCallback ...
Definition: DtIndirectGeometryCallback.h:70
const char * creatorTypeName< DtIndirectGeometryCallback >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtIndirectGeometryCallback.h:52
DtVirtualBaseClassCreator< DtIndirectGeometryCallback > DtIndirectGeometryCallbackCreator
creator
Definition: DtIndirectGeometryCallback.h:45
Contains DLL export macros.

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)