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

Abstract rotorWash object updater interface. More...

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

Classes

class  DynamicTerrainItem
 Local class used only by DtDynamicTerrainObject for representing geometry and data. More...

Public Member Functions

 DtDynamicTerrainObject (DtDe &de, DtUniqueID id)
 CTOR.
 DtDynamicTerrainObject (const DtDynamicTerrainObject &copy)
DtDynamicTerrainObjectoperator= (const DtDynamicTerrainObject &copy)
virtual ~DtDynamicTerrainObject ()
 Virtual DTOR.
virtual void update (DtTime tNow)
 The update function called by DtTickableManager during update-ticks.
virtual bool needsUpdate (DtTime tNow)
 The needsUpdate function called by DtTickableManager to verify if an update is required.
DtUniqueID uniqueId () const
 Returns the distributed object id of this object.
virtual void addGeometry (int index, const DtVector &location, double radius, double priority)
 Distributed Interface.
virtual void changeGeometry (int index, const DtVector &location, double radius, double priority)
 Change the geometry in the specified slot.
virtual void clearData (int index)
 Clear the data associated with the geometry at the specified index.
virtual void addData (int index, const std::string &key, const std::string &value, double priority)
 Add a data pair the the specified geometry.
- Public Member Functions inherited from makVrv::DtTickable
virtual ~DtTickable ()
 Virtual DTOR.
virtual void setUpdatePeriod (unsigned int period)
 Specify how often (in # of frames) this tickable should call update.
virtual unsigned int updatePeriod () const

Protected Types

typedef std::vector
< DynamicTerrainItem * > 
DynamicTerrainVector
 Type definition for a vector of DynamicTerrainItems.
typedef std::list< intDirtyList

Protected Member Functions

virtual void makeDirty (DynamicTerrainItem *item, int index)
 Helper functions.
virtual DynamicTerrainItemgetDynamicTerrainItem (int index)
 Get the dynamic terrain item at ths specified index if it exists.
- Protected Member Functions inherited from makVrv::DtTickable
 DtTickable (DtTickableManagerInterface *manager)
 CTOR.
 DtTickable ()
 Unimplemented default CTOR.
virtual void slot_managerAboutToBeDeleted ()

Protected Attributes

DtDemyDe
 The display engine.
DtUniqueID myUniqueId
 This distributed object's unique identifier.
DynamicTerrainVector myDynamicTerrainVector
DirtyList myDirtyList
- Protected Attributes inherited from makVrv::DtTickable
DtTickableManagerInterfacemyManager
 Pointer to manager for removal during destruction.
DtSignalConnectionManager myConnections
unsigned int myFrameCounter
unsigned int myFrameToUpdate
unsigned int myUpdatePeriod

Private Member Functions

 DtDynamicTerrainObject ()
 No default CTOR.

Detailed Description

Abstract rotorWash object updater interface.

DtDynamicTerrainObjects are distributed objects, managed by DtTickableManager. They generate Dynamic Terrain World change requests (and removals) based on changes

Member Typedef Documentation

Type definition for a vector of DynamicTerrainItems.

typedef std::list<int> makVrv::DtDynamicTerrainObject::DirtyList
protected

Constructor & Destructor Documentation

makVrv::DtDynamicTerrainObject::DtDynamicTerrainObject ( DtDe de,
DtUniqueID  id 
)

CTOR.

Parameters
[in]deis the display engine.
[in]idis a unique identifier for this distributed object.
makVrv::DtDynamicTerrainObject::DtDynamicTerrainObject ( const DtDynamicTerrainObject copy)
makVrv::DtDynamicTerrainObject::DtDynamicTerrainObject ( )
private

No default CTOR.

virtual makVrv::DtDynamicTerrainObject::~DtDynamicTerrainObject ( )
virtual

Virtual DTOR.

Member Function Documentation

DtDynamicTerrainObject& makVrv::DtDynamicTerrainObject::operator= ( const DtDynamicTerrainObject copy)
virtual void makVrv::DtDynamicTerrainObject::update ( DtTime  tNow)
virtual

The update function called by DtTickableManager during update-ticks.

Parameters
[in]tNowis the current time-stamp.

Implements makVrv::DtTickable.

virtual bool makVrv::DtDynamicTerrainObject::needsUpdate ( DtTime  tNow)
virtual

The needsUpdate function called by DtTickableManager to verify if an update is required.

If this function returns true, the DtTickableManager will then call update().

Parameters
[in]tNowis the current time-stamp.
Return values
trueif this object needs to be ticked.
falseotherwise. The base class checks handles period checks (for tickables that don't tick every frame. This derived version calls down to the base class and if true, checks the size of the DirtyList; returns true if their are items on the DirtyList

Reimplemented from makVrv::DtTickable.

DtUniqueID makVrv::DtDynamicTerrainObject::uniqueId ( ) const
inline

Returns the distributed object id of this object.

virtual void makVrv::DtDynamicTerrainObject::addGeometry ( int  index,
const DtVector location,
double  radius,
double  priority 
)
virtual

Distributed Interface.

The class maintains a vector of geometries and associated data. By definition, once added, a geometry never goes away. This results in a DynamicTerrainItem being created and added to our DynamicTerrainVector. If the geometry already exists, this just calls change geometry

virtual void makVrv::DtDynamicTerrainObject::changeGeometry ( int  index,
const DtVector location,
double  radius,
double  priority 
)
virtual

Change the geometry in the specified slot.

virtual void makVrv::DtDynamicTerrainObject::clearData ( int  index)
virtual

Clear the data associated with the geometry at the specified index.

virtual void makVrv::DtDynamicTerrainObject::addData ( int  index,
const std::string &  key,
const std::string &  value,
double  priority 
)
virtual

Add a data pair the the specified geometry.

virtual void makVrv::DtDynamicTerrainObject::makeDirty ( DynamicTerrainItem item,
int  index 
)
protectedvirtual

Helper functions.

Check to see if the item is already on the DirtyList; if not, put it there, otherwise do nothing

virtual DynamicTerrainItem* makVrv::DtDynamicTerrainObject::getDynamicTerrainItem ( int  index)
protectedvirtual

Get the dynamic terrain item at ths specified index if it exists.

Generates a warning and returns 0 if it does not.

Member Data Documentation

DtDe& makVrv::DtDynamicTerrainObject::myDe
protected

The display engine.

DtUniqueID makVrv::DtDynamicTerrainObject::myUniqueId
protected

This distributed object's unique identifier.

DynamicTerrainVector makVrv::DtDynamicTerrainObject::myDynamicTerrainVector
protected
DirtyList makVrv::DtDynamicTerrainObject::myDirtyList
protected

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

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)