VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtTickable Class Reference

An abstract base class for objects that require updates. More...

Inheritance diagram for makVrv::DtTickable:
Inheritance graph
[legend]

Public Member Functions

virtual bool needsUpdate (DtTime tNow)
 The check function called by DtTickableManager to verify if an update is required.
virtual void update (DtTime tNow)=0
 The update function called by DtTickableManager during update-ticks.
virtual ~DtTickable ()
 Virtual DTOR.
virtual void setUpdatePeriod (unsigned int period)
 Specify how often (in # of frames) this tickable should call update.
virtual unsigned int updatePeriod () const
 Specify how often (in # of frames) this tickable should call update.

Protected Member Functions

 DtTickable (DtTickableManagerInterface *manager)
 CTOR.
 DtTickable ()
 Unimplemented default CTOR.
virtual void slot_managerAboutToBeDeleted ()

Protected Attributes

DtTickableManagerInterfacemyManager
 Pointer to manager for removal during destruction.
DtSignalConnectionManager myConnections
unsigned int myFrameCounter
unsigned int myFrameToUpdate
unsigned int myUpdatePeriod

Detailed Description

An abstract base class for objects that require updates.

This object automatically adds itself to a DtTickableManager.

Constructor & Destructor Documentation

virtual makVrv::DtTickable::~DtTickable ( )
virtual

Virtual DTOR.

makVrv::DtTickable::DtTickable ( DtTickableManagerInterface manager)
protected

CTOR.

Parameters
[in]manageris 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
makVrv::DtTickable::DtTickable ( )
protected

Unimplemented default CTOR.

Member Function Documentation

virtual bool makVrv::DtTickable::needsUpdate ( DtTime  tNow)
virtual

The check function called by DtTickableManager to verify if an update is required.

If this function returns true, the DtTickableManager will then call update().

Parameters
[in]tNowis the current time-stamp.
Return values
trueif this object needs to be ticked.
falseotherwise. 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::DtSceneObjectUpdater, makVrv::DtMultiDeadReckonUpdater, makVrv::DtShipFlagDirTickable, makVrv::DtCameraShake, makVrv::DtEllipseUpdater, makVrv::DtShipFlagSwitchTickable, makVrv::DtSmokePuffsDeadReckonUpdater, makVrv::DtTritonWakeUpdater, makVrv::DtWindSwitchTickable, makVrv::DtArtPartDecorationUpdater, makVrv::DtHeadingLineUpdater, makVrv::DtTrackHistoryUpdater, makVrv::DtWindDirTickable, makVrv::DtWindRotTickable, makVrf::DtPriorityUpdater, makVrv::DtEnvironmentalIconCenteringUpdater, makVrv::DtTritonTidalStreamWakeUpdater, makVrv::DtTritonRotorWashUpdater, makVrv::DtSymbolDecorationUpdater, and makVrv::DtNavigationLightUpdater.

virtual void makVrv::DtTickable::update ( DtTime  tNow)
pure virtual
virtual void makVrv::DtTickable::setUpdatePeriod ( unsigned int  period)
virtual

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 unsigned int makVrv::DtTickable::updatePeriod ( ) const
virtual

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 void makVrv::DtTickable::slot_managerAboutToBeDeleted ( )
protectedvirtual

Member Data Documentation

DtTickableManagerInterface* makVrv::DtTickable::myManager
protected

Pointer to manager for removal during destruction.

DtSignalConnectionManager makVrv::DtTickable::myConnections
protected
unsigned int makVrv::DtTickable::myFrameCounter
protected
unsigned int makVrv::DtTickable::myFrameToUpdate
protected
unsigned int makVrv::DtTickable::myUpdatePeriod
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)