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 Member Functions | Protected Attributes | Static Protected Attributes
makVrv::DtTritonWaterClampingUpdater Class Reference

DtTritonWaterClampingUpdater is a Triton-using re-implementation of the DtWaterClampingUpdater. More...

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

Public Member Functions

 DtTritonWaterClampingUpdater (DtDe &de, DtUniqueID id)
 CTOR. More...
 
virtual ~DtTritonWaterClampingUpdater ()
 DTOR. More...
 
virtual bool clampToWater (DtTime tNow)
 Clamp an object to the water using the buoyancy model. More...
 
virtual void setPaused (bool isPaused)
 Set the simulation paused/unpaused. More...
 
virtual void setLOD (float lodDistance)
 override the base class version so myFullyLodDistance can be updated More...
 
virtual void setWaterlineOriginOffset (float offset)
 override the base class version so myWaterlineAltitude can be updated More...
 
virtual void resetMotionModel (double seaLevel)
 Deletes and recreates the underlying motion model; used when sea level. More...
 
- Public Member Functions inherited from makVrv::DtWaterClampingUpdater
 DtWaterClampingUpdater (DtDe &de, DtUniqueID id)
 CTOR. More...
 
virtual ~DtWaterClampingUpdater ()
 DTOR. More...
 
virtual void update (DtTime tNow)
 do the actual clamping. More...
 
virtual void setMinimumCullDistance (float distance)
 Set the distance within which buoyancy won't be frustum culled. More...
 
virtual void setCullType (int cullType)
 Sets the type of buoyancy culling used (FrontFacing or None). More...
 
virtual void setIsSinking (bool isSinking)
 
- Public Member Functions inherited from makVrv::DtSceneObjectUpdater
 DtSceneObjectUpdater (DtDe &de, DtUniqueID id)
 CTOR. More...
 
virtual ~DtSceneObjectUpdater ()
 Virtual DTOR. More...
 
virtual void setNextUpdater (DtSceneObjectUpdater *nextUpdater)
 Set the next updater in the updater chain. More...
 
virtual void setPrevUpdater (DtSceneObjectUpdater *prevUpdater)
 Set the previous updater in the updater chain. More...
 
virtual bool needsUpdate (DtTime tNow)
 The check function called by DtTickableManager to verify if an update is required. More...
 
virtual void updateAdaptiveTickrate (const DtVector &lastPos, const DtTime &deltaTime)
 This is called by the update function after all the original chaining updates happen. More...
 
virtual void setVertexToUpdate (unsigned int vertex)
 Specify which vertex in the scene object this updater updates. More...
 
virtual void setInputPosition (const DtVector &position)
 Set the position input to this updater. More...
 
virtual void setInputOrientation (const DtTaitBryan &orientation)
 Set the orientation input to this updater. More...
 
virtual void setOutputPosition (const DtVector &position)
 Output the resultant position. More...
 
virtual void setOutputOrientation (const DtTaitBryan &orientation)
 Output the resultant orientation. More...
 
virtual void setOutputPositionAndOrientation (const DtVector &position, const DtTaitBryan &orientation)
 Set both the position and orientation at the same time. More...
 
virtual DtTime lastUpdateTime () const
 Get the time-stamp of the last update. More...
 
virtual void setSceneObject (DtSceneObject *sceneObject, bool addToTickableMgrIfHead)
 Set the scene object to be updated. More...
 
virtual void setSceneObject (DtSceneObject *sceneObject)
 Set the scene object to be updated. More...
 
virtual void setLodSystemEnabled (bool enabled)
 brief set if the lod update system is on for this model More...
 
virtual bool lodSystemEnabled () const
 brief gets if the lod update system is on for this model More...
 
virtual void setLodScaleSpeedFactor (float factor)
 brief sets the value that linearly adjusts the range of the lod radii by the velocity More...
 
virtual float lodScaleSpeedFactor () const
 brief gets the value that linearly adjusts the range of the lod radii by the velocity More...
 
virtual void setLodRadiusStart (float ratius)
 brief sets the near radius where the update rate starts to fall off More...
 
virtual float lodRadiusStart () const
 brief gets the near radius where the update rate starts to fall off More...
 
virtual void setLodRadiusEnd (float ratius)
 brief sets the far radius where the update rate stops falling off More...
 
virtual float lodRadiusEnd () const
 brief gets the far radius where the update rate stops falling off More...
 
virtual void setNearLodUpdateRate (int nearRate)
 sets the update rate at the near radius, defaults to every six ticks More...
 
virtual int nearLodUpdateRate () const
 brief gets the update rate at the near radius, defaults to every six ticks More...
 
virtual void setFarLodUpdateRate (int maxRate)
 brief the update rate at the far radius, defaults to every 30 ticks More...
 
virtual int farLodUpdateRate () const
 brief gets the update rate at the far radius defaults to every 30 ticks More...
 
DtUniqueID uniqueId () const
 Returns the distributed object id of this updater. More...
 
DtSceneObjectUpdaterfindNextUpdater () const
 Return the next updater in the updater chain. More...
 
DtSceneObjectUpdaterfindPrevUpdater () const
 Return the previous updater in the updater chain. More...
 
virtual bool isChainThreadSafe (DtSceneObjectUpdater *firstUpdater)
 Check all the updaters in the current chain and determine if the chain is thread safe. More...
 
virtual DtSceneObjectUpdaterchainHead ()
 Find the first updater in the chain. More...
 
virtual void setIsThreadSafe (bool safe)
 Override the DtTickable base class' method so retest the entire chain this updater belongs to. More...
 
DtSceneObjectfindSceneObject ()
 Get the current scene object for this updater. More...
 
DtSceneObject *const findSceneObject () const
 const correct version More...
 
- 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 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
 

Protected Member Functions

virtual double altitudeAt (const DtVector &pos)
 Get the altitude at a point. More...
 
virtual void addAltitude (DtVector &pos, float altitudeToAdd)
 Add the specified altitude to pos. More...
 
virtual DtVector moveToAltitude (const DtVector &pos, double alt)
 Move a point to the specified altitude. More...
 
virtual DtTaitBryan computeMotionOrientation ()
 Compute the orientation for the motion model. More...
 
virtual bool isFullyImmersed ()
 Are we under water? More...
 
virtual void adjustSinkingSpeedScale (const DtVector &inputPosition, const DtVector &currentPosition)
 
virtual void smoothMotionAndSeaLevel (double percent, DtVector &outputPos, DtTaitBryan &outputOri)
 Percent 0 = myLastMotionPos/Ori Percent 1 = mySeaLevelPosition/myInputOrientation linear interpolation between the two for values in between 0 and 1. More...
 
virtual void slot_oceanLayerSeaLevelChanged (double sealevel)
 
virtual void updateWaterLineAltitude (double sealevel)
 
virtual bool initializeExtents (double sealevel)
 
virtual bool checkCull (DtObserverObject *const observer, const DtVector &eyeToShip) const
 
virtual void slot_coordinateSystemChanged ()
 
- Protected Member Functions inherited from makVrv::DtWaterClampingUpdater
virtual void setNextUpdaterWithoutManagerPlacement (DtSceneObjectUpdater *updater)
 
- Protected Member Functions inherited from makVrv::DtSceneObjectUpdater
virtual void removeThreadSafeChainFromManager (DtSceneObjectUpdater *head)
 Helper method to remove an updater (not necessarily this one, but rather the one at the head of the chain that this updater belongs to) from the DtTickableManager's thread-safe tickable list. More...
 
virtual void removeUnThreadSafeChainFromManager (DtSceneObjectUpdater *head)
 Helper method to remove an updater (not necessarily this one, but rather the one at the head of the chain that this updater belongs to) from the DtTickableManager's un-thread-safe tickable list. More...
 
virtual void addThreadSafeChainToManager (DtSceneObjectUpdater *head)
 Helper method to add an updater (not necessarily this one, but rather the one at the head of the chain that this updater belongs to) to the DtTickableManager's thread-safe tickable list. More...
 
virtual void addUnThreadSafeChainToManager (DtSceneObjectUpdater *head)
 Helper method to add an updater (not necessarily this one, but rather the one at the head of the chain that this updater belongs to) to the DtTickableManager's un-thread-safe tickable list. More...
 
virtual void placeChainOnCorrectTickableList (DtSceneObjectUpdater *head)
 Examines the chain for the given head updater, removes the head from the approriate ticable list if necessary, and then adds the head to the correct (threaded or unthreaded) tickable list. More...
 
virtual void slot_sceneObjectToBeDeleted (const DtUniqueID &id)
 
- Protected Member Functions inherited from makVrv::DtTickable
 DtTickable (DtTickableManagerInterface *manager)
 CTOR. More...
 
 DtTickable ()
 Unimplemented default CTOR. More...
 
virtual void slot_managerAboutToBeDeleted ()
 

Protected Attributes

DtRk4MotionModelmyMotionModel
 
DtTime myLastTickTime
 
bool myExtentsSet
 
bool myIsPaused
 
double myLastSinkingDiff
 
bool mySmallObject
 
DtTritonManagermyTritonManager
 
DtVector myLastMotionPos
 
DtTaitBryan myLastMotionOri
 
DtVector myLastOutputPos
 
DtVector myLastAltitudeAdjustedPos
 
float myWaterlineAltitude
 
DtVector myLastInputPosition
 
DtVector mySeaLevelPosition
 
bool mySeaLevelPositionDirty
 
DtTime myLastLODTickTime
 
float mySeaLevelClampDistance
 
bool myLodedOut
 
DtSignalConnectionManager myConnections
 
bool myCoordinateSystemChanged
 
- Protected Attributes inherited from makVrv::DtWaterClampingUpdater
float myWaterlineOriginOffset
 
float myLodDistance
 
float myMinimumCullDistance
 
DtEntitySettingsRecord::BuoyancyCullType myCullType
 
bool myIsSinking
 
- Protected Attributes inherited from makVrv::DtSceneObjectUpdater
DtDemyDe
 The display engine. More...
 
DtUniqueID myUniqueId
 This distributed object's unique identifier. More...
 
DtSceneObjectmySceneObject
 A pointer to the current scene object being updated. More...
 
int myModelSet
 This updater is registered as a modelset-specific tickable; this is the modelset it's registered with. More...
 
boost::signalslib::connection mySceneObjectConnection
 
DtSceneObjectUpdatermyNextUpdater
 The next updater in the chain (or NULL) More...
 
DtSceneObjectUpdatermyPrevUpdater
 The previous updater in the chain (or NULL) More...
 
unsigned int myVertexToUpdate
 The default scene object vertex to update. More...
 
DtVector myInputPosition
 Input position. More...
 
DtTaitBryan myInputOrientation
 Input Orientation. More...
 
bool myPositionDataOutputted
 Flag to indicate if setOutputPosition has been called this tick. More...
 
bool myOrientationDataOutputted
 Flag to indicate if setOutputOrientation has been called this tick. More...
 
UpdateLODParams myLodUpdateParams
 automatic lod system params More...
 
- 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
 

Static Protected Attributes

static const double theMotionTimeout
 
static const double theSmoothTime
 
static const double theFullyLodScaler
 

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...
 
- Public Attributes inherited from makVrv::DtSceneObjectUpdater
boost::signalslib::signal
< void(const DtUniqueID &) > 
signal_updaterToBeDeleted
 

Detailed Description

DtTritonWaterClampingUpdater is a Triton-using re-implementation of the DtWaterClampingUpdater.

It provides a physics-based buoyancy model that is used to determine the position and altitude of a scene object that is on Triton dynamic ocean

Constructor & Destructor Documentation

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

CTOR.

virtual makVrv::DtTritonWaterClampingUpdater::~DtTritonWaterClampingUpdater ( )
virtual

DTOR.

Member Function Documentation

virtual bool makVrv::DtTritonWaterClampingUpdater::clampToWater ( DtTime  tNow)
virtual

Clamp an object to the water using the buoyancy model.

Reimplemented from makVrv::DtWaterClampingUpdater.

virtual void makVrv::DtTritonWaterClampingUpdater::setPaused ( bool  isPaused)
virtual

Set the simulation paused/unpaused.

Reimplemented from makVrv::DtWaterClampingUpdater.

virtual void makVrv::DtTritonWaterClampingUpdater::setLOD ( float  lodDistance)
virtual

override the base class version so myFullyLodDistance can be updated

Reimplemented from makVrv::DtWaterClampingUpdater.

virtual void makVrv::DtTritonWaterClampingUpdater::setWaterlineOriginOffset ( float  offset)
virtual

override the base class version so myWaterlineAltitude can be updated

Reimplemented from makVrv::DtWaterClampingUpdater.

virtual void makVrv::DtTritonWaterClampingUpdater::resetMotionModel ( double  seaLevel)
virtual

Deletes and recreates the underlying motion model; used when sea level.

virtual double makVrv::DtTritonWaterClampingUpdater::altitudeAt ( const DtVector pos)
protectedvirtual

Get the altitude at a point.

virtual void makVrv::DtTritonWaterClampingUpdater::addAltitude ( DtVector pos,
float  altitudeToAdd 
)
protectedvirtual

Add the specified altitude to pos.

virtual DtVector makVrv::DtTritonWaterClampingUpdater::moveToAltitude ( const DtVector pos,
double  alt 
)
protectedvirtual

Move a point to the specified altitude.

virtual DtTaitBryan makVrv::DtTritonWaterClampingUpdater::computeMotionOrientation ( )
protectedvirtual

Compute the orientation for the motion model.

Combines heading from unclamped orientation and pitch/roll from motion orientation

virtual bool makVrv::DtTritonWaterClampingUpdater::isFullyImmersed ( )
protectedvirtual

Are we under water?

virtual void makVrv::DtTritonWaterClampingUpdater::adjustSinkingSpeedScale ( const DtVector inputPosition,
const DtVector currentPosition 
)
protectedvirtual
virtual void makVrv::DtTritonWaterClampingUpdater::smoothMotionAndSeaLevel ( double  percent,
DtVector outputPos,
DtTaitBryan &  outputOri 
)
protectedvirtual

Percent 0 = myLastMotionPos/Ori Percent 1 = mySeaLevelPosition/myInputOrientation linear interpolation between the two for values in between 0 and 1.

virtual void makVrv::DtTritonWaterClampingUpdater::slot_oceanLayerSeaLevelChanged ( double  sealevel)
protectedvirtual
virtual void makVrv::DtTritonWaterClampingUpdater::updateWaterLineAltitude ( double  sealevel)
protectedvirtual
virtual bool makVrv::DtTritonWaterClampingUpdater::initializeExtents ( double  sealevel)
protectedvirtual
virtual bool makVrv::DtTritonWaterClampingUpdater::checkCull ( DtObserverObject *const  observer,
const DtVector eyeToShip 
) const
protectedvirtual
virtual void makVrv::DtTritonWaterClampingUpdater::slot_coordinateSystemChanged ( )
protectedvirtual

Member Data Documentation

const double makVrv::DtTritonWaterClampingUpdater::theMotionTimeout
staticprotected
const double makVrv::DtTritonWaterClampingUpdater::theSmoothTime
staticprotected
const double makVrv::DtTritonWaterClampingUpdater::theFullyLodScaler
staticprotected
DtRk4MotionModel* makVrv::DtTritonWaterClampingUpdater::myMotionModel
protected
DtTime makVrv::DtTritonWaterClampingUpdater::myLastTickTime
protected
bool makVrv::DtTritonWaterClampingUpdater::myExtentsSet
protected
bool makVrv::DtTritonWaterClampingUpdater::myIsPaused
protected
double makVrv::DtTritonWaterClampingUpdater::myLastSinkingDiff
protected
bool makVrv::DtTritonWaterClampingUpdater::mySmallObject
protected
DtTritonManager& makVrv::DtTritonWaterClampingUpdater::myTritonManager
protected
DtVector makVrv::DtTritonWaterClampingUpdater::myLastMotionPos
protected
DtTaitBryan makVrv::DtTritonWaterClampingUpdater::myLastMotionOri
protected
DtVector makVrv::DtTritonWaterClampingUpdater::myLastOutputPos
protected
DtVector makVrv::DtTritonWaterClampingUpdater::myLastAltitudeAdjustedPos
protected
float makVrv::DtTritonWaterClampingUpdater::myWaterlineAltitude
protected
DtVector makVrv::DtTritonWaterClampingUpdater::myLastInputPosition
protected
DtVector makVrv::DtTritonWaterClampingUpdater::mySeaLevelPosition
protected
bool makVrv::DtTritonWaterClampingUpdater::mySeaLevelPositionDirty
protected
DtTime makVrv::DtTritonWaterClampingUpdater::myLastLODTickTime
protected
float makVrv::DtTritonWaterClampingUpdater::mySeaLevelClampDistance
protected
bool makVrv::DtTritonWaterClampingUpdater::myLodedOut
protected
DtSignalConnectionManager makVrv::DtTritonWaterClampingUpdater::myConnections
protected
bool makVrv::DtTritonWaterClampingUpdater::myCoordinateSystemChanged
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)