18 #include <osg/observer_ptr>
19 #include <osg/ref_ptr>
21 #include <osgEarth/Map>
22 #include <osgEarth/SceneGraphCallback>
23 #include <boost/unordered_map.hpp>
39 class FeaturePageObserver;
40 class DtOsgShaderManager;
43 namespace DtOsgEarthFeatureDataBrokerCallbackOrders
68 virtual void onLayerLoaded(
const osgEarth::MapNode* mapNode,
69 osgEarth::Layer* layer) =0;
73 virtual void onDataPreMerge(
const osgEarth::Map* map,
74 const osgEarth::Layer* layer,
75 osg::Node* newData) = 0;
79 virtual void onDataLoaded(
const osgEarth::Map* map,
80 const osgEarth::Layer* layer,
81 const osg::Node* newData) = 0;
87 virtual void onDataUnloaded(
const osgEarth::Map* map,
const osgEarth::Layer* layer,
const osg::Node* oldData)
101 virtual const std::string& instanceClassName()
const = 0;
104 static bool isModelLayer(
const osgEarth::Layer* layer);
141 void addCallback(
const std::string& registrant,
Callback* cb);
145 void setOptimizeStateSharing(
bool value);
146 bool getOptimizeStateSharing()
const;
153 void addLayer(osgEarth::Layer* layer);
157 void notifyNewLayer(osgEarth::Layer* layer);
161 bool layerHasCallback(
const osgEarth::Layer* layer,
const std::string& className);
167 void notifyPreMergeData(osgEarth::Layer* layer, osg::Node* node);
172 void notifyNewData(osgEarth::Layer* layer, osg::Node* data);
176 void notifyDataDeleted(osgEarth::Layer* layer, osg::Node* data);
186 bool readFeatureNameRegistrationFile(
const std::string& path,
190 std::string getFeatureNameFromLayer(
const osgEarth::Layer& layer );
204 typedef boost::unordered_multimap<std::string, CallbackRefPtr>
206 typedef std::pair<FeatureDataCallbackMap::iterator,
208 typedef std::pair<FeatureDataCallbackMap::const_iterator,
209 FeatureDataCallbackMap::const_iterator>
214 typedef boost::unordered_map<std::string, SortedCallbackRefSet>
223 typedef boost::unordered_map<std::string, std::vector<std::string> >
226 typedef boost::unordered_map<std::string,
265 static void registerInstance(
DtDe& de,
boost::unordered_map< osg::Node *, FeaturePageObserver * > MapPagesToObservers
Definition: DtOsgEarthFeatureDataBroker.h:234
boost::unordered_map< std::string, std::vector< std::string > >::iterator RegistrantToFeaturesMapIter
Definition: DtOsgEarthFeatureDataBroker.h:227
osg::ref_ptr< Callback > CallbackRefPtr
Definition: DtOsgEarthFeatureDataBroker.h:119
static const float OsgEarthDynamicTerrainInstallerOrder
Definition: DtOsgEarthFeatureDataBroker.h:48
virtual void onDataUnloaded(const osgEarth::Map *map, const osgEarth::Layer *layer, const osg::Node *oldData)
Definition: DtOsgEarthFeatureDataBroker.h:87
Virtual base class.
Definition: DtVirtualBaseClass.h:22
struct for holding the fade parameters used by the indirect rendering cull compute shader ...
Definition: DtGpuCullingAndLodDefines.h:21
std::pair< FeatureDataCallbackMap::iterator, FeatureDataCallbackMap::iterator > RangeIterFeatureDataCallbacks
Definition: DtOsgEarthFeatureDataBroker.h:207
osg::observer_ptr< osgEarth::MapNode > myMapNode
Definition: DtOsgEarthFeatureDataBroker.h:197
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
bool myShareState
Definition: DtOsgEarthFeatureDataBroker.h:201
static const float OsgEarthStreamedFeatureCallbackOrder
Definition: DtOsgEarthFeatureDataBroker.h:47
boost::unordered_multimap< std::string, CallbackRefPtr > FeatureDataCallbackMap
Definition: DtOsgEarthFeatureDataBroker.h:205
The DtOsgEarthFeatureDataBrokerCreator creator for the DtOsgEarthFeatureDataBroker class...
Definition: DtOsgEarthFeatureDataBroker.h:243
static const float OsgEarthEffectTextureInstallerCallbackOrder
Definition: DtOsgEarthFeatureDataBroker.h:46
osg::ref_ptr< osgEarth::SceneGraphCallback > SceneGraphCallbackRefPtr
Definition: DtOsgEarthFeatureDataBroker.h:196
boost::unordered_map< std::string, std::vector< std::string > > RegistrantToFeaturesMap
Definition: DtOsgEarthFeatureDataBroker.h:224
static const float DefaultOrder
Definition: DtOsgEarthFeatureDataBroker.h:45
static const char * theFeatureDataBrokerRegistrantToFeatureList
Definition: DtOsgEarthFeatureDataBroker.h:192
OpenThreads::Mutex myMapMutex
Definition: DtOsgEarthFeatureDataBroker.h:202
Definition: DtOsgEarthFeatureDataBroker.h:107
DtDe & getDe()
Definition: DtOsgEarthFeatureDataBroker.h:178
RegistrantToFeaturesMap myRegistrantToFeaturesMap
Definition: DtOsgEarthFeatureDataBroker.h:229
static const float OsgEarthLightPointInstallerOrder
Definition: DtOsgEarthFeatureDataBroker.h:49
boost::unordered_map< const osgEarth::Layer *, std::string > myFeatureNameLookup
Definition: DtOsgEarthFeatureDataBroker.h:232
DtOsgEarthFeatureDataBroker listens to osgEarth feature layers (i.e.
Definition: DtOsgEarthFeatureDataBroker.h:60
MapPagesToObservers myMapPagesToObservers
Definition: DtOsgEarthFeatureDataBroker.h:235
DtDe & myDe
Definition: DtOsgEarthFeatureDataBroker.h:200
Contains makVrv::DtVirtualBaseClass class.
SortedCallbackRefSet myAllFeatureCallbacks
Definition: DtOsgEarthFeatureDataBroker.h:221
std::pair< FeatureDataCallbackMap::const_iterator, FeatureDataCallbackMap::const_iterator > ConstRangeIterFeatureDataCallbacks
Definition: DtOsgEarthFeatureDataBroker.h:210
std::set< SceneGraphCallbackRefPtr > myOperations
Definition: DtOsgEarthFeatureDataBroker.h:199
OpenThreads::Mutex Mutex
Definition: DtOsgThreadingUtils.h:12
std::set< CallbackRefPtr, CallbackSortFunction > SortedCallbackRefSet
Definition: DtOsgEarthFeatureDataBroker.h:120
Declarations for classes used in DtICullingAndLOD.
DtOsgShaderManager injects custom shaders into the scenes, and keeps their uniform parameters set to ...
Definition: DtOsgShaderManager.h:55
Definition: DtOsgEarthFeatureDataBroker.h:65
Contains DLL export macros.
DtOsgShaderManager & myShaderManager
Definition: DtOsgEarthFeatureDataBroker.h:237
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
osg::ref_ptr< osgEarth::MapCallback > myMapCallback
Definition: DtOsgEarthFeatureDataBroker.h:198
LayerToCallbackMap myLayerToCallbackMap
Definition: DtOsgEarthFeatureDataBroker.h:217
boost::unordered_map< std::string, SortedCallbackRefSet > LayerToCallbackMap
Definition: DtOsgEarthFeatureDataBroker.h:215
bool operator()(Callback *a, Callback *b) const
Definition: DtOsgEarthFeatureDataBroker.h:110
virtual float callbackOrder()
used to specify an order that the callbacks should run.
Definition: DtOsgEarthFeatureDataBroker.h:93
FeatureDataCallbackMap myFeatureDataCallbacks
Definition: DtOsgEarthFeatureDataBroker.h:212