VR-Forces 4.0.4 Class Documentation
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
DtGlobalEnvironmentActuator Class Reference

An actuator that manages the changes in the global environment, such as advancing the time of day. More...

Inheritance diagram for DtGlobalEnvironmentActuator:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtGlobalEnvironmentActuator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,
virtual ~DtGlobalEnvironmentActuator ()
 destructor
virtual bool init ()
 to get access to the entity's localStateRepository, which this component will update, and then connect to the controller's ports.
virtual void tick ()
 This gives the thread of control to the component.
virtual DtString type () const
 Returns a string identifies the class type of component.

Static Public Member Functions

static DtSimComponentcreator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,

Protected Member Functions

virtual void updateTimeOfDay ()
 Updates the time of day in the objects state repository.
virtual void updateIllumination ()
 Calculates an illumination value based on the current time of day and sets this in the state repository.
virtual bool timeWithinPeriod (double testTime, double startPeriod, double endPeriod) const
virtual double percentThoughTimePeriod (double testTime, double startPeriod, double endPeriod) const

Protected Attributes

DtGlobalEnvironmentStateRepositorymyGlobalEnvironmentSR
const
DtGlobalEnvironmentActuatorDescriptor
myGlobalEnvironmentDescriptor

Private Member Functions

 DtGlobalEnvironmentActuator ()
 Not Implemented.
 DtGlobalEnvironmentActuator (const DtGlobalEnvironmentActuator &orig)
 Not Implemented.
const DtGlobalEnvironmentActuatoroperator= (const DtGlobalEnvironmentActuator &orig)
 Not Implemented.

Detailed Description

An actuator that manages the changes in the global environment, such as advancing the time of day.

This actuator must be placed on an object with a DtGlobalEnvironmentStateRepository. Uses Descriptor Type: DtGlobalEnvironmentActuatorDescriptor


Constructor & Destructor Documentation

Not Implemented.

Not Implemented.

DtGlobalEnvironmentActuator::DtGlobalEnvironmentActuator ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
)

(const DtString&,DtVrfObject*,DtSimManager*,

Parameters:
nameReader writer name of this component.
ownerThe DtVrfObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
(const DtString&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

destructor


Member Function Documentation

const DtGlobalEnvironmentActuator& DtGlobalEnvironmentActuator::operator= ( const DtGlobalEnvironmentActuator orig) [private]

Not Implemented.

virtual bool DtGlobalEnvironmentActuator::init ( ) [virtual]

to get access to the entity's localStateRepository, which this component will update, and then connect to the controller's ports.

Reimplemented from DtActuatorComponent.

virtual void DtGlobalEnvironmentActuator::tick ( ) [virtual]

This gives the thread of control to the component.

The component is ticked once each simulation from by the component list it's on. This base class tick has no functionality.

Reimplemented from DtSimComponent.

virtual DtString DtGlobalEnvironmentActuator::type ( ) const [virtual]

Returns a string identifies the class type of component.

Type values are defined in compTypes.h. DtSimComponent creation functions are registered with the DtSimComponentFactory using the type values as the key.

Returns:
DtGlobalEnvironmentActuatorType

Reimplemented from DtSimComponent.

static DtSimComponent* DtGlobalEnvironmentActuator::creator ( const DtString name,
DtVrfObject owner,
DtSimManager simManager,
DtComponentDescriptor desc = 0,
DtReaderWriterRegistry parentRegistry = 0 
) [static]

(const DtString&,DtVrfObject*,DtSimManager*,

Parameters:
nameReader writer name of this component.
ownerThe DtVrfObject that owns this component
simManagerThe simulation manager (provides access to terrain, message interface, simulation clock).
descThe component descriptor used to initialize this component.
parentRegistryPointer to the parent reader writer registry (the containing object that reads/writes this object).
(const DtString&,DtVrfObject*,DtSimManager*, DtComponentDescriptor*,DtReaderWriterRegistry* parentRegistry)

Returns:
New instance of this class.
virtual void DtGlobalEnvironmentActuator::updateTimeOfDay ( ) [protected, virtual]

Updates the time of day in the objects state repository.

virtual void DtGlobalEnvironmentActuator::updateIllumination ( ) [protected, virtual]

Calculates an illumination value based on the current time of day and sets this in the state repository.

virtual bool DtGlobalEnvironmentActuator::timeWithinPeriod ( double  testTime,
double  startPeriod,
double  endPeriod 
) const [protected, virtual]
Returns:
True if testTime is within the period specified by startPeriod and endPeriod. All times are specified as 0 - 24*60*60. The period may wrap around the end of the day. For example, the period may start at the end of the day, and end at the beginning, and the time still be within in.
virtual double DtGlobalEnvironmentActuator::percentThoughTimePeriod ( double  testTime,
double  startPeriod,
double  endPeriod 
) const [protected, virtual]
Returns:
The percent (0 - 1.0) though the time period which testTime occurs. All times are specified as 0 - 24*60*60. The period may wrap around the end of the day.
Note:
If testTime is not within the period (as defined by timeWithinPeriod()), the return value is undefined.

Member Data Documentation


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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)