12 #include <matrix/vlVector.h>
13 #include <matrix/vlTaitBryan.h>
17 class DtIntersectionCache;
37 ClampOrientationAndPosition = ClampOrientation | ClampPosition,
38 ClampOrientationAndUpright = ClampOrientation | ClampUpright,
39 ClampPositionAndUpright = ClampPosition | ClampUpright,
40 ClampAll = ClampOrientation | ClampPosition | ClampUpright
52 virtual void update(
DtTime tNow );
56 virtual void setEnabled(
bool enabled);
59 virtual void setMode(GroundClampingMode
mode);
62 bool isClamping()
const;
67 return myMode & ClampUpright;
73 return myMode & ClampOrientation;
79 return myMode & ClampPosition;
89 virtual void setCullCylinderRadiusScale(
float scale);
92 virtual void setClampAlways(
bool enabled);
95 virtual void setCheckForCulling(
bool);
99 virtual void doGroundClamp(
DtTime tNow );
103 virtual void setClampTimeThreshold(
double);
108 static void computePerpendicularRotation(
const DtVector& pos,
109 const DtVector& hitNormal,
const DtTaitBryan& orientation,
110 DtTaitBryan& output );
121 bool needClampThisTick()
const;
125 bool targetIsMoving(
const DtVector& newPos,
const DtVector& lastPos )
const;
129 bool targetIsTurning(
const DtTaitBryan& newOri,
const DtTaitBryan& lastOri )
const;
132 bool checkCulling(
const DtVector& up)
const;
134 void clampToWater(
DtTime tNow );
141 static double angleDifference(
double prev,
double curr );
static const double theMaxCacheInterval
Definition: DtGroundClampingUpdater.h:146
DtVector myUnclampedPosition
Definition: DtGroundClampingUpdater.h:156
bool isClampingOrientation() const
Check to see if the mode supports clamping orientation.
Definition: DtGroundClampingUpdater.h:71
bool myHaveLastClampedPosition
Definition: DtGroundClampingUpdater.h:151
voidpf uLong int origin
Definition: ioapi.h:42
DtIntersectionCache * myIntersectionCache
Ground clamping optimization variables.
Definition: DtGroundClampingUpdater.h:173
Scene Object Updater.
Definition: DtSceneObjectUpdater.h:36
bool myCheckForCull
Whether or not to check to see if object is culled. Default is true.
Definition: DtGroundClampingUpdater.h:185
DtTaitBryan myUnclampedOrientation
Definition: DtGroundClampingUpdater.h:157
DtVector myLastUnclampedPosition
Definition: DtGroundClampingUpdater.h:159
bool myEnabledFlag
Ground clamping state.
Definition: DtGroundClampingUpdater.h:176
bool isClampingUp() const
Check to see if the mode supports clamping up.
Definition: DtGroundClampingUpdater.h:65
DtTaitBryan myLastClampedOrientation
Definition: DtGroundClampingUpdater.h:154
Contains the declaration for makVrv::DtSceneObjectUpdater.
DtSurfaceClampingUpdater is an updater that is given a position and orientation, and will clamp those...
Definition: DtSurfaceClampingUpdater.h:29
GroundClampingMode myMode
The type of clamping this updater is doing.
Definition: DtGroundClampingUpdater.h:170
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
An abstract interface for managing cached intersection information and determining if the cache needs...
Definition: DtIntersectionCache.h:22
DtVector myLastClampedPosition
Definition: DtGroundClampingUpdater.h:153
unsigned long long DtUniqueID
Definition: DtUniqueID.h:19
double myLastCacheUpdateTime
Definition: DtGroundClampingUpdater.h:162
double myLastClampTime
Definition: DtGroundClampingUpdater.h:163
static const double theClampTimeThreshold
Definition: DtGroundClampingUpdater.h:145
static const double theClampDistThreshold
Definition: DtGroundClampingUpdater.h:147
bool myClampCulledLastFrame
Was the unclamped position outside the cull cylinder last frame.
Definition: DtGroundClampingUpdater.h:182
bool myClampAlwaysFlag
Always clamp regardless of time.
Definition: DtGroundClampingUpdater.h:179
const char int mode
Definition: ioapi.h:38
double myClampTimeThreshold
Definition: DtGroundClampingUpdater.h:187
float myCullCylinderScale
Object is not ground clamped if the camera is farther away than this times the object's bounding radi...
Definition: DtGroundClampingUpdater.h:167
static const double theClampOrientThreshold
Definition: DtGroundClampingUpdater.h:148
The DtDe is the core component of any VR-Vantage application.
Definition: DtDe.h:69
bool myBecameEnabledThisTick
Definition: DtGroundClampingUpdater.h:188
bool myHaveLastClampedOrientation
Definition: DtGroundClampingUpdater.h:152
static const double theIsectLength
Definition: DtGroundClampingUpdater.h:149
DtTaitBryan myLastUnclampedOrientation
Definition: DtGroundClampingUpdater.h:160
bool isClampingPosition() const
Check to see if the mode supports clamping position.
Definition: DtGroundClampingUpdater.h:77
DtGroundClampingUpdater is a scene object updater that is given a position and orientation, and depending on how it is configured, updates a scene object with a position and orientation that are clamped to the underlying terrain.
Definition: DtGroundClampingUpdater.h:24
GroundClampingMode
Ground Clamping Modes.
Definition: DtGroundClampingUpdater.h:31