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
69 virtual void onLayerLoaded(
const osgEarth::MapNode* mapNode,
70 osgEarth::Layer* layer) =0;
73 virtual void onLayerOpened(
const osgEarth::MapNode* mapNode,
74 osgEarth::Layer* layer);
77 virtual void onLayerClosed(
const osgEarth::MapNode* mapNode,
78 osgEarth::Layer* layer);
82 virtual void onDataPreMerge(
const osgEarth::Layer* layer,
83 osg::Node* newData) = 0;
87 virtual void onDataLoaded(
const osgEarth::Layer* layer,
88 const osg::Node* newData) = 0;
94 virtual void onDataUnloaded(
const osgEarth::Layer* layer,
const osg::Node* oldData);
98 virtual float callbackOrder();
105 virtual const std::string& instanceClassName()
const = 0;
109 static bool isModelLayer(
const osgEarth::Layer* layer);
147 void addCallback(
const std::string& registrant,
Callback* cb);
151 void setOptimizeStateSharing(
bool value);
152 bool isOptimizeStateSharing()
const;
159 void addLayer(osgEarth::Layer* layer);
163 void notifyNewLayer(osgEarth::Layer* layer);
167 void notifyLayerOpened(osgEarth::Layer* layer);
171 void notifyLayerClosed(osgEarth::Layer* layer);
175 bool layerHasCallback(
const osgEarth::Layer* layer,
const std::string& className);
181 void notifyPreMergeData(osgEarth::Layer* layer, osg::Node* node);
186 void notifyNewData(osgEarth::Layer* layer, osg::Node* data);
190 void notifyDataDeleted(osgEarth::Layer* layer, osg::Node* data);
201 bool readFeatureNameRegistrationFile(
const std::string& path,
206 std::string getFeatureNameFromLayer(
const osgEarth::Layer& layer );
220 typedef boost::unordered_multimap<std::string, CallbackRefPtr>
222 typedef std::pair<FeatureDataCallbackMap::iterator,
224 typedef std::pair<FeatureDataCallbackMap::const_iterator,
225 FeatureDataCallbackMap::const_iterator>
230 typedef boost::unordered_map<std::string, SortedCallbackRefSet>
239 typedef boost::unordered_map<std::string, std::vector<std::string> >
242 typedef boost::unordered_map<std::string,
281 static void registerInstance(
DtDe& de,
boost::unordered_map< osg::Node *, FeaturePageObserver * > MapPagesToObservers
Definition: DtOsgEarthFeatureDataBroker.h:250
boost::unordered_map< std::string, std::vector< std::string > >::iterator RegistrantToFeaturesMapIter
Definition: DtOsgEarthFeatureDataBroker.h:243
osg::ref_ptr< Callback > CallbackRefPtr
Definition: DtOsgEarthFeatureDataBroker.h:125
static const float OsgEarthDynamicTerrainInstallerOrder
Definition: DtOsgEarthFeatureDataBroker.h:48
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
std::pair< FeatureDataCallbackMap::iterator, FeatureDataCallbackMap::iterator > RangeIterFeatureDataCallbacks
Definition: DtOsgEarthFeatureDataBroker.h:223
osg::observer_ptr< osgEarth::MapNode > myMapNode
Definition: DtOsgEarthFeatureDataBroker.h:213
#define DT_DLL_VRVOSG
Definition: vrvOsg.h:23
bool myShareState
Definition: DtOsgEarthFeatureDataBroker.h:217
static const float OsgEarthStreamedFeatureCallbackOrder
Definition: DtOsgEarthFeatureDataBroker.h:47
boost::unordered_multimap< std::string, CallbackRefPtr > FeatureDataCallbackMap
Definition: DtOsgEarthFeatureDataBroker.h:221
The DtOsgEarthFeatureDataBrokerCreator creator for the DtOsgEarthFeatureDataBroker class...
Definition: DtOsgEarthFeatureDataBroker.h:259
static const float OsgEarthEffectTextureInstallerCallbackOrder
Definition: DtOsgEarthFeatureDataBroker.h:46
osg::ref_ptr< osgEarth::SceneGraphCallback > SceneGraphCallbackRefPtr
Definition: DtOsgEarthFeatureDataBroker.h:212
boost::unordered_map< std::string, std::vector< std::string > > RegistrantToFeaturesMap
Definition: DtOsgEarthFeatureDataBroker.h:240
static const float DefaultOrder
Definition: DtOsgEarthFeatureDataBroker.h:45
static const char * theFeatureDataBrokerRegistrantToFeatureList
Definition: DtOsgEarthFeatureDataBroker.h:208
OpenThreads::Mutex myMapMutex
Definition: DtOsgEarthFeatureDataBroker.h:218
Definition: DtOsgEarthFeatureDataBroker.h:112
DtDe & getDe()
get the De
Definition: DtOsgEarthFeatureDataBroker.h:193
RegistrantToFeaturesMap myRegistrantToFeaturesMap
Definition: DtOsgEarthFeatureDataBroker.h:245
static const float OsgEarthLightPointInstallerOrder
Definition: DtOsgEarthFeatureDataBroker.h:49
boost::unordered_map< const osgEarth::Layer *, std::string > myFeatureNameLookup
Definition: DtOsgEarthFeatureDataBroker.h:248
DtOsgEarthFeatureDataBroker listens to osgEarth feature layers (i.e. model layers with a feature sour...
Definition: DtOsgEarthFeatureDataBroker.h:60
MapPagesToObservers myMapPagesToObservers
Definition: DtOsgEarthFeatureDataBroker.h:251
DtDe & myDe
Definition: DtOsgEarthFeatureDataBroker.h:216
Contains makVrv::DtVirtualBaseClass class.
SortedCallbackRefSet myAllFeatureCallbacks
Definition: DtOsgEarthFeatureDataBroker.h:237
std::pair< FeatureDataCallbackMap::const_iterator, FeatureDataCallbackMap::const_iterator > ConstRangeIterFeatureDataCallbacks
Definition: DtOsgEarthFeatureDataBroker.h:226
std::set< SceneGraphCallbackRefPtr > myOperations
Definition: DtOsgEarthFeatureDataBroker.h:215
struct for holding the fade parameters used by the indirect rendering cull compute shader ...
Definition: DtIndirectFadeParameters.h:17
OpenThreads::Mutex Mutex
Definition: DtOsgThreadingUtils.h:12
std::set< CallbackRefPtr, CallbackSortFunction > SortedCallbackRefSet
Definition: DtOsgEarthFeatureDataBroker.h:126
DtOsgShaderManager injects custom shaders into the scenes, and keeps their uniform parameters set to ...
Definition: DtOsgShaderManager.h:41
Definition: DtOsgEarthFeatureDataBroker.h:65
Contains DLL export macros.
DtOsgShaderManager & myShaderManager
Definition: DtOsgEarthFeatureDataBroker.h:253
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:70
osg::ref_ptr< osgEarth::MapCallback > myMapCallback
Definition: DtOsgEarthFeatureDataBroker.h:214
LayerToCallbackMap myLayerToCallbackMap
Definition: DtOsgEarthFeatureDataBroker.h:233
boost::unordered_map< std::string, SortedCallbackRefSet > LayerToCallbackMap
Definition: DtOsgEarthFeatureDataBroker.h:231
bool operator()(Callback *a, Callback *b) const
Definition: DtOsgEarthFeatureDataBroker.h:116
virtual float callbackOrder()
used to specify an order that the callbacks should run. Defaults to 1.0; lower callbacks are run firs...
Contains makVrv::DtIndirectFadeParameters class.
FeatureDataCallbackMap myFeatureDataCallbacks
Definition: DtOsgEarthFeatureDataBroker.h:228