![]() |
VR-Forces Developer's Guide
|
Base class for Kinematic State Objects e.g. DtEntityKinematicState Controls kinematic state of a scene object. Kinematic state objects use updaters to modify input values and apply them to scene objects. There is now one kinematic state object per element. An element that has a kinematic state object will add scene objects to a kinematic state ( via addSceneObject ) on a per model set basis; one scene object per model set. Each scene object is then added to the updater chain to receive spatial info updates ( addSceneObjectToUpdaters ). There is one updater chain that updates all the scene objects of an element. For example, all entity kinematic states will have a DtDeadReckonUpdater and perhaps a ground clamping updater (if specified in the Kinematic State visualizer definition for the 3D model set, processed in processKinematicStateDefinition). These updaters are "chained", the kinematic state sends spatial info to the DtDeadReckonUpdater which calculates and modifies the values, these are then passed to the DtGroundClampingUpdater, which will modify the spatial info again and finally send them to the scene object.
As there is one kinematic state object per element, and therefore one updater chain per element, when ground clamping or buoyancy are turned off/on they will be applied to ALL scene objects for all model sets of that element. This means that 2D icons positions/orientations can be clamped.

Public Member Functions | |
| DtKinematicState (DtStateListener &listener, DtAgentManagerInterface &sceneInterface, DtSharedSettingsManager &settingsManager) | |
| virtual | ~DtKinematicState () |
| DtKinematicState ()=delete | |
| DtKinematicState (const DtKinematicState &)=delete | |
| DtKinematicState & | operator= (const DtKinematicState &)=delete |
| virtual void | initialize () |
| virtual void | processKinematicStateDefinition (const DtVisualizerDefinition *visDef) |
| virtual void | createUpdaters ()=0 |
| virtual void | destroyUpdaters ()=0 |
| 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) |
Protected Types | |
| using | SceneObjectMap = std::unordered_map< DtModelSetId, DtSceneObjectAgent * > |
Protected Member Functions | |
| virtual void | connectToListenerSignals () |
| virtual void | connectToSettingsSignals ()=0 |
| virtual void | addSceneObjectToUpdaters (DtModelSetId modelSet, DtSceneObjectAgent *sceneObjectAgent)=0 |
| virtual void | removeSceneObjectFromUpdaters (DtModelSetId modelSet, DtSceneObjectAgent *sceneObjectAgent)=0 |
Protected Attributes | |
| SceneObjectMap | mySceneObjectMap |
| DtStateListener & | myStateListener |
| DtAgentManagerInterface & | mySceneInterface |
| DtSharedSettingsManager & | mySettingsManager |
| DtSignalConnectionManager | myConnections |
| DtUniqueID | myEmbarkedParentSceneObjectID |
| bool | myEmbarkedFlag |
| bool | myInitialized |
| bool | myDistributeFlag |
| virtual void | setParentElement (DtElement *parent) |
| virtual void | updateParentElementSceneObject (DtElement *parent) |
| virtual void | setEmbarked (const DtUniqueID &id) |
| virtual void | startEmbarked ()=0 |
| virtual void | endEmbarked ()=0 |
|
protected |
Model set to scene object map.
| makVrv::DtKinematicState::DtKinematicState | ( | DtStateListener & | listener, |
| DtAgentManagerInterface & | sceneInterface, | ||
| DtSharedSettingsManager & | settingsManager | ||
| ) |
CTOR.
|
virtual |
DTOR.
|
delete |
not allowed - default constructor
|
delete |
not allowed - copy constructor
|
delete |
not allowed - equals operator
|
virtual |
Initialize the Kinematic State Object Call processKinematicStateDefinition before initialize.
Reimplemented in makVrv::DtEntityKinematicState, makVrv::DtEnvironmentalKinematicState, makVrv::DtShapeEnvironmentalKinematicState, and makVrv::DtVertexEnvironmentalKinematicState.
|
pure virtual |
Not implemented.
Implemented in makVrv::DtEnvironmentalKinematicState, and makVrv::DtEntityKinematicState.
|
pure virtual |
Not implemented.
Implemented in makVrv::DtEnvironmentalKinematicState, makVrv::DtEntityKinematicState, and makVrv::DtVertexEnvironmentalKinematicState.
|
virtual |
Scene object methods.
|
virtual |
Scene object methods.
|
virtual |
Attempt to find the scene object for a give model set, can return nullptr.
|
virtual |
Get / Set the distribute flag, used when updater agents are created. When set to true these agents will be sent to remote displays.
|
virtual |
Get / Set the distribute flag, used when updater agents are created. When set to true these agents will be sent to remote displays.
|
virtual |
Processor the vis def for the kin state, as we no longer have a kin state visualizer The definition for DtModelSetId::Models3D (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 in makVrv::DtEntityKinematicState.
|
virtual |
Embarkation / ParentingAttempts to find a valid scene object id from the parent element calls setEmbarked if one is found. Uses the 3D Models ( ModelSet3dModels ) scene object if it is available, if not it will then try the Icons2D scene object and finally the ModelsColorized scene object.
|
virtual |
If a model set is getting destroyed, attempt to find a new valid scene object.
|
protectedvirtual |
Embarks this object on the specified parent scene object Sets myEmbarkedParentSceneObjectID and myEmbarkedFlag calls startEmbarked()
|
protectedpure virtual |
Pure virtual - implemented by derived classes startEmbarked requires an embarkation updater Tells the embarkation updater to embark the entity on myEmbarkedParentSceneObjectID.
Implemented in makVrv::DtEntityKinematicState, makVrv::DtShapeEnvironmentalKinematicState, makVrv::DtEnvironmentalKinematicState, and makVrv::DtVertexEnvironmentalKinematicState.
|
protectedpure virtual |
Embarkation / ParentingAttempts to find a valid scene object id from the parent element calls setEmbarked if one is found. Uses the 3D Models ( ModelSet3dModels ) scene object if it is available, if not it will then try the Icons2D scene object and finally the ModelsColorized scene object.
Implemented in makVrv::DtEntityKinematicState, makVrv::DtShapeEnvironmentalKinematicState, makVrv::DtEnvironmentalKinematicState, and makVrv::DtVertexEnvironmentalKinematicState.
|
protectedvirtual |
|
protectedpure virtual |
Not implemented - derived kin states do.
Implemented in makVrv::DtEntityKinematicState, and makVrv::DtEnvironmentalKinematicState.
|
protectedpure virtual |
Not implemented.
Implemented in makVrv::DtEntityKinematicState, makVrv::DtEnvironmentalKinematicState, makVrv::DtShapeEnvironmentalKinematicState, and makVrv::DtVertexEnvironmentalKinematicState.
|
protectedpure virtual |
Not implemented.
Implemented in makVrv::DtEntityKinematicState, makVrv::DtEnvironmentalKinematicState, makVrv::DtShapeEnvironmentalKinematicState, and makVrv::DtVertexEnvironmentalKinematicState.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
There is now one updater chain, the embarkation updater uses the 3D Models ( ModelSet3dModels ) scene object to update from if it is available, if not it will then try the Icons2D scene object and finally the ModelsColorized scene object.
|
protected |
|
protected |
Has initialized been called before. Used so that signals are only connected once.
|
protected |