![]() |
VR-Forces 4.0.4 Class Documentation
|
End User Description: The first time the controller is ticked will record the simulation time. More...

Public Member Functions | |
| DtLimitExistenceController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
| virtual | ~DtLimitExistenceController () |
| destructor | |
| virtual DtString | type () const |
| Returns a string identifies the class type of component. | |
| virtual bool | init () |
| Initialize the component. | |
| virtual void | tick () |
| Calculate new control values. | |
| virtual void | setElapsedTimeSinceCreation (DtTime elapsedTime) |
| Stored in the PSR, this keeps track of the amount of time that has passed since the entity was created. | |
| virtual DtTime | elapsedTimeSinceCreation () const |
| virtual void | removeEntity () |
| When duration is reached, call removeEntity. | |
Static Public Member Functions | |
| static DtSimComponent * | creator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
Protected Member Functions | |
| virtual bool | createPSR () |
| Called by init to create the process state repository. | |
| DtLimitExistenceController () | |
| Not implemented. | |
| DtLimitExistenceController (const DtLimitExistenceController &orig) | |
| Not implemented. | |
| const DtLimitExistenceController & | operator= (const DtLimitExistenceController &orig) |
| Not implemented. | |
Protected Attributes | |
| DtLimitExistencePSR * | myProcessState |
| Pointer to a process state repository used to store state data associated with this component. | |
| const DtLimitExistenceControllerDescriptor * | myLimitExistenceDescriptor |
| Descriptor for this component. | |
| bool | myFirstTick |
End User Description: The first time the controller is ticked will record the simulation time.
Each tick will updated the elapsed time since creation. In the descriptor for this controller is a duration parameter. This is the life time of the entity. The controller will keep track of time and when the entity has been in the simulation for the specified duration, this controller will remove the entity from the simulation. What this really means: Say you have a flare launcher. When it gets a DtLaunchCounterMeasuresTask it will create a flare entity in the simulation. You attach this controller component to it. In the descriptor you say 30 seconds. Once the entity is created this controller will count down the 30 seconds representing the flare buring in the sky. After 30 seconds the flare dies out so there is no longer any use for the flare entity. This controll hence removes it. Uses Descriptor Type: DtLimitExistenceControllerDescriptor
| DtLimitExistenceController::DtLimitExistenceController | ( | const DtString & | name, |
| DtVrfObject * | owner, | ||
| DtSimManager * | simManager, | ||
| DtComponentDescriptor * | desc = 0, |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) |
(const DtString&,DtVrfObject*,DtSimManager*,
| name | Reader writer name of this component. |
| owner | The DtVrfObject that owns this component |
| simManager | The simulation manager (provides access to terrain, message interface, simulation clock). |
| desc | The component descriptor used to initialize this component. |
| parentRegistry | Pointer to the parent reader writer registry (the containing object that reads/writes this object). |
| virtual DtLimitExistenceController::~DtLimitExistenceController | ( | ) | [virtual] |
destructor
| DtLimitExistenceController::DtLimitExistenceController | ( | ) | [protected] |
Not implemented.
| DtLimitExistenceController::DtLimitExistenceController | ( | const DtLimitExistenceController & | orig | ) | [protected] |
Not implemented.
| virtual DtString DtLimitExistenceController::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.
Implements DtTaskControllerComponent.
| virtual bool DtLimitExistenceController::init | ( | ) | [virtual] |
| virtual void DtLimitExistenceController::tick | ( | ) | [virtual] |
Calculate new control values.
The first call to tick will restore the checkpointed value of myCurrentMunition and myCurrentFuze from the the munition loader of the DtVrfBalGunPSR.
Reimplemented from DtSimComponent.
| virtual void DtLimitExistenceController::setElapsedTimeSinceCreation | ( | DtTime | elapsedTime | ) | [virtual] |
Stored in the PSR, this keeps track of the amount of time that has passed since the entity was created.
| virtual DtTime DtLimitExistenceController::elapsedTimeSinceCreation | ( | ) | const [virtual] |
| virtual void DtLimitExistenceController::removeEntity | ( | ) | [virtual] |
When duration is reached, call removeEntity.
This will queue the entity for removal from the simulation in the vrfObjectManager.
| static DtSimComponent* DtLimitExistenceController::creator | ( | const DtString & | name, |
| DtVrfObject * | owner, | ||
| DtSimManager * | simManager, | ||
| DtComponentDescriptor * | desc = 0, |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) | [static] |
(const DtString&,DtVrfObject*,DtSimManager*,
| name | Reader writer name of this component. |
| owner | The DtVrfObject that owns this component |
| simManager | The simulation manager (provides access to terrain, message interface, simulation clock). |
| desc | The component descriptor used to initialize this component. |
| parentRegistry | Pointer to the parent reader writer registry (the containing object that reads/writes this object). |
| virtual bool DtLimitExistenceController::createPSR | ( | ) | [protected, virtual] |
Called by init to create the process state repository.
This will save out how long the entity has left to live.
| const DtLimitExistenceController& DtLimitExistenceController::operator= | ( | const DtLimitExistenceController & | orig | ) | [protected] |
Not implemented.
Pointer to a process state repository used to store state data associated with this component.
Stores the time the entity was created.
const DtLimitExistenceControllerDescriptor* DtLimitExistenceController::myLimitExistenceDescriptor [protected] |
Descriptor for this component.
Allows user to specify how long the entity should exist for.
bool DtLimitExistenceController::myFirstTick [protected] |