![]() |
VR-Forces 4.10 Class Documentation
|
Scene Object Updater. More...

Classes | |
| struct | UpdateLODParams |
Public Member Functions | |
| 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 | update (DtTime tNow) |
| The update function called by DtTickableManager during update-ticks. 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... | |
| DtSceneObjectUpdater * | findNextUpdater () const |
| Return the next updater in the updater chain. More... | |
| DtSceneObjectUpdater * | findPrevUpdater () 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 DtSceneObjectUpdater * | chainHead () |
| 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... | |
| DtSceneObject * | findSceneObject () |
| 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 |
Public Attributes | |
Signals | |
Signal that this updater is being destroyed | |
| boost::signalslib::signal < void(const DtUniqueID &) > | signal_updaterToBeDeleted |
Protected Member Functions | |
| 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... | |
Slots | |
Slot called when the a scene object is to be deleted. If its the scene object that this updater is updating, then the local scene object copy is set to false | |
| 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 | |
| DtDe & | myDe |
| The display engine. More... | |
| DtUniqueID | myUniqueId |
| This distributed object's unique identifier. More... | |
| DtSceneObject * | mySceneObject |
| 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 |
| DtSceneObjectUpdater * | myNextUpdater |
| The next updater in the chain (or NULL) More... | |
| DtSceneObjectUpdater * | myPrevUpdater |
| 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 | |
| DtTickableManagerInterface * | myManager |
| 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 |
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... | |
Scene Object Updater.
DtSceneObjectUpdater is a distributed object managed by DtTickableManager. It provides an API and infrastructure used by deriving objects to update the position and orientation of scene objects in render space. DtSceneObjectUpdaters may be chained together in a list to perform multiple position and/or orientation transformations. For example, one updater might dead reckon position and orientation based on kinematic info, the next in the chain could ground clamp the object. A third might adjust the ground clamped position to support terrain scaling.
02/23/2020 - Added support for determine whether an updater chain should be placed on the threaded or unthreaded DtTickableManager tickable list
| makVrv::DtSceneObjectUpdater::DtSceneObjectUpdater | ( | DtDe & | de, |
| DtUniqueID | id | ||
| ) |
CTOR.
| [in] | de | is the display engine. |
| [in] | id | is a unique identifier for this distributed object. |
|
virtual |
Virtual DTOR.
|
virtual |
Set the next updater in the updater chain.
| [in] | nextUpdater | is the next updater in this updater chain When the next updater is null, it indicates that the updater is at the end of the chain. Its output will be used to set the appropriate vertex (set using setVertexToUpdate) in the scene object. Updaters with a non-null next updater will provide its outputs to the inputs of the next updater. |
Reimplemented in makVrv::DtSurfaceClampingUpdater.
|
virtual |
Set the previous updater in the updater chain.
| [in] | prevUpdater | is the prev updater in this updater chain When the previous updater is null, it indicates that this is the start of the updater chain; intial position and information is provided using setInputPosition and setInputOrientation. |
The check function called by DtTickableManager to verify if an update is required.
If this function returns true, the DtTickableManager will then call update().
| [in] | tNow | is the current time-stamp. |
| true | if this object needs to be ticked. |
| false | otherwise. This base class method uses both the time and the presence of valid input transforms to determine if the updater should be ticked. Will always be true if the object is being observed |
Reimplemented from makVrv::DtTickable.
|
virtual |
The update function called by DtTickableManager during update-ticks.
| [in] | tNow | is the current time-stamp. |
Implements makVrv::DtTickable.
Reimplemented in makVrv::DtEmbarkationUpdater, makVrv::DtMultiPointEmbarkationUpdater, makVrv::DtSurfaceClampingUpdater, makVrv::DtVertexUpdater, makVrv::DtGroundClampingUpdater, makVrv::DtMultiPointSceneObjectUpdater, makVrv::DtWaterClampingUpdater, makVrv::DtDeadReckonUpdater, and makVrv::DtTerrainScalingUpdater.
|
virtual |
This is called by the update function after all the original chaining updates happen.
| [in] | lastPos | is the position right before update was run . |
| [in] | deltaTime | is useful for calculating velocity of the objects |
Specify which vertex in the scene object this updater updates.
| [in] | vertex | is the vertex in the scene object to update. |
Reimplemented in makVrv::DtSurfaceClampingUpdater.
|
virtual |
Set the position input to this updater.
| [in] | position | is the position to use. |
Reimplemented in makVrv::DtDeadReckonUpdater, and makVrv::DtSurfaceClampingUpdater.
|
virtual |
Set the orientation input to this updater.
| [in] | orientation | is the orientation to use. |
Reimplemented in makVrv::DtDeadReckonUpdater, and makVrv::DtSurfaceClampingUpdater.
|
virtual |
Output the resultant position.
If there is a next updater, this will call that updater's setInputPosition with the result. Otherwise the result will be provided to the specified scene object
| [in] | position | is the position to set. |
Reimplemented in makVrv::DtBoxUpdater.
|
virtual |
Output the resultant orientation.
If there is a next updater, this will call that updater's setInputOrientaiton with the result. Otherwise the result will be provided to the specified scene object
| [in] | orientation | is the orientation to set. |
|
virtual |
Set both the position and orientation at the same time.
This allows the scene obejct and DtModels to set both at the same time which can avoid additional calculations when the two depend on each other. Currently only the DtDiGuyCharacterModel takes advantage of the performance improvement
Reimplemented in makVrv::DtBoxUpdater.
|
virtual |
Get the time-stamp of the last update.
|
virtual |
Set the scene object to be updated.
| [in] | sceneObject | is the scene object to receive updates. |
| [in] | addToTickableMgrIfHead | will allow (or disallow) the updater to be added to the tickable manager if it is currently has no 'previous' updater. This is a workaround used for cases where updaters aren't part of a simple chain, like the buoyancy and ground clamping updaters which are owned by a surface updater |
|
virtual |
Set the scene object to be updated.
| [in] | sceneObject | is the scene object to receive updates. Calls setSceneObject(DtSceneObject* sceneObject, bool addToTickableMgrIfHead) with addToTickableMgrIfHead=true for back compatibility |
Reimplemented in makVrv::DtSurfaceClampingUpdater, and makVrv::DtDeadReckonUpdater.
|
virtual |
brief set if the lod update system is on for this model
|
virtual |
brief gets if the lod update system is on for this model
Reimplemented from makVrv::DtTickable.
|
virtual |
brief sets the value that linearly adjusts the range of the lod radii by the velocity
|
virtual |
brief gets the value that linearly adjusts the range of the lod radii by the velocity
|
virtual |
brief sets the near radius where the update rate starts to fall off
|
virtual |
brief gets the near radius where the update rate starts to fall off
|
virtual |
brief sets the far radius where the update rate stops falling off
|
virtual |
brief gets the far radius where the update rate stops falling off
|
virtual |
sets the update rate at the near radius, defaults to every six ticks
|
virtual |
brief gets the update rate at the near radius, defaults to every six ticks
|
virtual |
brief the update rate at the far radius, defaults to every 30 ticks
|
virtual |
brief gets the update rate at the far radius defaults to every 30 ticks
|
inline |
Get the current scene object for this updater.
|
inline |
const correct version
|
inline |
Returns the distributed object id of this updater.
|
inline |
Return the next updater in the updater chain.
|
inline |
Return the previous updater in the updater chain.
|
virtual |
Check all the updaters in the current chain and determine if the chain is thread safe.
Called to determine which tickable list the first updater should be placed on.
|
virtual |
Find the first updater in the chain.
|
virtual |
Override the DtTickable base class' method so retest the entire chain this updater belongs to.
Reimplemented from makVrv::DtTickable.
|
protectedvirtual |
Reimplemented in makVrf::DtVrfMultiPointEmbarkationUpdater, and makVrv::DtOverlayPolygonEmbarkationUpdater.
|
protectedvirtual |
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.
Catches the exception that DtTickableManager may throw and outputs an appropriate message to the debug log
|
protectedvirtual |
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.
Catches the exception that DtTickableManager may throw and outputs an appropriate message to the debug log
|
protectedvirtual |
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.
Catches the exception that DtTickableManager may throw and outputs an appropriate message to the debug log
|
protectedvirtual |
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.
Catches the exception that DtTickableManager may throw and outputs an appropriate message to the debug log
|
protectedvirtual |
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.
| boost::signalslib::signal< void ( const DtUniqueID& ) > makVrv::DtSceneObjectUpdater::signal_updaterToBeDeleted |
|
protected |
The display engine.
|
protected |
This distributed object's unique identifier.
|
protected |
A pointer to the current scene object being updated.
|
protected |
This updater is registered as a modelset-specific tickable; this is the modelset it's registered with.
|
protected |
|
protected |
The next updater in the chain (or NULL)
|
protected |
The previous updater in the chain (or NULL)
The default scene object vertex to update.
|
protected |
Input position.
|
protected |
Input Orientation.
|
protected |
Flag to indicate if setOutputPosition has been called this tick.
If a deriving updater hasn't called setOutputPosition, this base class will copy the input position to the output.
|
protected |
Flag to indicate if setOutputOrientation has been called this tick.
If a deriving updater hasn't called setOutputPosition, this base class will copy the input orientation to the output.
|
protected |
automatic lod system params