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

Acquire controller for the human movement model. More...

Inheritance diagram for DtHumanAcquireController:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtHumanAcquireController (const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
 (const DtString&,DtVrfObject*,DtSimManager*,
virtual ~DtHumanAcquireController ()
 Destructor.
virtual bool init ()
 Calls setRadio()
virtual bool createWeaponStatePort ()
virtual DtIntegerOutputPortlifeformWeaponStatePort ()
virtual bool createTargetListPort ()
virtual bool createAimDirectionPort ()
virtual DtString type () const
 Returns a string identifies the class type of component.
virtual void tick ()
 This gives the thread of control to the component.
virtual bool haveTarget () const
 Checks currentTarget() in the entity's state repository.
virtual double findHeadingToCurrentTarget () const
 If the entity is going to turn to face the target, this calculates the heading to the target.
virtual void selectATarget ()
 selects a target to acquire.
virtual bool inSector (DtVrfObject *entity) const
virtual DtVrfObjecteasier (DtVrfObject *entity1, DtVrfObject *entity2) const
virtual void setAcquire ()
 if a target is selected, sets the ports as acquired, turn and set the weapon state
virtual void getWeaponProcessSR ()
 This function gets the name of the process state repository being shared by all components in the turret/gun weapon system and then gets a pointer to it via the entity's processStateRepositoryManager.
virtual DtVrfObjectchooseTarget (const DtEntityTargetList &targetList) const
 pick up a possible target from the sensor list Calls targetVisible() to check if potential targets are able to be tracked.
virtual bool targetVisible (const DtVrfObject *targetObj, const DtVector &localEyepoint) const
 Uses the settings in the descriptor to determine if the specified target objects is visible from the specified eyepoint.

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 haveAmmo () const
 Returns true if current munition name in myWeaponProcessState is not an empty string, false otherwise.
virtual bool createPorts ()
 Overridden to create local ports.
virtual bool postAddComponentsInit ()
 Overridden to call getWeaponPSR(), to look up our weapon process state repository.
 DtHumanAcquireController ()
 default constructor; not implemented
 DtHumanAcquireController (const DtHumanAcquireController &orig)
 copy constructor; not implemented
const DtHumanAcquireControlleroperator= (const DtHumanAcquireController &orig)
 assignment operator; not implemented

Protected Attributes

DtEntityIdentifier myObjectId
bool myAcquiring
double myTimeAiming
DtVrfBalGunPSRmyWeaponProcessState
const
DtIndividualLifeformAcquireDescriptor
myAcquireDescriptor
Ports and Port Groups
DtEntityListInputPortmyTargetListPort
 Input Port Name: target-list
Input Port Description:
Input Port Range:
Input Port Default Value:
Input Group Parent:
DtIntegerOutputPortmyLifeformWeaponStatePort
 Output Port Name: weapon-state
Output Port Description:
Output Port Range:
Output Port Default Value:
Output Group Parent:
DtAnalogOutputPortmyAimDirectionPort
 Output Port Name: aim-direction
Output Port Description: Only active when acquiring a target.

Detailed Description

Acquire controller for the human movement model.

Causes a human to stop and turn toward a target. Uses Descriptor Type: DtTurretAcquireControllerDescriptor


Constructor & Destructor Documentation

DtHumanAcquireController::DtHumanAcquireController ( 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 constructor; not implemented

copy constructor; not implemented


Member Function Documentation

virtual bool DtHumanAcquireController::init ( ) [virtual]

Calls setRadio()

Reimplemented from DtControllerComponent.

Reimplemented in DtHumanLauncherAcquireController.

virtual DtString DtHumanAcquireController::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:
DtHumanAcquireControllerType

Reimplemented from DtControllerComponent.

Reimplemented in DtHumanLauncherAcquireController.

virtual void DtHumanAcquireController::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 bool DtHumanAcquireController::haveTarget ( ) const [virtual]

Checks currentTarget() in the entity's state repository.

If the current target is not DtObjectId::nullId(), then the entity currently has a target

virtual double DtHumanAcquireController::findHeadingToCurrentTarget ( ) const [virtual]

If the entity is going to turn to face the target, this calculates the heading to the target.

This heading, along with the entity's current heading, will be passed as arguments to the base class member function calculateSteering(), which will return a suitable value for the steering port.

virtual void DtHumanAcquireController::selectATarget ( ) [virtual]

selects a target to acquire.

uses functions determine if the possible target is in sector and to select between two o more possible targets.

Reimplemented in DtHumanLauncherAcquireController.

virtual bool DtHumanAcquireController::inSector ( DtVrfObject entity) const [virtual]
virtual DtVrfObject* DtHumanAcquireController::easier ( DtVrfObject entity1,
DtVrfObject entity2 
) const [virtual]
virtual void DtHumanAcquireController::setAcquire ( ) [virtual]

if a target is selected, sets the ports as acquired, turn and set the weapon state

This function gets the name of the process state repository being shared by all components in the turret/gun weapon system and then gets a pointer to it via the entity's processStateRepositoryManager.

virtual DtVrfObject* DtHumanAcquireController::chooseTarget ( const DtEntityTargetList &  targetList) const [virtual]

pick up a possible target from the sensor list Calls targetVisible() to check if potential targets are able to be tracked.

Reimplemented in DtHumanLauncherAcquireController.

virtual bool DtHumanAcquireController::targetVisible ( const DtVrfObject targetObj,
const DtVector localEyepoint 
) const [virtual]

Uses the settings in the descriptor to determine if the specified target objects is visible from the specified eyepoint.

Returns:
True if the target is visible.
static DtSimComponent* DtHumanAcquireController::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.

Reimplemented in DtHumanLauncherAcquireController.

virtual bool DtHumanAcquireController::haveAmmo ( ) const [protected, virtual]

Returns true if current munition name in myWeaponProcessState is not an empty string, false otherwise.

virtual bool DtHumanAcquireController::createPorts ( ) [protected, virtual]

Overridden to create local ports.

Reimplemented from DtSimComponent.

virtual bool DtHumanAcquireController::postAddComponentsInit ( ) [protected, virtual]

Overridden to call getWeaponPSR(), to look up our weapon process state repository.

Reimplemented from DtSimComponent.

const DtHumanAcquireController& DtHumanAcquireController::operator= ( const DtHumanAcquireController orig) [protected]

assignment operator; not implemented


Member Data Documentation

Input Port Name: target-list
Input Port Description:
Input Port Range:
Input Port Default Value:
Input Group Parent:

Output Port Name: weapon-state
Output Port Description:
Output Port Range:
Output Port Default Value:
Output Group Parent:

Output Port Name: aim-direction
Output Port Description: Only active when acquiring a target.

Outputs the heading angle (radians) to the target.
Output Port Range: Heading in radians.
Output Port Default Value:
Output Group Parent:

DtEntityIdentifier DtHumanAcquireController::myObjectId [protected]

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)