VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtTritonWakeUpdater Class Reference

Updater for the Kelvin wake model.

DtTritonWakeUpdater is a distributed object, managed by DtTickableManager. It updates the position, direction and speed of an wake-generating entity

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

Public Member Functions

 DtTritonWakeUpdater (DtDe &de, DtUniqueID id)
 
virtual ~DtTritonWakeUpdater ()
 
virtual void update (DtTime tNow)
 
virtual bool needsUpdate (DtTime tNow)
 
virtual void setPosition (const DtVector &pos)
 
virtual void setOrientation (const DtTaitBryan &ori)
 
virtual void setIsAmphibious (bool isAmphibious)
 
- Public Member Functions inherited from makVrv::DtWakeUpdater
 DtWakeUpdater (DtDe &de, DtUniqueID id)
 
virtual ~DtWakeUpdater ()
 
virtual void setWakeModel (DtModel *wakeModel)
 
DtUniqueID uniqueId () const
 
virtual void setLODDistance (double distance)
 
virtual void setFrozen (bool froze)
 
virtual void setMaxRenderAngle (double angle)
 
virtual void setSpeedRenderCuttof (double cutoff)
 
- Public Member Functions inherited from makVrv::DtTickable
virtual bool updateIfNeeded (DtTime tNow)
 
virtual ~DtTickable ()
 
virtual void setTickableEnabled (bool enabled)
 
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 adaptiveTickLodEnabled () const
 

Protected Member Functions

virtual DtTritonWakeModelwakeModel () const
 
virtual DtVector calcWakeOriginAndSeaLevel (DtVector &currentPos, const DtTaitBryan &orientation, double wakeOffset)
 
virtual bool getCurrentShipKinematics (double t, DtVector &position, DtVector &velocity, DtTaitBryan &orientation) const
 
virtual bool isLodedOut (const DtVector &currentPos) const
 
virtual void slot_coordinateSystemChanged ()
 
- Protected Member Functions inherited from makVrv::DtTickable
 DtTickable (DtTickableManagerInterface *manager)
 
 DtTickable ()=delete
 
virtual void slot_managerAboutToBeDeleted ()
 

Protected Attributes

bool myFirstTick
 
DtDoubleSmoother mySpeedSmoother
 
DtDoubleSmoother myVelocityXSmoother
 
DtDoubleSmoother myVelocityYSmoother
 
DtDoubleSmoother myVelocityZSmoother
 
DtSceneObjectmyWakeModelSceneObject
 
bool mySetManually
 
bool myPositionUpdated
 
DtVector myPosition
 
DtVector myLastPosition
 
DtVector myHeadingVector
 
DtTaitBryan myOrientation
 
bool myIsAmphibious
 
DtCoordinateConvertermyCoordinateConverter = nullptr
 
- Protected Attributes inherited from makVrv::DtWakeUpdater
DtDemyDe
 
DtUniqueID myUniqueId
 
DtModelmyWakeModel
 
double myMaxRenderAngle
 
double mySpeedRenderCuttoff
 
double myLODDistance
 
bool myFrozenFlag
 
- Protected Attributes inherited from makVrv::DtTickable
DtTickableManagerInterfacemyManager
 
DtSignalConnectionManager myConnections
 
unsigned int myFrameCounter
 
unsigned int myFrameToUpdate
 
unsigned int myUpdatePeriod
 
unsigned int myTickableIndex
 
DtTime myLastUpdateTime
 
bool myIsThreadSafe
 
TickableListState myTickableListState
 

Additional Inherited Members

- Public Types inherited from makVrv::DtTickable
enum  TickableListState { TickableNotOnList, TickableOnMainList, TickableOnThreadSafeList }
 

Constructor & Destructor Documentation

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

CTOR.

Parameters
[in]deis the display engine.
[in]idis a unique identifier for this distributed object.
virtual makVrv::DtTritonWakeUpdater::~DtTritonWakeUpdater ( )
virtual

Virtual DTOR.

Member Function Documentation

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

The update function called by DtTickableManager during update-ticks.

Parameters
[in]tNowis the current time-stamp.

Implements makVrv::DtWakeUpdater.

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

Check if an update is required.

Parameters
[in]tNowis the current time-stamp.
Return values
trueif this object needs to be ticked.
falseotherwise.

Reimplemented from makVrv::DtTickable.

virtual void makVrv::DtTritonWakeUpdater::setPosition ( const DtVector pos)
virtual

Manually set the current position.

Parameters
[in]posis the position to set.
Note
Only used when ships kinematics cannot be found, such as when creating a wake as a separate entity.
See Also
getCurrentShipKinematics()

Reimplemented from makVrv::DtWakeUpdater.

virtual void makVrv::DtTritonWakeUpdater::setOrientation ( const DtTaitBryan &  ori)
virtual

Manually set the current orientation.

Parameters
[in]oriis the orientation to set.
Note
Only used when ships kinematics cannot be found, such as when creating a wake as a separate entity.
See Also
getCurrentShipKinematics()

Reimplemented from makVrv::DtWakeUpdater.

virtual void makVrv::DtTritonWakeUpdater::setIsAmphibious ( bool  isAmphibious)
virtual

Set whether the wake needs to check to see if its over land.

Reimplemented from makVrv::DtWakeUpdater.

virtual DtTritonWakeModel* makVrv::DtTritonWakeUpdater::wakeModel ( ) const
protectedvirtual

Helper method to return a properly cast version of the wake model supplied.

virtual DtVector makVrv::DtTritonWakeUpdater::calcWakeOriginAndSeaLevel ( DtVector currentPos,
const DtTaitBryan &  orientation,
double  wakeOffset 
)
protectedvirtual

Calculate the origin of the wake and put currentPos at sea level. These two operations are combined to avoid an extra geocentic-> geodetic conversion.

Parameters
[in]currentPosis the entity's position.
[in]currentOrientationis the entity's orientation.
[in]wakeOffsetis offset of the wake start from the entity. center
[out]currentPosis modified to be at sea level
Returns
The position of the center of the circle used to generate a Kelvin wake effect.
virtual bool makVrv::DtTritonWakeUpdater::getCurrentShipKinematics ( double  t,
DtVector position,
DtVector velocity,
DtTaitBryan &  orientation 
) const
protectedvirtual

Get the ship's current position, velocity, and orientation that this 

wake is attached to

virtual bool makVrv::DtTritonWakeUpdater::isLodedOut ( const DtVector currentPos) const
protectedvirtual

internal function to determine if wake is lod'ed out

virtual void makVrv::DtTritonWakeUpdater::slot_coordinateSystemChanged ( )
protectedvirtual

slot for when the coordinate system changes

Member Data Documentation

bool makVrv::DtTritonWakeUpdater::myFirstTick
protected
DtDoubleSmoother makVrv::DtTritonWakeUpdater::mySpeedSmoother
protected
DtDoubleSmoother makVrv::DtTritonWakeUpdater::myVelocityXSmoother
protected
DtDoubleSmoother makVrv::DtTritonWakeUpdater::myVelocityYSmoother
protected
DtDoubleSmoother makVrv::DtTritonWakeUpdater::myVelocityZSmoother
protected
DtSceneObject* makVrv::DtTritonWakeUpdater::myWakeModelSceneObject
protected

A pointer to the current scene object for the wake model.

bool makVrv::DtTritonWakeUpdater::mySetManually
protected
bool makVrv::DtTritonWakeUpdater::myPositionUpdated
protected
DtVector makVrv::DtTritonWakeUpdater::myPosition
protected
DtVector makVrv::DtTritonWakeUpdater::myLastPosition
protected
DtVector makVrv::DtTritonWakeUpdater::myHeadingVector
protected
DtTaitBryan makVrv::DtTritonWakeUpdater::myOrientation
protected
bool makVrv::DtTritonWakeUpdater::myIsAmphibious
protected
DtCoordinateConverter* makVrv::DtTritonWakeUpdater::myCoordinateConverter = nullptr
protected

local clone of the current system wide coordinate system converter. for thread safety.


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

Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)