![]() |
VR-Forces 4.10 Class Documentation
|
Manager that adds, clears, activates/deactives groups (if any) read in by the DtPaperMapCallback The idea is to have annotations in the .earth file which allows osgEarth layers derived from osgEarth::VisibleLayer to be associated with a group so that layers can be turned on and off at the same time A layer can be part of more than one group Use the mapgroup osgEarth layer attribute like this: <mapgroup>air,naval,default</mapgroup> This means that this osgEarth layer is part of an air map group, a naval map group and a default group visible in both 2d (ex. More...

Public Types | |
| enum | ShowIn { SHOW_IN_2D_AND_3D, SHOW_IN_2D, SHOW_IN_3D } |
Public Types inherited from makVrv::DtTickable | |
| enum | TickableListState { TickableNotOnList, TickableOnMainList, TickableOnThreadSafeList } |
| Enumeration used to indicate which DtTickableManager's tickable list the tickable is on, if any. More... | |
Public Member Functions | |
| DtOsgEarthPaperMapManager ()=delete | |
| CTOR (unimplemented default CTOR) More... | |
| virtual | ~DtOsgEarthPaperMapManager () |
| DTOR. More... | |
| DtOsgEarthPaperMapManager (DtOsgEarthPaperMapManager &in)=delete | |
| Copy Constructor not implemented - Copy not allowed. More... | |
| DtOsgEarthPaperMapManager & | operator= (const DtOsgEarthPaperMapManager &)=delete |
| Assignment Operator not implemented - Assignment not allowed. More... | |
| virtual void | addToGroups (std::string groupStr, osgEarth::VisibleLayer *layer, bool isect) |
| Processes the mapgroup string (ex. More... | |
| virtual void | addToGroup (std::string groupName, osgEarth::VisibleLayer *layer, bool isect) |
| Helper function for addToGroups, add a layer to a single group and marks whether the group should be visible in 3D. More... | |
| virtual void | activateGroup (std::string groupName) |
| Set the layer masks for a particular group so that it is visible. More... | |
| std::string | activeGroup () |
| Get the name of the currently active group (or "default" if none selected) More... | |
| virtual void | reset () |
| Turn off all groups and clear out data structures for which groups has which osgEarth layers. More... | |
| virtual void | resetGroupMasks () |
| Go through all the groups and layers and mark them as invisible. More... | |
| virtual void | enableAllGroupMasks () |
| Go through all the groups and make them visible (ex. if feature is off) More... | |
| virtual void | defaultGroupMasksVisible (ShowIn show) |
| Set whether the default group is shown in 2D, 3D, or both. More... | |
| virtual bool | hasGroup (std::string groupName) |
| Do we know about this group name? More... | |
| virtual void | updateAnyObserver3D () |
| Is any observer in 3D? More... | |
| virtual void | addLayer (osgEarth::Layer *layer) |
| Add a layer to our manager and see if it has any mapgroup keywords. More... | |
| virtual void | removeLayer (osgEarth::Layer *layer) |
| Remove a layer from the manager. More... | |
| virtual void | printState () |
| Print out all the group names and layer pointers. More... | |
| virtual std::vector< std::string > | groupNames () |
| Get all the group names. More... | |
| virtual void | update (DtTime tNow) override |
| The update function called by DtTickableManager during update-ticks. More... | |
| virtual void | closeLayer (osgEarth::VisibleLayer *layer) |
| Put a layer on a list to be deleted after a time out (ex. 40 seconds) More... | |
| virtual void | openLayer (osgEarth::VisibleLayer *layer) |
| Open a layer and take it off the about-to-close list. More... | |
| virtual DtTime | lastUpdateTime () const |
| Get the time-stamp of the last update. More... | |
| virtual std::vector< std::string > | getGroupsForLayer (osgEarth::VisibleLayer *layer) |
| Find the groups associated with this layer. More... | |
| virtual bool | layerInActiveGroup (osgEarth::VisibleLayer *layer) |
| Is this layer in an active group? More... | |
| virtual void | removeGroup (std::string groupName) |
| Remove the layers in this group from all our tracking data structures and then remove the group. More... | |
Public Member Functions inherited from makVrv::DtTickable | |
| virtual bool | needsUpdate (DtTime tNow) |
| The check function called by DtTickableManager to verify if an update is required. More... | |
| virtual bool | updateIfNeeded (DtTime tNow) |
| Calls needsUpdate(), and then calls update() if needsUpdate() is true. More... | |
| virtual | ~DtTickable () |
| Virtual DTOR. More... | |
| virtual void | setIsThreadSafe (bool safe) |
| Get/set whether this tickable can be updated in parallel with other tickables. More... | |
| virtual bool | isThreadSafe () const |
| virtual void | setTickableListState (TickableListState safeList) |
| Track which tickable list (if any) this tickable is on Since the tickable constructor puts ALL tickables on the main (unThreadSafe) to start we need a way to check which list a tickable is on (and this way we can request removals from the correct list instead of having to call DtTickableManager::removeTickableObject(), which tries both lists). More... | |
| virtual TickableListState | tickableListState () const |
| virtual void | setUpdatePeriod (unsigned int period) |
| Specify how often (in # of frames) this tickable should call update. More... | |
| virtual unsigned int | updatePeriod () const |
| virtual bool | lodSystemEnabled () const |
| is the update LOD system enabled, overridden by subclasses More... | |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| Do nothing constructor. More... | |
| virtual | ~DtVirtualBaseClass () |
| Virtual do nothing destructor. More... | |
Static Public Member Functions | |
| static DtOsgEarthPaperMapManager & | instance (DtDe &de) |
| Get/create instance of layer visibility manager. More... | |
| static const std::string & | theClassName () |
| Get the name this class is registered by. More... | |
Protected Types | |
| typedef std::map < DtObserverObject *, bool > | ObserverObj2DMap |
| typedef std::set < osgEarth::VisibleLayer * > | PaperMapLayerSet |
| typedef std::map< std::string, PaperMapLayerSet > | GroupLayerMap |
| typedef std::map < osgEarth::VisibleLayer *, bool > | LayerBoolMap |
| typedef std::map < osgEarth::VisibleLayer *, DtTime > | LayerTimeMap |
Protected Member Functions | |
| DtOsgEarthPaperMapManager (DtDe &de) | |
| CTOR. Protected. Only creator can create. More... | |
| virtual void | slot_paperMapEnabledChanged (bool setting) |
| Turn this feature on, off. More... | |
| virtual void | slot_paperMapLayerTimeoutChanged (double timeout) |
| Set the timeout before a non-visible layer is closed. More... | |
| virtual void | slot_observerAdded (const std::string &observerName) |
| Detect when a new observer is created so we can monitor if it is 2D or 3D. More... | |
| virtual void | slot_observerRemoved (const std::string &observerName) |
| Detect when a new observer is destroyed so we can stop monitoring it. More... | |
| virtual void | slot_onCurrentObserverChanged (DtInputDriver *inputDriver, DtObserver *observer) |
| Detect when the current observer changes. More... | |
| virtual void | slot_observerGroupChanged (DtObserver *observer, std::string obsGroup) |
| Did the current observer change is paper map layer (from loading an observer view) More... | |
| virtual void | slot_projectionChanged (DtObserverObject *observer, bool is2D) |
| Called by signal when an observer's projection (3D/2D) changes. More... | |
| virtual void | slot_osgEarthMapNodeFound (DtTerrainPatchObject &tpo) |
| Add some callbacks when a new map node is found. More... | |
| virtual void | slot_terrainPatchAboutToBeDeleted (DtTerrainPatchObject &patch) |
| Another signal for when a terrain is destroyed. More... | |
| virtual void | slot_paperMapIntersectionOverrideChanged (bool setting) |
| Set all layers to intersect when not visible (not just if the layer in the osgEarth file has a <mapgroup_intersect> annotation. More... | |
Protected Member Functions inherited from makVrv::DtTickable | |
| DtTickable (DtTickableManagerInterface *manager) | |
| CTOR. More... | |
| DtTickable () | |
| Unimplemented default CTOR. More... | |
| virtual void | slot_managerAboutToBeDeleted () |
Protected Attributes | |
| DtDe & | myDe |
| DtSignalConnectionManager | myConnections |
| GroupLayerMap | myGroupMap |
| LayerBoolMap | myLayerIsInDefault |
| LayerBoolMap | myGroupIsect |
| std::string | myActiveGroupName |
| ObserverObj2DMap | myObserverObj2DMap |
| bool | myAnyObserverIn3D |
| LayerTimeMap | myLayerTime |
| double | myLayerTimeOut |
| bool | myPaperMapFeatureEnabled |
| bool | myIntersectionOverride |
| DtObserver * | myCurrentObserver |
Protected Attributes inherited from makVrv::DtTickable | |
| DtTickableManagerInterface * | myManager |
| Pointer to manager for removal during destruction. More... | |
| DtSignalConnectionManager | myConnections |
| unsigned int | myFrameCounter |
| unsigned int | myFrameToUpdate |
| unsigned int | myUpdatePeriod |
| DtTime | myLastUpdateTime |
| bool | myIsThreadSafe |
| TickableListState | myTickableListState |
Friends | |
| class | DtOsgEarthPaperMapManagerCreator |
| Friended with creator so that it can use our constructor. More... | |
Manager that adds, clears, activates/deactives groups (if any) read in by the DtPaperMapCallback The idea is to have annotations in the .earth file which allows osgEarth layers derived from osgEarth::VisibleLayer to be associated with a group so that layers can be turned on and off at the same time A layer can be part of more than one group Use the mapgroup osgEarth layer attribute like this: <mapgroup>air,naval,default</mapgroup> This means that this osgEarth layer is part of an air map group, a naval map group and a default group visible in both 2d (ex.
plan view) and 3d (ex. stealth) There is a Paper Map Toolbar which selects which group to view in the UI
There is also another way to make layers visible in only 2D or 3D You can use a mask attribute directly in a layer without specifying a mapgroup Elements that should not be visible in 3D views have mask set like: <GDALImage ... mask="4294950911">...</GDALImage> Elements that should not be be visible in 2D have mask set like: <FeatureModel ... mask="4294959103">...</FeatureModel>
The mask settings works on any osgEarth class derived from VisibleLayer The numbers have to be 4294959103 for not being visible in 2D but visible in 3D 4294950911 for not being visible in 3D but visible in 2D 4294959103 = 11111111111111111101111111111111 = FlagPaperMap2DViewOff 4294950911 = 11111111111111111011111111111111 = FlagPaperMap3DViewOff
You can also flag a VisibleLayer to participate in intersections even when a group turns off other layers by using the annotation: <mapgroup_isect>true</mapgroup_isect>
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
delete |
CTOR (unimplemented default CTOR)
|
virtual |
DTOR.
|
delete |
Copy Constructor not implemented - Copy not allowed.
|
protected |
CTOR. Protected. Only creator can create.
|
delete |
Assignment Operator not implemented - Assignment not allowed.
|
virtual |
Processes the mapgroup string (ex.
"air, naval,default"), adds that layer to the groups, and identifies if the layer should be visible in 3D
|
virtual |
Helper function for addToGroups, add a layer to a single group and marks whether the group should be visible in 3D.
|
virtual |
Set the layer masks for a particular group so that it is visible.
| std::string makVrv::DtOsgEarthPaperMapManager::activeGroup | ( | ) |
Get the name of the currently active group (or "default" if none selected)
|
virtual |
Turn off all groups and clear out data structures for which groups has which osgEarth layers.
|
virtual |
Go through all the groups and layers and mark them as invisible.
|
virtual |
Go through all the groups and make them visible (ex. if feature is off)
|
virtual |
Set whether the default group is shown in 2D, 3D, or both.
|
virtual |
Do we know about this group name?
|
virtual |
Is any observer in 3D?
|
virtual |
Add a layer to our manager and see if it has any mapgroup keywords.
|
virtual |
Remove a layer from the manager.
|
virtual |
Print out all the group names and layer pointers.
|
virtual |
Get all the group names.
|
overridevirtual |
The update function called by DtTickableManager during update-ticks.
| [in] | tNow | is the current time-stamp. |
Implements makVrv::DtTickable.
|
virtual |
Put a layer on a list to be deleted after a time out (ex. 40 seconds)
|
virtual |
Open a layer and take it off the about-to-close list.
|
virtual |
Get the time-stamp of the last update.
|
virtual |
Find the groups associated with this layer.
|
virtual |
Is this layer in an active group?
|
virtual |
Remove the layers in this group from all our tracking data structures and then remove the group.
|
protectedvirtual |
Turn this feature on, off.
|
protectedvirtual |
Set the timeout before a non-visible layer is closed.
|
protectedvirtual |
Detect when a new observer is created so we can monitor if it is 2D or 3D.
|
protectedvirtual |
Detect when a new observer is destroyed so we can stop monitoring it.
|
protectedvirtual |
Detect when the current observer changes.
|
protectedvirtual |
Did the current observer change is paper map layer (from loading an observer view)
|
protectedvirtual |
Called by signal when an observer's projection (3D/2D) changes.
|
protectedvirtual |
Add some callbacks when a new map node is found.
|
protectedvirtual |
Another signal for when a terrain is destroyed.
|
protectedvirtual |
Set all layers to intersect when not visible (not just if the layer in the osgEarth file has a <mapgroup_intersect> annotation.
|
static |
Get/create instance of layer visibility manager.
|
static |
Get the name this class is registered by.
|
friend |
Friended with creator so that it can use our constructor.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |