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

DtHumanWeaponStateActuator updates the weapon state for the an individual lifeform entity. More...

Inheritance diagram for DtHumanWeaponStateActuator:
Inheritance graph
[legend]

List of all members.

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 DtSimComponentcreator (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 DtHumanWeaponStateActuatoroperator= (const DtHumanWeaponStateActuator &orig)
 assignment operator; not implemented

Protected Attributes

DtHumanStateRepositorymyHumanSR
Ports and Port Groups
DtIntegerInputPortmyLifeFormWeaponStatePort
 Input Port Name: weapon-state
Input Port Description: Lifeform posture state enumeration.

Detailed Description

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


Constructor & Destructor Documentation

DtHumanWeaponStateActuator::DtHumanWeaponStateActuator ( 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.

default contructor; not implemented

copy constructor; not implemented


Member Function Documentation

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.

Returns:
DtHumanWeaponStateActuatorType

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*,

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 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


Member Data Documentation

Input Port Name: weapon-state
Input Port Description: Lifeform posture state enumeration.


Input Port Range:
Input Port Default Value:
Input Group Parent:


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)