15 #include <matrix/vlVector.h>
16 #include <matrix/vlTaitBryan.h>
20 class DtIntersectionCache;
21 class DtIntersectorsContainer;
22 class DtCoordinateConverter;
42 ClampOrientationAndPosition = ClampOrientation | ClampPosition,
43 ClampOrientationAndUpright = ClampOrientation | ClampUpright,
44 ClampPositionAndUpright = ClampPosition | ClampUpright,
45 ClampAll = ClampOrientation | ClampPosition | ClampUpright
57 virtual void update(
DtTime tNow );
61 virtual void setEnabled(
bool enabled);
64 virtual void setMode(GroundClampingMode
mode);
67 bool isClamping()
const;
72 return myMode & ClampUpright;
78 return myMode & ClampOrientation;
84 return myMode & ClampPosition;
94 virtual void setCullCylinderRadiusScale(
float scale);
97 virtual void setClampAlways(
bool enabled);
100 virtual void setCheckForCulling(
bool);
104 virtual void doGroundClamp(
DtTime tNow );
108 virtual void setClampTimeThreshold(
double);
113 static void computePerpendicularRotation(
const DtVector& pos,
114 const DtVector& hitNormal,
const DtTaitBryan& orientation,
115 DtTaitBryan& output );
126 bool needClampThisTick()
const;
130 bool targetIsMoving(
const DtVector& newPos,
const DtVector& lastPos )
const;
134 bool targetIsTurning(
const DtTaitBryan& newOri,
const DtTaitBryan& lastOri )
const;
137 bool checkCulling(
const DtVector& up)
const;
139 void clampToWater(
DtTime tNow );
144 virtual void slot_coordinateSystemChanged();
149 static double angleDifference(
double prev,
double curr );
static const double theMaxCacheInterval
Definition: DtGroundClampingUpdater.h:154
DtVector myUnclampedPosition
Definition: DtGroundClampingUpdater.h:164
bool isClampingOrientation() const
Check to see if the mode supports clamping orientation.
Definition: DtGroundClampingUpdater.h:76
DtCoordinateConverter is the base class for 'local (cig) to geocentric' converters.
Definition: DtCoordinateConverter.h:25
bool myHaveLastClampedPosition
Definition: DtGroundClampingUpdater.h:159
voidpf uLong int origin
Definition: ioapi.h:42
DtIntersectionCache * myIntersectionCache
Ground clamping optimization variables.
Definition: DtGroundClampingUpdater.h:181
Scene Object Updater.
Definition: DtSceneObjectUpdater.h:36
Utility class that contains intersectors for all model sets in the system (3d, xr, 2d) Use an object of this class when all models sets can be possibly needed. When you know which model set you need, you can just use the DtIntersectorCreator to create an intersector for a model set Models sets corresponding to 3d, xr and 2d are created by default (these correspond to values of 0, 1 and 5) Additional model sets can be registered with DtIntersectorsContainer::registerModelSet.
Definition: DtIntersectorsContainer.h:36
bool myCheckForCull
Whether or not to check to see if object is culled. Default is true.
Definition: DtGroundClampingUpdater.h:193
DtTaitBryan myUnclampedOrientation
Definition: DtGroundClampingUpdater.h:165
DtVector myLastUnclampedPosition
Definition: DtGroundClampingUpdater.h:167
bool myEnabledFlag
Ground clamping state.
Definition: DtGroundClampingUpdater.h:184
bool isClampingUp() const
Check to see if the mode supports clamping up.
Definition: DtGroundClampingUpdater.h:70
DtTaitBryan myLastClampedOrientation
Definition: DtGroundClampingUpdater.h:162
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:178
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
Class to manage disconnection of boost connections on deletion.
Definition: DtSignalConnectionManager.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:161
double myLastCacheUpdateTime
Definition: DtGroundClampingUpdater.h:170
double myLastClampTime
Definition: DtGroundClampingUpdater.h:171
static const double theClampTimeThreshold
Definition: DtGroundClampingUpdater.h:153
static const double theClampDistThreshold
Definition: DtGroundClampingUpdater.h:155
Base class to provide boost signal/slot management.
bool myClampCulledLastFrame
Was the unclamped position outside the cull cylinder last frame.
Definition: DtGroundClampingUpdater.h:190
DtSignalConnectionManager myConnections
Definition: DtGroundClampingUpdater.h:200
bool myClampAlwaysFlag
Always clamp regardless of time.
Definition: DtGroundClampingUpdater.h:187
const char int mode
Definition: ioapi.h:38
double myClampTimeThreshold
Definition: DtGroundClampingUpdater.h:195
float myCullCylinderScale
Object is not ground clamped if the camera is farther away than this times the object's bounding radi...
Definition: DtGroundClampingUpdater.h:175
static const double theClampOrientThreshold
Definition: DtGroundClampingUpdater.h:156
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:70
bool myBecameEnabledThisTick
Definition: DtGroundClampingUpdater.h:196
bool myHaveLastClampedOrientation
Definition: DtGroundClampingUpdater.h:160
static const double theIsectLength
Definition: DtGroundClampingUpdater.h:157
DtTaitBryan myLastUnclampedOrientation
Definition: DtGroundClampingUpdater.h:168
bool isClampingPosition() const
Check to see if the mode supports clamping position.
Definition: DtGroundClampingUpdater.h:82
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:29
GroundClampingMode
Ground Clamping Modes.
Definition: DtGroundClampingUpdater.h:36