![]() |
VR-Forces 5.0.2 Developer's Guide
|
Abstract rotorWash object updater interface.
DtDynamicTerrainObjects are distributed objects, managed by DtTickableManager. They generate Dynamic Terrain World change requests (and removals) based on events. The network dynamic terrain object maintains a list of such events. There may be multiple dynamic terrain objects (so a single one doesn't get too large). This class is the local representation of one of those network objects.

Classes | |
| class | DynamicTerrainItem |
| class | DynamicTerrainLineItem |
| class | DynamicTerrainSphereItem |
Public Member Functions | |
| DtDynamicTerrainObject (DtDe &de, DtUniqueID id) | |
| DtDynamicTerrainObject (const DtDynamicTerrainObject ©) | |
| DtDynamicTerrainObject & | operator= (const DtDynamicTerrainObject ©) |
| virtual | ~DtDynamicTerrainObject () |
| virtual void | update (DtTime tNow) |
| virtual bool | needsUpdate (DtTime tNow) |
| DtUniqueID | uniqueId () const |
| virtual void | addSphericalGeometry (int index, const DtVector &location, double radius, double priority) |
| virtual void | addLinearGeometry (int index, int vtx, const DtVector &location, double priority, int vertexCount) |
| virtual void | changeSphericalGeometry (int index, const DtVector &location, double radius, double priority) |
| virtual void | changeLinearGeometry (int index, int vtx, const DtVector &location, double priority, int vertexCount) |
| virtual void | clearData (int index) |
| virtual void | removeItem (int index) |
| virtual void | addData (int index, const std::string &key, const std::string &value, double priority) |
Public Member Functions inherited from makVrv::DtTickable | |
| virtual bool | updateIfNeeded (DtTime tNow) |
| virtual | ~DtTickable () |
| virtual void | setIsThreadSafe (bool safe) |
| virtual bool | isThreadSafe () const |
| virtual void | setTickableListState (TickableListState safeList) |
| virtual TickableListState | tickableListState () const |
| virtual void | setUpdatePeriod (unsigned int period) |
| virtual unsigned int | updatePeriod () const |
| virtual bool | lodSystemEnabled () const |
Protected Types | |
| typedef std::vector < DynamicTerrainItem * > | DynamicTerrainVector |
| typedef std::list< int > | DirtyList |
Protected Member Functions | |
| virtual void | makeDirty (DynamicTerrainItem *item, int index) |
| virtual DynamicTerrainItem * | getDynamicTerrainItem (int index) |
Protected Member Functions inherited from makVrv::DtTickable | |
| DtTickable (DtTickableManagerInterface *manager) | |
| DtTickable () | |
| virtual void | slot_managerAboutToBeDeleted () |
Protected Attributes | |
| DtDe & | myDe |
| DtUniqueID | myUniqueId |
| DynamicTerrainVector | myDynamicTerrainVector |
| DirtyList | myDirtyList |
Protected Attributes inherited from makVrv::DtTickable | |
| DtTickableManagerInterface * | myManager |
| DtSignalConnectionManager | myConnections |
| unsigned int | myFrameCounter |
| unsigned int | myFrameToUpdate |
| unsigned int | myUpdatePeriod |
| DtTime | myLastUpdateTime |
| bool | myIsThreadSafe |
| TickableListState | myTickableListState |
Private Member Functions | |
| DtDynamicTerrainObject () | |
Additional Inherited Members | |
Public Types inherited from makVrv::DtTickable | |
| enum | TickableListState { TickableNotOnList, TickableOnMainList, TickableOnThreadSafeList } |
|
protected |
Type definition for a vector of DynamicTerrainItems.
|
protected |
| makVrv::DtDynamicTerrainObject::DtDynamicTerrainObject | ( | DtDe & | de, |
| DtUniqueID | id | ||
| ) |
CTOR.
| [in] | de | is the display engine. |
| [in] | id | is a unique identifier for this distributed object. |
| makVrv::DtDynamicTerrainObject::DtDynamicTerrainObject | ( | const DtDynamicTerrainObject & | copy | ) |
|
private |
No default CTOR.
|
virtual |
Virtual DTOR.
| DtDynamicTerrainObject& makVrv::DtDynamicTerrainObject::operator= | ( | const DtDynamicTerrainObject & | copy | ) |
|
virtual |
The update function called by DtTickableManager during update-ticks.
| [in] | tNow | is the current time-stamp. |
Implements makVrv::DtTickable.
The needsUpdate function called by DtTickableManager to verify if an update is required. If this function returns true, the DtTickableManager will then call update().
| [in] | tNow | is the current time-stamp. |
| true | if this object needs to be ticked. |
| false | otherwise. 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.
|
inline |
Returns the distributed object id of this dynamic terrain object.
|
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 DynamicTerrainSphereItem being created and added to our DynamicTerrainVector. A DtUniqueID is also generated for this item. If the spherical geometry already exists this just calls changeSphericalGeometry. If there is any other kind of geometry in the slot this call generates a warning and returns without making changes
|
virtual |
The class maintains a vector of geometries and associated data. By definition, once added, a geometry never goes away. This results in a DynamicTerrainLineItem being created and added to our DynamicTerrainVector. If the linear geometry already exists this just calls changeLinearGeometry. If there is any other kind of geometry in the slot this call generates a warning and returns without making changes vertexCount is the number of verticies in the full linear geometry.
|
virtual |
Change the spherical geometry in the specified slot. If the slot contains non-spherical geometry, this call is ignored.
|
virtual |
Change the linear geometry in the specified slot. If the slot contains non-linear geometry, this call is ignored vertexCount is the number of verticies in the full linear geometry.
|
virtual |
Clear the data associated with the geometry at the specified index. This does NOT put the item on the dirty list. If the intent is to remove the item at index, call removeItem(). This is used to make it easier to make data changes by clearing and then resetting the list (using addData(), which will add it to the dirty list)
|
virtual |
Remove a dynamic terrain item (such as a crater or persistent track) Note that we don't want to change the item/index relationship for the other items; so myDynamicTerrainVector[index]; amd its possible this same item might be recreated if this was deleted and then a scenario rewind / replay happens. So we create a remove request to the dynamic terrain system, 0 the data vector, but otherwise keep the item around. Items with 0 length data will be ignored.
|
virtual |
Add a data pair the the specified geometry.
|
protectedvirtual |
Helper functions.
Check to see if the item is already on the DirtyList; if not, put it there, otherwise do nothing
|
protectedvirtual |
Get the dynamic terrain item at ths specified index if it exists. Generates a warning and returns 0 if it does not.
|
protected |
The display engine.
|
protected |
This distributed object's unique identifier.
|
protected |
|
protected |