![]() |
VR-Forces 4.0.4 Class Documentation
|
End User Description: DtActuator is the base class for all actuator model components. More...

Public Member Functions | |
| virtual | ~DtActuatorComponent () |
| destructor | |
| virtual bool | init () |
| Overridden to cache a pointer to the entity's radio in this class. | |
| virtual DtSimBaseRadio * | radio () |
| virtual bool | tickWhileDestroyed () const |
| By default, all actuators tick when the entity is destroyed. | |
Protected Member Functions | |
| DtActuatorComponent (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| (const DtString& name, | |
| DtActuatorComponent (const DtActuatorComponent &orig) | |
| copy constructor | |
| const DtActuatorComponent & | operator= (const DtActuatorComponent &orig) |
| assignment operator | |
| virtual void | setRadio (DtSimBaseRadio *radio) |
| DtActuatorComponent () | |
| Default constructor; should not be called. | |
Protected Attributes | |
| DtSimBaseRadio * | myRadio |
| Actuators can send messages. | |
End User Description: DtActuator is the base class for all actuator model components.
Developer Description: The DtActuator base class caches a pointer to the entity's radio for convenience. Derived classes may have articulated parts that are configured from the DtActuatorComponentDescriptor's DtSimArtPartDescriptorList. For each articulated part in the list a DtArticulatedPartStateRepository will be created to store the data for the part such as it's location, rotation and so forth. These are created in the entity's DtVrfObjectStateRepository createParts() function. This call creates all the attached parts for all the actuators. These articulated state repositories are managed by the DtAttachmentManager. They are cached by their partType which is the DIS Enumeration describing the part from the disEnums.h file and was specified in the actuator's DtActuatorComponentDescriptor as descriped above. The partType is used as the category of the DtObjectType used to look up articulated parts in the DtAttachementManager. When an actuator needs access to a particular articulated part it looks it up by the part's object type.
For example:
DtObjectType rotatingPartType(DtObjectTypeOther, DtSimArtPartKind, 0, 0, artPartDescriptor->partType(), 0, 0, 0); myArtPartStateRep = dynamic_cast<DtArticulatedPartStateRepository*>(localStateRepository()-> attachments()->findPartByType(rotatingPartType));
| DtActuatorComponent::DtActuatorComponent | ( | const DtString & | name, |
| DtVrfObject * | owner, | ||
| DtSimManager * | simManager, | ||
| DtComponentDescriptor * | desc = 0, |
||
| DtReaderWriterRegistry * | parentRegistry = 0 |
||
| ) | [protected] |
(const DtString& name,
| 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). |
| DtActuatorComponent::DtActuatorComponent | ( | const DtActuatorComponent & | orig | ) | [protected] |
copy constructor
| virtual DtActuatorComponent::~DtActuatorComponent | ( | ) | [virtual] |
destructor
| DtActuatorComponent::DtActuatorComponent | ( | ) | [protected] |
Default constructor; should not be called.
Here because the compiler will generate an unprotected one otherwise.
| const DtActuatorComponent& DtActuatorComponent::operator= | ( | const DtActuatorComponent & | orig | ) | [protected] |
assignment operator
| virtual bool DtActuatorComponent::init | ( | ) | [virtual] |
Overridden to cache a pointer to the entity's radio in this class.
Reimplemented from DtSimComponent.
Reimplemented in DtDamageAdjudicationActuator, DtWeaponActuator, DtSurfaceEntityActuator, DtWarheadDetonationActuator, DtAutomotiveActuatorComponent, DtFixedWingActuatorComponent, DtHumanMovementActuator, DtBallisticGun, DtLauncherActuator, DtRotaryWingActuatorComponent, DtFallingFromSkyActuatorComponent, DtMissileCollisionActuator, DtMissileManeuverActComponent, DtSwingingPartActuator, DtGlobalEnvironmentActuator, DtIndirectArtilleryComponent, DtAggregatedMovementActuator, DtIndividualLifeFormDamageAdjudicationActuator, DtMultipleHitDamageActuator, and MyActuatorComponent.
| virtual DtSimBaseRadio* DtActuatorComponent::radio | ( | ) | [virtual] |
| virtual bool DtActuatorComponent::tickWhileDestroyed | ( | ) | const [virtual] |
By default, all actuators tick when the entity is destroyed.
Reimplemented from DtSimComponent.
| virtual void DtActuatorComponent::setRadio | ( | DtSimBaseRadio * | radio | ) | [protected, virtual] |
Reimplemented in DtDamageAdjudicationActuator, and DtDisaggregatedDamageActuator.
DtSimBaseRadio* DtActuatorComponent::myRadio [protected] |
Actuators can send messages.
Of course, if your actuator never will, you don't have to use this.