![]() |
VR-Forces Developer's Guide
|
DtEntityKinematicState Controls kinematic state of all scene objects for an element This class has no accessors to kinematic data due to updaters being in the render thread. Do not add accessors for kin state info. See DtKinematicState.h for an over view of kinematic state objects.
** There is only one updater chain for all scene objects **
DtEntityKinematicState has a number of functions:

Public Member Functions | |
| DtEntityKinematicState (DtStateListener &listener, DtAgentManagerInterface &sceneInterface, DtSharedSettingsManager &settingsManager) | |
| virtual | ~DtEntityKinematicState () |
| DtEntityKinematicState ()=delete | |
| DtEntityKinematicState (const DtEntityKinematicState &)=delete | |
| DtEntityKinematicState & | operator= (const DtEntityKinematicState &)=delete |
| virtual void | initialize () override |
| virtual void | processKinematicStateDefinition (const DtVisualizerDefinition *visDef) override |
| virtual void | createUpdaters () override |
| virtual void | destroyUpdaters () override |
| virtual void | resetSpatialAttributes () |
| virtual void | setLocation (const DtVector &, double time) |
| virtual void | setOrientation (const DtTaitBryan &, double time) |
| virtual void | setVelocity (const DtVector32 &, double time) |
| virtual void | setAngularVelocity (const DtVector32 &, double time) |
| virtual void | setAcceleration (const DtVector32 &, double time) |
| virtual void | setLocation (const DtVector &) |
| virtual void | setOrientation (const DtTaitBryan &) |
| virtual void | setVelocity (const DtVector32 &) |
| virtual void | setAngularVelocity (const DtVector32 &) |
| virtual void | setAcceleration (const DtVector32 &) |
| virtual void | setDeadReckoning (bool position, bool velocity, bool orientation) |
| virtual void | setSmoothingEnabled (bool enabled) |
| virtual void | setSmoothingPeriod (float scale) |
| virtual void | setIsAmphibious (bool amphibious) |
| virtual bool | isAmphibious () const |
| virtual void | setWaterClampingEnabled (bool enabled) |
| virtual void | setGlobalBuoyancyEnabled (bool enabled) |
| virtual void | setBuoyancyLod (float lodDistance) |
| virtual void | setWaterlineOriginOffset (float offset) |
| virtual void | setGroundClamping (bool enabled) |
| virtual void | setGroundClampingMode (DtGroundClampingUpdater::GroundClampingMode mode) |
| virtual void | setPossibleGroundClampingModes (DtGroundClampingUpdater::GroundClampingMode possibleModes) |
| virtual void | slot_setGroundClampingCullingEnabled (bool enabled) |
| virtual void | setGroundClampingScale (float scale) |
| virtual void | slot_lifeformsUprightChanged (bool enabled) |
| virtual DtGroundClampingUpdater::GroundClampingMode | groundClampingMode () |
| virtual std::string | motionModel () const |
| virtual void | setMotionModel (const std::string &model) |
| virtual void | setFrozen (bool isFrozen, bool force=false) |
| virtual void | setDamageState (EntityStateListener::DamageState damageState) |
Public Member Functions inherited from makVrv::DtKinematicState | |
| DtKinematicState (DtStateListener &listener, DtAgentManagerInterface &sceneInterface, DtSharedSettingsManager &settingsManager) | |
| virtual | ~DtKinematicState () |
| DtKinematicState ()=delete | |
| DtKinematicState (const DtKinematicState &)=delete | |
| DtKinematicState & | operator= (const DtKinematicState &)=delete |
| virtual void | addSceneObject (DtModelSetId modelSet, DtSceneObjectAgent *sceneObjectAgent) |
| virtual void | removeSceneObject (DtModelSetId modelSet, DtSceneObjectAgent *sceneObjectAgent) |
| virtual DtSceneObjectAgent * | findSceneObjectForModelSet (DtModelSetId modelSet) |
| virtual bool | distribute () const |
| virtual void | setDistribute (const bool distribute) |
| virtual void | setParentElement (DtElement *parent) |
| virtual void | updateParentElementSceneObject (DtElement *parent) |
Static Public Member Functions | |
| static const std::string & | theClassName () |
Protected Member Functions | |
| virtual void | connectToListenerSignals () override |
| virtual void | connectToSettingsSignals () override |
| virtual void | addSceneObjectToUpdaters (DtModelSetId modelSet, DtSceneObjectAgent *sceneObjectAgent) override |
| virtual void | removeSceneObjectFromUpdaters (DtModelSetId modelSet, DtSceneObjectAgent *sceneObjectAgent) override |
| virtual void | slot_resetSmoother () |
| virtual void | slot_orientationClampingChanged (bool enabled) |
| virtual void | initializeDeadReckonUpdater () |
| virtual void | buildSurfaceClampingUpdater () |
| virtual void | buildWaterClampingUpdater () |
| virtual void | buildGroundClampingUpdater () |
| virtual void | initializeUpdaterChain () |
| virtual void | connectUpdaters () |
| virtual void | removeSceneObjectsFromAllUpdaters () |
| virtual void | addAllSceneObjectsToCorrectChain () |
| virtual void | startEmbarked () override |
| virtual void | endEmbarked () override |
| virtual void | slot_buoyancyDefaultLODDistanceChanged (float distance) |
| virtual void | slot_buoyancyMinimumCullDistanceChanged (float distance) |
| virtual void | slot_buoyancyCullTypeChanged (makArchives::DtEntitySettingsRecord::BuoyancyCullType cullType) |
Protected Member Functions inherited from makVrv::DtKinematicState | |
| virtual void | setEmbarked (const DtUniqueID &id) |
Additional Inherited Members | |
Protected Types inherited from makVrv::DtKinematicState | |
| using | SceneObjectMap = std::unordered_map< DtModelSetId, DtSceneObjectAgent * > |
| makVrv::DtEntityKinematicState::DtEntityKinematicState | ( | DtStateListener & | listener, |
| DtAgentManagerInterface & | sceneInterface, | ||
| DtSharedSettingsManager & | settingsManager | ||
| ) |
CTOR.
|
virtual |
DTOR.
|
delete |
not allowed - default constructor
|
delete |
not allowed - copy constructor
|
delete |
not allowed - equals operator
|
overridevirtual |
Initialize the Kinematic State Object Call processKinematicStateDefinition before initialize.
Reimplemented from makVrv::DtKinematicState.
|
overridevirtual |
Create / Destroy updater agents Calls initializeDeadReckonUpdater Calls buildSurfaceClampingUpdater if myIsAmphibious else Calls buildWaterClampingUpdater if myWaterClampingPossible else Calls buildGroundClampingUpdater Finally calls initializeUpdaterChain and resetSpatialAttributes.
Implements makVrv::DtKinematicState.
|
overridevirtual |
Create / Destroy updater agents Calls initializeDeadReckonUpdater Calls buildSurfaceClampingUpdater if myIsAmphibious else Calls buildWaterClampingUpdater if myWaterClampingPossible else Calls buildGroundClampingUpdater Finally calls initializeUpdaterChain and resetSpatialAttributes.
Implements makVrv::DtKinematicState.
|
overridevirtual |
Processor the vis def for the kin state, as we no longer have a kin state visualizer The definition for Model Set 0 is currently used for the whole element kinematic object In the future, whole element parameters will be added and these will be used instead Call this BEFORE initialize.
Reimplemented from makVrv::DtKinematicState.
|
virtual |
Spatial MethodsCalls all spatial methods, with info from the listener.
This version will use the time supplied as the dead reckoned time.
|
virtual |
This version will use the time supplied as the dead reckoned time.
|
virtual |
This version will use the time supplied as the dead reckoned time.
|
virtual |
This version will use the time supplied as the dead reckoned time.
|
virtual |
This version will use the time supplied as the dead reckoned time.
|
virtual |
Call to scene object to set location. This version will use the DE representation of the current sim time when using dead reckoning.
|
virtual |
Call to scene object to set orientation. This version will use the DE representation of the current sim time when using dead reckoning.
|
virtual |
Call to scene object to set velocity. This version will use the DE representation of the current sim time when using dead reckoning.
|
virtual |
Call to scene object to set angular velocity. This version will use the DE representation of the current sim time when using dead reckoning.
|
virtual |
Call to scene object to set acceleration. This version will use the DE representation of the current sim time when using dead reckoning.
|
virtual |
Dead reckoningSets the DR settings on the DR Updater, and tells the listener that DR has been set.
|
virtual |
Set whether the Entity smooths.
|
virtual |
Set the period for entity smoothing.
|
virtual |
AmphibiousIf a surface clamping updater is created (to clamp to dynamic ocean) this flag indicates if checks for on water vs. on land need to happen. This can be very expensive; off by default.
|
virtual |
Get if this entity needs on water vs. on land checks.
|
virtual |
Buoyancy (water clamping)Calls setWaterClampingEnabled on the dynamic ocean clamper (buoyancy model). Note: If the visualizer definition does have "ClampWater" specified, enabling water clamping will not work.
|
virtual |
Set whether this kinematic object should use the dynamic ocean clamper (normally set via entity display settings)
|
virtual |
Set the distance from any observer beyond which this entity, if buoyancy is enabled, will not run the model.
|
virtual |
Set an altitude offset from the scene object origin to its waterline.
|
virtual |
Ground clamping code.
Gets / Sets this entity's clamping settings
Set ground clamping enabled or not
|
virtual |
Set ground clamping mode using bit flags defined in DtGroundClampingUpdater::GroundClampingMode.
|
virtual |
Set the flags for all possible modes for this entity.
|
virtual |
Set whether ground clamp uses the distance cutoff.
|
virtual |
Set the scale factor for ground clamping distance culling by radius.
|
virtual |
Change the life form upright state for all entities.
|
virtual |
Get the entity's current ground clamping mode.
|
virtual |
Get / Set the Motion Model.
|
virtual |
Get / Set the Motion Model.
|
virtual |
StatesSet whether the entity is frozen, pausing any animations.
|
virtual |
Set the damage state (used for sinking watercraft)
|
static |
Returns "DtEntityKinematicState", this is used by the DtKinematicStateCreatorTemplate to find and register the correct creator instance e.g. findInstance( KinematicState::theClassName() + "Creator" ));.
|
overrideprotectedvirtual |
Connect slots to listener's signals.
Reimplemented from makVrv::DtKinematicState.
|
overrideprotectedvirtual |
Connect slots to settings signals.
Implements makVrv::DtKinematicState.
|
overrideprotectedvirtual |
Adds a scene object to the end of the updater chain.
Calls addSceneObjectToUpdateAtChainEnd on the embarktion updater if this entity is embarked else it is called on the dead reckoning updater
Implements makVrv::DtKinematicState.
|
overrideprotectedvirtual |
Removes a scene object from the end of the updater chain.
Calls removeSceneObjectToUpdateAtChainEnd either the embarkation updater ( Going from embarked to non-embarked ) or the dead reckon updater ( Going from non-embarked to embarked )
Implements makVrv::DtKinematicState.
|
protectedvirtual |
Build Updaters.
|
protectedvirtual |
Built if isamphibious is set in the visualizer definition.
|
protectedvirtual |
Built if ClampWater is set as clamp mode in the visualizer definition.
|
protectedvirtual |
Built if neither surface or water clamping are built and ClampMode != ClampNone.
|
protectedvirtual |
initializeUpdaterChain calls the following: removeSceneObjectsFromAllUpdaters -> connectUpdaters -> addAllSceneObjectsToCorrectChain This means that extra updaters can be added to the chain by overriding only connectUpdaters
|
protectedvirtual |
This is only called from initializeUpdaterChain, it should not be called anywhere else.
|
protectedvirtual |
Build Updaters.
|
protectedvirtual |
Build Updaters.
|
overrideprotectedvirtual |
Embarkation / Parenting.
Implements makVrv::DtKinematicState.
|
overrideprotectedvirtual |
Embarkation / Parenting.
Implements makVrv::DtKinematicState.
|
protectedvirtual |
|
protectedvirtual |
Buoyancy slots.
|
protectedvirtual |
Buoyancy slots.
|
protectedvirtual |
Buoyancy slots.
|
protectedvirtual |
Change the orientation clamping for all entities.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Ground clamping members.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |