VR-Forces 4.6.1 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 Attributes
makVrv::DtSwitchTerrainFeature Class Reference
Inheritance diagram for makVrv::DtSwitchTerrainFeature:
Inheritance graph
[legend]

Public Member Functions

 DtSwitchTerrainFeature (DtDynamicTerrainSwitch *switcher, const DtString &stateName, const DtDynamicTerrainSwitchNode::ValueChildMap &valueChildMap, const osg::BoundingSphere &sphere, const boost::shared_ptr< DtDynamicTerrainFeature > &parent)
virtual DtString description () const
 Feature description functions Allows feature to describe itself (for a gui mostly).
virtual const
DtDynamicTerrainFeature
parentFeature () const
virtual void iterateCommands (const boost::function< void(const DtDynamicTerrainChange &)> &callback) const
 Call the supplied callback on commands which represent the commands a feature can respond to.
virtual const
DtDynamicTerrainGeometry
geometry () const
 Geometry which represents this feature.
virtual const
DtDynamicTerrainGeometry
originalGeometry () const
 Unprocessed geometry.
virtual bool matches (const DtDynamicTerrainChange &command, bool useOriginalGeometry) const
 Matching functions.
virtual bool matches (const DtDynamicTerrainGeometry &, bool useOriginalGeometry) const
virtual void changeState (const DtDynamicTerrainChanges &changes)
 Called by the dynamic terrain system in order to notify a feature that it should change its state.
virtual bool stringValueToState (const DtString &valueName, int &state) const
 Convert a string value (such as one found in the value field of a change request to the state value of a DtDynamicTerrainSwitchNode to which it corresponds.
virtual void setState (const DtDynamicTerrainChange *command)
virtual bool isInDefaultState () const
 Is this feature in it's default (i.e. unchanged) state?
virtual bool lastStateWasDefaultState () const
 Was the previous state the feature was in immediately before the current state the default state?
- Public Member Functions inherited from makVrv::DtDynamicTerrainFeature
 DtDynamicTerrainFeature ()
 Default Constructor.
virtual ~DtDynamicTerrainFeature ()
 Virtual destructor.
virtual boost::optional< DtStringfeatureAttribute (const DtString &key) const
 Access attribute values encoded into features.
void changed ()
 Calls changeState and all attached query callbacks.
bool pageOut ()
 Remove all change requests links and remove feature from dynamic terrain world.
void changes (const boost::function< void(const DtDynamicTerrainChanges &)> &callback) const
 Calls supplied callback on this features DtDynamicTerrainChanges interface.
RequestHandle addChangeRequest (DtDynamicTerrainChange *change)
 Add a change request directly to this feature.
RequestHandle addChangeRequest (double time, DtDynamicTerrainChange *change)
virtual ~Link ()
RequestInforequest ()
DtDynamicTerrainFeaturefeature ()
 RequestInfo (DtDynamicTerrainChange *command)
virtual ~RequestInfo ()
const DtDynamicTerrainChangecommand () const
void pageOut ()
virtual boost::signals2::connection connectToChangeSignal (const ChangeCallback &callback) const
 Call callback when feature state is changed.
virtual boost::signals2::connection connectToPageOutSignal (const Callback &callback) const
 Call callback when feature is removed.
- Public Member Functions inherited from makVrv::DtDisconnectable
 DtDisconnectable ()
 Default constructor.
virtual ~DtDisconnectable ()
 Destructor.
virtual boost::signals2::connection addDisconnectFunction (const boost::function< void()> &callback)
 Add a function to be called when callDisconnectFunctions is called.
virtual bool callDisconnectFunctions ()
 Atomically call all the disconnect functions and mark this object as disconnected.

Protected Types

typedef tbb::spin_mutex Mutex
 Mutex to prevent concurrent state switch in mySwitcher.

Protected Attributes

const boost::scoped_ptr
< DtDynamicTerrainGeometry
myGeometry
const boost::scoped_ptr
< DtDynamicTerrainGeometry
myOriginalGeometry
const boost::shared_ptr
< DtDynamicTerrainFeature
myParentFeature
const DtString myStateName
const
DtDynamicTerrainSwitchNode::ValueChildMap 
myValueToChildMap
Mutex myMutex
boost::scoped_ptr
< DtDynamicTerrainSwitch
mySwitcher

Additional Inherited Members

- Public Types inherited from makVrv::DtDynamicTerrainFeature
typedef boost::function< void(const
DtDynamicTerrainFeature &)> 
Callback
 Signal notification.
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 ()
- Protected Member Functions inherited from makVrv::DtDynamicTerrainFeature
void indexDoubleAscending (const DtString &key)
 Key/value attribute indexing.
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)

Member Typedef Documentation

typedef tbb::spin_mutex makVrv::DtSwitchTerrainFeature::Mutex
protected

Mutex to prevent concurrent state switch in mySwitcher.

Constructor & Destructor Documentation

makVrv::DtSwitchTerrainFeature::DtSwitchTerrainFeature ( DtDynamicTerrainSwitch switcher,
const DtString stateName,
const DtDynamicTerrainSwitchNode::ValueChildMap valueChildMap,
const osg::BoundingSphere &  sphere,
const boost::shared_ptr< DtDynamicTerrainFeature > &  parent 
)
explicit

Member Function Documentation

virtual DtString makVrv::DtSwitchTerrainFeature::description ( ) const
virtual

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 DtDynamicTerrainFeature* makVrv::DtSwitchTerrainFeature::parentFeature ( ) const
virtual

Reimplemented from makVrv::DtDynamicTerrainFeature.

virtual void makVrv::DtSwitchTerrainFeature::iterateCommands ( const boost::function< void(const DtDynamicTerrainChange &)> &  ) const
virtual

Call the supplied callback on commands which represent the commands a feature can respond to.

This function is designed to be called from a query callback. The purpose of this function is supply a gui or other introspective tool with commands to issue (possibly modified) to this feature or to the terrain. A feature should create commands which they could respond to and would cause them to set themselves to the state they are in now. If there is some command a feature can respond to, outputting it in this function will allow a gui to do things like automatically create a menu with all the possibilities. The commands know the types of the attributes they contain, so the gui will know how to edit the values correctly in order to let the user change the commands before they are issued.

Reimplemented from makVrv::DtDynamicTerrainFeature.

virtual const DtDynamicTerrainGeometry* makVrv::DtSwitchTerrainFeature::geometry ( ) const
virtual

Geometry which represents this feature.

Implements makVrv::DtDynamicTerrainFeature.

virtual const DtDynamicTerrainGeometry* makVrv::DtSwitchTerrainFeature::originalGeometry ( ) const
virtual

Unprocessed geometry.

Reimplemented from makVrv::DtDynamicTerrainFeature.

virtual bool makVrv::DtSwitchTerrainFeature::matches ( const DtDynamicTerrainChange ,
bool  useOriginalGeometry 
) const
virtual

Matching functions.

Allow for arbitrary matching against requests, queries, and spatial index subspaces. Setting useOriginalGeometry will match against the geometry without any changes made by this system (i.e. uses the original geometry obtained from the parser).

Implements makVrv::DtDynamicTerrainFeature.

virtual bool makVrv::DtSwitchTerrainFeature::matches ( const DtDynamicTerrainGeometry ,
bool  useOriginalGeometry 
) const
virtual
virtual void makVrv::DtSwitchTerrainFeature::changeState ( const DtDynamicTerrainChanges history)
virtual

Called by the dynamic terrain system in order to notify a feature that it should change its state.

The history is an interface into the all of the terrain state changes. This function may be called concurrently from multiple threads.

Parameters
historyHistory interface.

Implements makVrv::DtDynamicTerrainFeature.

virtual bool makVrv::DtSwitchTerrainFeature::stringValueToState ( const DtString valueName,
int state 
) const
virtual

Convert a string value (such as one found in the value field of a change request to the state value of a DtDynamicTerrainSwitchNode to which it corresponds.

virtual void makVrv::DtSwitchTerrainFeature::setState ( const DtDynamicTerrainChange command)
virtual
virtual bool makVrv::DtSwitchTerrainFeature::isInDefaultState ( ) const
virtual

Is this feature in it's default (i.e. unchanged) state?

Implements makVrv::DtDynamicTerrainFeature.

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

Was the previous state the feature was in immediately before the current state the default state?

Implements makVrv::DtDynamicTerrainFeature.

Member Data Documentation

const boost::scoped_ptr<DtDynamicTerrainGeometry> makVrv::DtSwitchTerrainFeature::myGeometry
protected
const boost::scoped_ptr<DtDynamicTerrainGeometry> makVrv::DtSwitchTerrainFeature::myOriginalGeometry
protected
const boost::shared_ptr<DtDynamicTerrainFeature> makVrv::DtSwitchTerrainFeature::myParentFeature
protected
const DtString makVrv::DtSwitchTerrainFeature::myStateName
protected
const DtDynamicTerrainSwitchNode::ValueChildMap makVrv::DtSwitchTerrainFeature::myValueToChildMap
protected
Mutex makVrv::DtSwitchTerrainFeature::myMutex
mutableprotected
boost::scoped_ptr<DtDynamicTerrainSwitch> makVrv::DtSwitchTerrainFeature::mySwitcher
protected

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

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)