![]() |
VR-Forces 5.0.3 Developer's Guide
|
An abstract base class for objects that require updates. This object automatically adds itself to a DtTickableManager.

Public Types | |
| enum | TickableListState { TickableNotOnList, TickableOnMainList, TickableOnThreadSafeList } |
Public Member Functions | |
| virtual bool | needsUpdate (DtTime tNow) |
| virtual bool | updateIfNeeded (DtTime tNow) |
| virtual void | update (DtTime tNow)=0 |
| virtual | ~DtTickable () |
| virtual void | setIsThreadSafe (bool safe) |
| virtual bool | isThreadSafe () const |
| virtual void | setTickableListState (TickableListState safeList) |
| virtual TickableListState | tickableListState () const |
| virtual void | setUpdatePeriod (unsigned int period) |
| virtual unsigned int | updatePeriod () const |
| virtual bool | lodSystemEnabled () const |
Protected Member Functions | |
| DtTickable (DtTickableManagerInterface *manager) | |
| DtTickable () | |
| virtual void | slot_managerAboutToBeDeleted () |
Enumeration used to indicate which DtTickableManager's tickable list the tickable is on, if any.
| Enumerator | |
|---|---|
| TickableNotOnList | |
| TickableOnMainList | |
| TickableOnThreadSafeList | |
|
virtual |
Virtual DTOR.
|
protected |
CTOR.
| [in] | manager | is the managing object to update this object; NULL may be passed to create an unticked tickable Do not delete this object explicitly, because the manager now owns it and will delete it on its own |
|
protected |
Unimplemented default CTOR.
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. The base class checks handles period checks (for tickables that don't tick every frame. Deriving methods can incorporate that capability by calling down to the base class first. |
Reimplemented in makVrv::DtAttachableUpdater, makVrv::DtOsgGlStudioCockpit, makVrv::DtDynamicTerrainObject, makVrv::DtSceneObjectUpdater, makVrv::DtShipFlagDirTickable, makVrv::DtMultiDeadReckonUpdater, makVrv::DtShipFlagSwitchTickable, makVrv::DtCameraShake, makVrv::DtSymbolDecorationUpdater, makVrf::DtSensorContactLinesUpdater, makVrv::DtTritonWakeUpdater, makVrv::DtOverWaterUpdater, makVrf::DtSpotReportTrackHistoryUpdater, makVrv::DtEnvironmentalIconCenteringUpdater, makVrv::DtTrackMonitor, makVrv::DtWindDirTickable, makVrv::DtWindRotTickable, makVrv::DtWindSwitchTickable, makVrf::DtPriorityUpdater, makVrv::DtHeadingLineUpdater, makVrv::DtInfoWidgetUpdater, makVrv::DtTritonTidalStreamWakeUpdater, makVrv::DtArtPartDecorationUpdater, makVrv::DtTrackHistoryUpdater, and makVrv::DtNavigationLightUpdater.
Calls needsUpdate(), and then calls update() if needsUpdate() is true.
|
pure virtual |
The update function called by DtTickableManager during update-ticks.
| [in] | tNow | is the current time-stamp. |
Implemented in makVrv::DtAttachableUpdater, makVrv::DtOsgGlStudioCockpit, makVrv::DtOsgEarthPaperMapManager, makVrv::DtDynamicTerrainObject, makVrv::DtEmbarkationUpdater, makVrf::DtVrfEntitySoundUpdater, makVrv::DtMultiPointEmbarkationUpdater, makVrv::DtRotorWashManager, makVrv::DtSceneObjectUpdater, makVrv::DtAttachableEntityFanUpdater, makVrv::DtEntityWheelUpdater, makVrv::DtSymbolDecorationUpdater, makVrv::DtLineModelUpdater, makVrv::DtGroundClampingUpdater, makVrv::DtCameraShake, makVrv::DtOverWaterUpdater, makVrv::DtSurfaceClampingUpdater, makVrv::DtMultiDeadReckonUpdater, makVrv::DtVertexUpdater, makVrv::DtEnvironmentalIconCenteringUpdater, makVrv::DtInfoWidgetUpdater, makVrv::DtTritonTidalStreamWakeUpdater, makVrv::DtFxParticleCollisionObjectUpdater, makVrv::DtLosTrackMonitor, makVrv::DtMultiPointSceneObjectUpdater, makVrv::DtShipFlagSwitchTickable, makVrf::DtExternalDataSymbolDecorationUpdater, makVrv::DtAttachableIntervisibilityUpdater, makVrv::DtParticleCollisionObjectUpdater, makVrv::DtWakeUpdater, makVrv::DtTritonWakeUpdater, makVrf::DtSpotReportTrackHistoryUpdater, makVrv::DtShipFlagDirTickable, makVrf::DtPriorityUpdater, makVrv::DtNavigationLightUpdater, makVrv::DtTrackMonitor, makVrv::DtRotorUpdater, makVrv::DtContinuousCameraShake, makVrv::DtTidalStreamWakeUpdater, makVrv::DtWaterClampingUpdater, makVrf::DtSensorContactLinesUpdater, makVrv::DtDeadReckonUpdater, makVrv::DtHeadingLineUpdater, makVrv::DtTrackHistoryUpdater, makVrv::DtWindDirTickable, makVrv::DtWindRotTickable, makVrv::DtWindSwitchTickable, makVrv::DtEntitySoundUpdater, makVrf::DtVrfAttachableEntityFanUpdater, and makVrv::DtTerrainScalingUpdater.
|
virtual |
Get/set whether this tickable can be updated in parallel with other tickables. Calling setIsThreadSafe() will put the tickable onto either the tickable manager's main tickable list or its threadSafe list. By default, all tickables are considered NOT thread safe, and start on the main tickable list.
Reimplemented in makVrv::DtSceneObjectUpdater.
|
virtual |
Get/set whether this tickable can be updated in parallel with other tickables. Calling setIsThreadSafe() will put the tickable onto either the tickable manager's main tickable list or its threadSafe list. By default, all tickables are considered NOT thread safe, and start on the main tickable list.
|
virtual |
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).
|
virtual |
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).
Specify how often (in # of frames) this tickable should call update. E.g, if period is set to 40, then needsUpdate will return true once every forty frames. Which frame that happens on is randomized (when the period is set) to help distribute intermittent tickables. By default, period is 1, and needsUpdate returns true every frame.
Specify how often (in # of frames) this tickable should call update. E.g, if period is set to 40, then needsUpdate will return true once every forty frames. Which frame that happens on is randomized (when the period is set) to help distribute intermittent tickables. By default, period is 1, and needsUpdate returns true every frame.
|
virtual |
is the update LOD system enabled, overridden by subclasses
Reimplemented in makVrv::DtSceneObjectUpdater.
|
protectedvirtual |
|
protected |
Pointer to manager for removal during destruction.
|
protected |
|
protected |
|
protected |
|
protected |