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) 2021 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  class MapNode;
31  class Layer;
32  class Map;
33 }
34 
35 namespace makVrv
36 {
37  class DtIndirectGeometryLayerManager;
38 
41 
44 
46  template <>
47  inline const char* creatorTypeName<DtIndirectGeometryCallback>(void) { return "DtIndirectGeometryCallbackCreator"; }
48 
55  {
56  public:
58  virtual ~DtIndirectGeometryCallback();
59 
60  protected:
63 
66 
67  private:
69  DtIndirectGeometryCallback() = delete;
70 
72  DtIndirectGeometryCallback &operator=(const DtIndirectGeometryCallback &other) = delete;
73 
76 
77  public:
78 
81  virtual void onLayerLoaded(const osgEarth::MapNode* mapNode, osgEarth::Layer* layer) override;
82 
84  virtual void onLayerOpened(const osgEarth::MapNode* mapNode, osgEarth::Layer* layer);
85 
87  virtual void onLayerClosed(const osgEarth::MapNode* mapNode, osgEarth::Layer* layer);
88 
90  virtual void processLayer(const osgEarth::MapNode* mapNode, osgEarth::Layer* layer);
91 
94  virtual void onDataPreMerge(const osgEarth::Layer* layer, osg::Node* newData) override;
95 
97  virtual void onDataLoaded(const osgEarth::Layer* layer, const osg::Node* newData) override;
98 
100  virtual void onDataUnloaded(const osgEarth::Layer* layer, const osg::Node* oldData) override;
101 
103  virtual const std::string& instanceClassName() const override;
104 
106  virtual void setFeatureDataBroker(DtOsgEarthFeatureDataBroker* featureDataBroker);
107 
108  protected:
109 
111  virtual bool checkForIndirectRenderingParameter(osgEarth::Layer* layer);
112 
113  public:
115  static const std::string& className();
116 
117  protected:
118  static const std::string theClassName;
120 
122 
124  typedef std::unordered_map<const osgEarth::Layer*, DtIndirectGeometryLayerManager* > MapLayerToLayerManagerIndirectGeometry;
126 
127  };
128 }
#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:22
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:124
MapLayerToLayerManagerIndirectGeometry myMapLayerToLayerManagerIndirectGeometry
Definition: DtIndirectGeometryCallback.h:125
Definition: DtOsgEarthFeatureDataBroker.h:65
DtOsgEarthFeatureDataBroker * myFeatureDataBroker
Definition: DtIndirectGeometryCallback.h:121
DtIndirectGeometryCallback is a data broker callback that handles feature tile load/unload callbacks ...
Definition: DtIndirectGeometryCallback.h:53
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:72
DtDe & myDe
Definition: DtIndirectGeometryCallback.h:119
static const std::string theClassName
Definition: DtIndirectGeometryCallback.h:118
friend DtIndirectGeometryCallbackCreator
creator friend class so it is the only one that can create new DtIndirectGeometryCallback ...
Definition: DtIndirectGeometryCallback.h:65
const char * creatorTypeName< DtIndirectGeometryCallback >(void)
template specialization for the creator (pass the class being created to the creatorTypeName template...
Definition: DtIndirectGeometryCallback.h:47
DtVirtualBaseClassCreator< DtIndirectGeometryCallback > DtIndirectGeometryCallbackCreator
creator
Definition: DtIndirectGeometryCallback.h:40
Contains DLL export macros.

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)