VR-Forces 4.10 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
makVrv::DtOsgEarthDynamicTerrainFeature Class Reference

DtOsgEarthDynamicTerrainFeature is a special DtDynamicTerrainFeature which listens to all the dynamic terrain change requests and translates them into osgEarth specific dynamic terrain layers. More...

Inheritance diagram for makVrv::DtOsgEarthDynamicTerrainFeature:
Inheritance graph
[legend]

Public Member Functions

 DtOsgEarthDynamicTerrainFeature (osgEarth::MapNode *mapNode, DtDe &de)
 constructor More...
 
virtual ~DtOsgEarthDynamicTerrainFeature ()
 destructor More...
 
 DtOsgEarthDynamicTerrainFeature ()=delete
 default constructor not implemented More...
 
 DtOsgEarthDynamicTerrainFeature (const DtOsgEarthDynamicTerrainFeature &other)=delete
 Copy Constructor not implemented – Copy Not Allowed. More...
 
DtOsgEarthDynamicTerrainFeatureoperator= (const DtOsgEarthDynamicTerrainFeature &other)=delete
 Assignment Operator Not implemented – Assignment Not Allowed. More...
 
virtual DtString description () const override
 Feature description functions Allows feature to describe itself (for a gui mostly). More...
 
virtual const
DtDynamicTerrainGeometry
geometry () const override
 geometry for this feature. Currently always null since osgEarth cares about all of them More...
 
virtual bool matches (const DtDynamicTerrainChange &command, bool useOriginalGeometry) const override
 check to see if this feature cares about this command (checks state to see if it is in the command) More...
 
virtual bool matches (const DtDynamicTerrainGeometry &geometry, bool useOriginalGeometry) const override
 always true since this feature cares about More...
 
virtual void changeState (const DtDynamicTerrainChanges &changes) override
 apply a change state. DtDynamicTerrainFeature pure virtual method implementation More...
 
virtual void setCraterState (const DtDynamicTerrainChange &command)
 set the state for this crater state change on the dynamic terrain More...
 
virtual void setPersistentTrackState (const DtDynamicTerrainChange &command)
 set the state for this persistent track state change on the dynamic terrain More...
 
virtual bool isInDefaultState () const
 for now it is never in the default state More...
 
virtual bool lastStateWasDefaultState () const
 for now there is never a last default state of true either More...
 
virtual void iterateCommands (const boost::function< void(const DtDynamicTerrainChange &)> &callback) const override
 This is currently called by the dynamic terrain page logic. More...
 
virtual void reloadShaders ()
 hooked up to the shared state signal for reloading the shaders and reloads the track layer shaders More...
 
virtual void buildTrackStyleMap ()
 search the model definitions for Persistent Tracks definitions and build a style for each More...
 
virtual const osgEarth::Style * findPersistentTrackStyle (const std::string &trackType, const std::string &soilType, const std::string &trackDepth) const
 find the style for the track based on the parameters. More...
 
- Public Member Functions inherited from makVrv::DtDynamicTerrainFeature
 DtDynamicTerrainFeature ()
 Default Constructor. More...
 
virtual ~DtDynamicTerrainFeature ()
 Virtual destructor. More...
 
virtual const
DtDynamicTerrainGeometry
originalGeometry () const
 Unprocessed geometry. More...
 
virtual boost::optional< DtStringfeatureAttribute (const DtString &key) const
 Access attribute values encoded into features. More...
 
virtual void iterateCommands (const boost::function< void(const DtDynamicTerrainChange &)> &callback, const DtString &key) const
 
void changed ()
 Calls changeState and all attached query callbacks. More...
 
bool pageOut ()
 Remove all change requests links and remove feature from dynamic terrain world. More...
 
void changes (const boost::function< void(const DtDynamicTerrainChanges &)> &callback) const
 Calls supplied callback on this features DtDynamicTerrainChanges interface. More...
 
RequestHandle addChangeRequest (DtDynamicTerrainChange *change)
 Add a change request directly to this feature. More...
 
RequestHandle addChangeRequest (double time, DtDynamicTerrainChange *change)
 
virtual ~Link ()
 
RequestInforequest ()
 
DtDynamicTerrainFeaturefeature ()
 
 RequestInfo (DtDynamicTerrainChange *command)
 
virtual ~RequestInfo ()
 
const DtDynamicTerrainChangecommand () const
 
void pageOut ()
 
virtual const
DtDynamicTerrainFeature
parentFeature () const
 
virtual
boost::signalslib::connection 
connectToChangeSignal (const ChangeCallback &callback) const
 Call callback when feature state is changed. More...
 
virtual
boost::signalslib::connection 
connectToPageOutSignal (const Callback &callback) const
 Call callback when feature is removed. More...
 
- Public Member Functions inherited from makVrv::DtDisconnectable
 DtDisconnectable ()
 Default constructor. More...
 
virtual ~DtDisconnectable ()
 Destructor. More...
 
virtual
boost::signalslib::connection 
addDisconnectFunction (const boost::function< void()> &callback)
 Add a function to be called when callDisconnectFunctions is called. More...
 
virtual bool callDisconnectFunctions ()
 Atomically call all the disconnect functions and mark this object as disconnected. More...
 

Protected Types

typedef osg::ref_ptr< osg::Image > ImageRef
 
- Protected Types inherited from makVrv::DtDisconnectable
enum  State { NotUsed, InUse, Disconnected }
 
typedef tbb::spin_mutex Mutex
 

Protected Member Functions

virtual void processChanges (const DtDynamicTerrainChange &command)
 helper function for applying a change state. More...
 
virtual void removeTerrainChange (const DtDynamicTerrainChange &change) override
 Remove a terrain change calls the more specific terrain change function based on the change. More...
 
virtual void removeTerrainCraterChange (const DtDynamicTerrainChange &change)
 Remove a crater change state. More...
 
virtual void removeTerrainPersistentTrackChange (const DtDynamicTerrainChange &change)
 Remove a persistent track change state. More...
 
virtual void sendTrackUpdates ()
 send the osgEarth Features down to the RoadSurfaceLayer for the tracks. More...
 
virtual bool parseTrackParameters (const DtDynamicTerrainChange &change, std::string &trackId, std::string &trackType, std::string &soilType, std::string &trackDepth) const
 utility function for reading the parameters for a track change into strings More...
 
virtual void slot_observerSettingRemoved (DtObserverObject *observer, int setting)
 Check to see if the show treads setting changed and setup the myTrackUpdatesEnabled based on the setting. More...
 
virtual void slot_observerSettingChanged (DtObserverObject *observer, int setting, bool value)
 Check to see if the show treads setting changed and setup the myTrackUpdatesEnabled based on the setting. More...
 
virtual void setupTrackUpdatesEnabled ()
 Update the myTrackUpdatesEnabled flag based on the show treads observer mode settings for the active observer objects. More...
 
- Protected Member Functions inherited from makVrv::DtDynamicTerrainFeature
void indexDoubleAscending (const DtString &key)
 Key/value attribute indexing. More...
 
void indexDoubleDescending (const DtString &key)
 
void indexIntAscending (const DtString &key)
 
void indexIntDescending (const DtString &key)
 
void indexStringAscending (const DtString &key)
 
void indexStringDescending (const DtString &key)
 
void setupIndex (const DtString &key, DtDynamicTerrainIndex *index)
 

Protected Attributes

const DtString myCraterStateName
 
const DtString myTracksStateName
 
osg::ref_ptr< osgEarth::MapNode > myMapNode
 
int myChangeCount
 
osg::ref_ptr
< osgEarth::Contrib::DecalImageLayer > 
myDecalImageLayer
 
osg::ref_ptr
< osgEarth::Contrib::DecalElevationLayer > 
myDecalElevLayer
 
osg::ref_ptr
< osgEarth::Contrib::DecalLandCoverLayer > 
myDecalLandCoverLayer
 
osg::ref_ptr
< osgEarth::Splat::RoadSurfaceLayer > 
myTracksLayer
 
osg::ref_ptr
< DtOsgEarthMemoryFeatureSource
myFeatureSource
 
std::map< std::string,
osg::ref_ptr
< osgEarth::Feature > > 
myGeometryRefs
 
osg::ref_ptr
< osgEarth::VirtualProgram > 
myTerrainEngineVirtualProgram
 
DtDemyDe
 
DtDynamicTerrainRasterLibrarymyRasterLibrary
 
osgEarth::LandCoverDictionary * myLandCoverDictionary
 
DtSignalConnectionManager myConnections
 
TrackTypeToStyleMap myTrackTypeToStyleMap
 
bool myTrackUpdatesEnabled
 
- Protected Attributes inherited from makVrv::DtDisconnectable
Mutex myMutex
 
State myDisconnectedState
 
boost::signalslib::signal< void()> myDisconnectSignal
 

Additional Inherited Members

- Public Types inherited from makVrv::DtDynamicTerrainFeature
typedef boost::function< void(const
DtDynamicTerrainFeature &)> 
Callback
 Signal notification. More...
 
typedef boost::function< void(const
DtDynamicTerrainFeature
&, const
DtDynamicTerrainChanges &)> 
ChangeCallback
 
- Static Public Member Functions inherited from makVrv::DtDynamicTerrainFeature
static unsigned long long GetObjectCount ()
 
static unsigned long long GetObjectCount ()
 
static bool Create (const boost::shared_ptr< DtDynamicTerrainFeature > &featureInfo, const boost::shared_ptr< RequestInfo > &reqInfo)
 
static unsigned long long GetObjectCount ()
 

Detailed Description

DtOsgEarthDynamicTerrainFeature is a special DtDynamicTerrainFeature which listens to all the dynamic terrain change requests and translates them into osgEarth specific dynamic terrain layers.

Explosive crater changes are turned into decals on the imagery, elevation, and land use layers. Persistant Vehicle Tracks are turned into features which are passed to a RoadSurfaceLayer for baking into an imagery layer

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtOsgEarthDynamicTerrainFeature::DtOsgEarthDynamicTerrainFeature ( osgEarth::MapNode *  mapNode,
DtDe de 
)
explicit

constructor

virtual makVrv::DtOsgEarthDynamicTerrainFeature::~DtOsgEarthDynamicTerrainFeature ( )
virtual

destructor

makVrv::DtOsgEarthDynamicTerrainFeature::DtOsgEarthDynamicTerrainFeature ( )
delete

default constructor not implemented

makVrv::DtOsgEarthDynamicTerrainFeature::DtOsgEarthDynamicTerrainFeature ( const DtOsgEarthDynamicTerrainFeature other)
delete

Copy Constructor not implemented – Copy Not Allowed.

Member Function Documentation

DtOsgEarthDynamicTerrainFeature& makVrv::DtOsgEarthDynamicTerrainFeature::operator= ( const DtOsgEarthDynamicTerrainFeature other)
delete

Assignment Operator Not implemented – Assignment Not Allowed.

virtual DtString makVrv::DtOsgEarthDynamicTerrainFeature::description ( ) const
overridevirtual

Feature description functions Allows feature to describe itself (for a gui mostly).

These can all be called from query callbacks. None of the values returned by these functions have any meaning besides informational. A description of what is in the feature, how it is setup, configuration, etc.

Implements makVrv::DtDynamicTerrainFeature.

virtual const DtDynamicTerrainGeometry* makVrv::DtOsgEarthDynamicTerrainFeature::geometry ( ) const
overridevirtual

geometry for this feature. Currently always null since osgEarth cares about all of them

Implements makVrv::DtDynamicTerrainFeature.

virtual bool makVrv::DtOsgEarthDynamicTerrainFeature::matches ( const DtDynamicTerrainChange command,
bool  useOriginalGeometry 
) const
overridevirtual

check to see if this feature cares about this command (checks state to see if it is in the command)

Implements makVrv::DtDynamicTerrainFeature.

virtual bool makVrv::DtOsgEarthDynamicTerrainFeature::matches ( const DtDynamicTerrainGeometry geometry,
bool  useOriginalGeometry 
) const
overridevirtual

always true since this feature cares about

Implements makVrv::DtDynamicTerrainFeature.

virtual void makVrv::DtOsgEarthDynamicTerrainFeature::changeState ( const DtDynamicTerrainChanges changes)
overridevirtual

apply a change state. DtDynamicTerrainFeature pure virtual method implementation

Implements makVrv::DtDynamicTerrainFeature.

virtual void makVrv::DtOsgEarthDynamicTerrainFeature::setCraterState ( const DtDynamicTerrainChange command)
virtual

set the state for this crater state change on the dynamic terrain

virtual void makVrv::DtOsgEarthDynamicTerrainFeature::setPersistentTrackState ( const DtDynamicTerrainChange command)
virtual

set the state for this persistent track state change on the dynamic terrain

virtual bool makVrv::DtOsgEarthDynamicTerrainFeature::isInDefaultState ( ) const
virtual

for now it is never in the default state

Implements makVrv::DtDynamicTerrainFeature.

virtual bool makVrv::DtOsgEarthDynamicTerrainFeature::lastStateWasDefaultState ( ) const
virtual

for now there is never a last default state of true either

Implements makVrv::DtDynamicTerrainFeature.

virtual void makVrv::DtOsgEarthDynamicTerrainFeature::iterateCommands ( const boost::function< void(const DtDynamicTerrainChange &)> &  callback) const
overridevirtual

This is currently called by the dynamic terrain page logic.

We haven't decided what (if any) behavior we might want here, but we don't want the default, so we override this for now and do nothing

Reimplemented from makVrv::DtDynamicTerrainFeature.

virtual void makVrv::DtOsgEarthDynamicTerrainFeature::reloadShaders ( )
virtual

hooked up to the shared state signal for reloading the shaders and reloads the track layer shaders

virtual void makVrv::DtOsgEarthDynamicTerrainFeature::buildTrackStyleMap ( )
virtual

search the model definitions for Persistent Tracks definitions and build a style for each

virtual const osgEarth::Style* makVrv::DtOsgEarthDynamicTerrainFeature::findPersistentTrackStyle ( const std::string &  trackType,
const std::string &  soilType,
const std::string &  trackDepth 
) const
virtual

find the style for the track based on the parameters.

trackType is required to match exactly this function will try to find styles with and without the soilType and the trackDepth. If there is an entry with all 3 keys that will match first then it will look for just trackType and soilType, then it will look for trackType and trackDepth lastly it will try and find a style for just this trackType.

virtual void makVrv::DtOsgEarthDynamicTerrainFeature::processChanges ( const DtDynamicTerrainChange command)
protectedvirtual

helper function for applying a change state.

virtual void makVrv::DtOsgEarthDynamicTerrainFeature::removeTerrainChange ( const DtDynamicTerrainChange change)
overrideprotectedvirtual

Remove a terrain change calls the more specific terrain change function based on the change.

Reimplemented from makVrv::DtDynamicTerrainFeature.

virtual void makVrv::DtOsgEarthDynamicTerrainFeature::removeTerrainCraterChange ( const DtDynamicTerrainChange change)
protectedvirtual

Remove a crater change state.

virtual void makVrv::DtOsgEarthDynamicTerrainFeature::removeTerrainPersistentTrackChange ( const DtDynamicTerrainChange change)
protectedvirtual

Remove a persistent track change state.

virtual void makVrv::DtOsgEarthDynamicTerrainFeature::sendTrackUpdates ( )
protectedvirtual

send the osgEarth Features down to the RoadSurfaceLayer for the tracks.

This needs to be done when the show treads setting changes to true on at least one observer or if it is true then when a new track update comes across the network

virtual bool makVrv::DtOsgEarthDynamicTerrainFeature::parseTrackParameters ( const DtDynamicTerrainChange change,
std::string &  trackId,
std::string &  trackType,
std::string &  soilType,
std::string &  trackDepth 
) const
protectedvirtual

utility function for reading the parameters for a track change into strings

virtual void makVrv::DtOsgEarthDynamicTerrainFeature::slot_observerSettingRemoved ( DtObserverObject observer,
int  setting 
)
protectedvirtual

Check to see if the show treads setting changed and setup the myTrackUpdatesEnabled based on the setting.

virtual void makVrv::DtOsgEarthDynamicTerrainFeature::slot_observerSettingChanged ( DtObserverObject observer,
int  setting,
bool  value 
)
protectedvirtual

Check to see if the show treads setting changed and setup the myTrackUpdatesEnabled based on the setting.

virtual void makVrv::DtOsgEarthDynamicTerrainFeature::setupTrackUpdatesEnabled ( )
protectedvirtual

Update the myTrackUpdatesEnabled flag based on the show treads observer mode settings for the active observer objects.

Member Data Documentation

const DtString makVrv::DtOsgEarthDynamicTerrainFeature::myCraterStateName
protected
const DtString makVrv::DtOsgEarthDynamicTerrainFeature::myTracksStateName
protected
osg::ref_ptr<osgEarth::MapNode> makVrv::DtOsgEarthDynamicTerrainFeature::myMapNode
protected
int makVrv::DtOsgEarthDynamicTerrainFeature::myChangeCount
protected
osg::ref_ptr<osgEarth::Contrib::DecalImageLayer> makVrv::DtOsgEarthDynamicTerrainFeature::myDecalImageLayer
protected
osg::ref_ptr<osgEarth::Contrib::DecalElevationLayer> makVrv::DtOsgEarthDynamicTerrainFeature::myDecalElevLayer
protected
osg::ref_ptr<osgEarth::Contrib::DecalLandCoverLayer> makVrv::DtOsgEarthDynamicTerrainFeature::myDecalLandCoverLayer
protected
osg::ref_ptr<osgEarth::Splat::RoadSurfaceLayer> makVrv::DtOsgEarthDynamicTerrainFeature::myTracksLayer
protected
osg::ref_ptr<DtOsgEarthMemoryFeatureSource> makVrv::DtOsgEarthDynamicTerrainFeature::myFeatureSource
protected
std::map<std::string, osg::ref_ptr<osgEarth::Feature> > makVrv::DtOsgEarthDynamicTerrainFeature::myGeometryRefs
protected
osg::ref_ptr<osgEarth::VirtualProgram> makVrv::DtOsgEarthDynamicTerrainFeature::myTerrainEngineVirtualProgram
protected
DtDe& makVrv::DtOsgEarthDynamicTerrainFeature::myDe
protected
DtDynamicTerrainRasterLibrary* makVrv::DtOsgEarthDynamicTerrainFeature::myRasterLibrary
protected
osgEarth::LandCoverDictionary* makVrv::DtOsgEarthDynamicTerrainFeature::myLandCoverDictionary
protected
DtSignalConnectionManager makVrv::DtOsgEarthDynamicTerrainFeature::myConnections
protected
TrackTypeToStyleMap makVrv::DtOsgEarthDynamicTerrainFeature::myTrackTypeToStyleMap
protected
bool makVrv::DtOsgEarthDynamicTerrainFeature::myTrackUpdatesEnabled
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)