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 Attributes | Private Member Functions
makVrv::DtOverWaterUpdater Class Reference

Class to periodically check if a location is over triton dynamic ocean or not (assumed to be land). More...

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

Public Member Functions

 DtOverWaterUpdater (DtDe &de, DtUniqueID id)
 Constructor. More...
 
virtual ~DtOverWaterUpdater ()
 Destructor. More...
 
virtual void slot_dynamicOceanObjectsChanged ()
 This method is connected to signals from the DtDynamicOceanManager that indicate when dynamic ocean objects are added or removed. More...
 
virtual bool needsUpdate (DtTime tNow)
 DtTickable Overrides. More...
 
virtual void update (DtTime tNow)
 If updateNeeded() returns true, this is called to do the actual update. More...
 
virtual void setLocalLocation (const DtVector &location)
 Set/get the location that will be tested. This should be called each frame. More...
 
virtual const DtVectorlocalLocation () const
 
virtual bool isOverWater () const
 Get/set whether the current local location is over dynamic ocean. More...
 
virtual void setIsOverWater (bool isOverWater)
 
virtual bool locationIsChanged () const
 Set/get whether the input location has changed since the last update. More...
 
virtual void setLocationIsChanged (bool locationIsChanged)
 
- Public Member Functions inherited from makVrv::DtTickable
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...
 

Protected Attributes

DtDemyDe
 
DtVector myLocalLocation
 
bool myLocationIsChanged
 
bool myIsOverWater
 
DtSignalConnectionManager mySignalConnections
 
- Protected Attributes inherited from makVrv::DtTickable
DtTickableManagerInterfacemyManager
 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
 

Private Member Functions

 DtOverWaterUpdater ()
 (Unimplemented) Default Constructor More...
 

Additional Inherited Members

- 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...
 
- Protected Member Functions inherited from makVrv::DtTickable
 DtTickable (DtTickableManagerInterface *manager)
 CTOR. More...
 
 DtTickable ()
 Unimplemented default CTOR. More...
 
virtual void slot_managerAboutToBeDeleted ()
 

Detailed Description

Class to periodically check if a location is over triton dynamic ocean or not (assumed to be land).

DtOverWaterUpdater uses an intersector to make this determination; if a dynamic terrain object exists and the test height is <= the current sea level height set for the dynamic ocean layer, then isOverWater() will return true. Because intersectors are computationally expensive, this class makes use of the DtTickableManager's ability to spread out ticking tickables that have an update period > 1. By default, DtOverWaterUpdater will check every 60 frames to see if its input location is over water; this can be changed by calling DtTickable::setUpdatePeriod().

Constructor & Destructor Documentation

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

Constructor.

This uses the pattern for distributable objects; although no agents are provided for this class, they could be easily added. Typically, one of these updaters is created locally by an already distributed object, such as the rotor wash updater and surface clamping updater.

virtual makVrv::DtOverWaterUpdater::~DtOverWaterUpdater ( )
virtual

Destructor.

makVrv::DtOverWaterUpdater::DtOverWaterUpdater ( )
private

(Unimplemented) Default Constructor

Member Function Documentation

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

DtTickable Overrides.

Called by the tickable manager to determine if the updater needs to be updated. This checks the myLocationIsChanged flag, preventing updates for non-moving objects

Reimplemented from makVrv::DtTickable.

virtual void makVrv::DtOverWaterUpdater::update ( DtTime  tNow)
virtual

If updateNeeded() returns true, this is called to do the actual update.

It will set the isOverWater flag to true or false.

Implements makVrv::DtTickable.

virtual void makVrv::DtOverWaterUpdater::setLocalLocation ( const DtVector location)
virtual

Set/get the location that will be tested. This should be called each frame.

virtual const DtVector& makVrv::DtOverWaterUpdater::localLocation ( ) const
virtual
virtual bool makVrv::DtOverWaterUpdater::isOverWater ( ) const
virtual

Get/set whether the current local location is over dynamic ocean.

Normally set during update()

virtual void makVrv::DtOverWaterUpdater::setIsOverWater ( bool  isOverWater)
virtual
virtual bool makVrv::DtOverWaterUpdater::locationIsChanged ( ) const
virtual

Set/get whether the input location has changed since the last update.

Normally set to true in setLocalLocation (if the input differs from myLocalLocation) and set to false in update().

virtual void makVrv::DtOverWaterUpdater::setLocationIsChanged ( bool  locationIsChanged)
virtual
virtual void makVrv::DtOverWaterUpdater::slot_dynamicOceanObjectsChanged ( )
virtual

This method is connected to signals from the DtDynamicOceanManager that indicate when dynamic ocean objects are added or removed.

It just sets myLocationIsChanged to true to force an update the next scheduled frame

Member Data Documentation

DtDe& makVrv::DtOverWaterUpdater::myDe
protected
DtVector makVrv::DtOverWaterUpdater::myLocalLocation
protected
bool makVrv::DtOverWaterUpdater::myLocationIsChanged
protected
bool makVrv::DtOverWaterUpdater::myIsOverWater
protected
DtSignalConnectionManager makVrv::DtOverWaterUpdater::mySignalConnections
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)