![]() |
VR-Forces 4.0.4 Class Documentation
|
DtHumanWeaponStateActuator updates the weapon state for the an individual lifeform entity. More...

Public Member Functions | |
| DtHumanWeaponStateActuator (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0) | |
| (const DtString&,DtVrfObject*,DtSimManager*, | |
| virtual | ~DtHumanWeaponStateActuator () |
| Destructor. | |
| virtual DtString | type () const |
| Returns a string identifies the class type of component. | |
| virtual void | tick () |
| Sets the weapon state to the value on myLifeFormWeaponStatePort. | |
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 | createPorts () |
| Overridden to create local ports. | |
| virtual bool | postureSuitableForFiring (DtLifeformState posture) |
| Checks to see if given posture is acceptable for firing. | |
| DtHumanWeaponStateActuator () | |
| default contructor; not implemented | |
| DtHumanWeaponStateActuator (const DtHumanWeaponStateActuator &orig) | |
| copy constructor; not implemented | |
| const DtHumanWeaponStateActuator & | operator= (const DtHumanWeaponStateActuator &orig) |
| assignment operator; not implemented | |
Protected Attributes | |
| DtHumanStateRepository * | myHumanSR |
Ports and Port Groups | |
| DtIntegerInputPort * | myLifeFormWeaponStatePort |
| Input Port Name: weapon-state Input Port Description: Lifeform posture state enumeration. | |
DtHumanWeaponStateActuator updates the weapon state for the an individual lifeform entity.
End User Description: Sets the weapon state based on the incoming value on the weapon-state port. If the value on the port is DtWeaponInFirePosition and the entity's current posture is unsuitable for firing, the value on the port is ignored to prevent firing while moving.
Uses Descriptor Type: DtActuatorComponentDescriptor
| DtHumanWeaponStateActuator::DtHumanWeaponStateActuator | ( | 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 DtHumanWeaponStateActuator::~DtHumanWeaponStateActuator | ( | ) | [virtual] |
Destructor.
| DtHumanWeaponStateActuator::DtHumanWeaponStateActuator | ( | ) | [protected] |
default contructor; not implemented
| DtHumanWeaponStateActuator::DtHumanWeaponStateActuator | ( | const DtHumanWeaponStateActuator & | orig | ) | [protected] |
copy constructor; not implemented
| virtual DtString DtHumanWeaponStateActuator::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.
Reimplemented from DtSimComponent.
| virtual void DtHumanWeaponStateActuator::tick | ( | ) | [virtual] |
Sets the weapon state to the value on myLifeFormWeaponStatePort.
If the value on the port is DtWeaponInFirePosition and postureSuitableForFiring() returns false, the value on the port is ignored to prevent firing while moving.
Reimplemented from DtSimComponent.
| static DtSimComponent* DtHumanWeaponStateActuator::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 DtHumanWeaponStateActuator::createPorts | ( | ) | [protected, virtual] |
Overridden to create local ports.
Reimplemented from DtSimComponent.
| virtual bool DtHumanWeaponStateActuator::postureSuitableForFiring | ( | DtLifeformState | posture | ) | [protected, virtual] |
Checks to see if given posture is acceptable for firing.
If posture is LifeformWalking, DtLifeformCrawling, or DtLifeformRunning, return false, otherwise returns true.
| const DtHumanWeaponStateActuator& DtHumanWeaponStateActuator::operator= | ( | const DtHumanWeaponStateActuator & | orig | ) | [protected] |
assignment operator; not implemented
Input Port Name: weapon-state
Input Port Description: Lifeform posture state enumeration.
Input Port Range:
Input Port Default Value:
Input Group Parent: