![]() |
VR-Forces 4.0.4 Class Documentation
|
Acquire controller for the human movement model. More...

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 DtIntegerOutputPort * | lifeformWeaponStatePort () |
| 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 DtVrfObject * | easier (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 DtVrfObject * | chooseTarget (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 DtSimComponent * | creator (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 DtHumanAcquireController & | operator= (const DtHumanAcquireController &orig) |
| assignment operator; not implemented | |
Protected Attributes | |
| DtEntityIdentifier | myObjectId |
| bool | myAcquiring |
| double | myTimeAiming |
| DtVrfBalGunPSR * | myWeaponProcessState |
| const DtIndividualLifeformAcquireDescriptor * | myAcquireDescriptor |
Ports and Port Groups | |
| DtEntityListInputPort * | myTargetListPort |
| Input Port Name: target-list Input Port Description: Input Port Range: Input Port Default Value: Input Group Parent: | |
| DtIntegerOutputPort * | myLifeformWeaponStatePort |
| Output Port Name: weapon-state Output Port Description: Output Port Range: Output Port Default Value: Output Group Parent: | |
| DtAnalogOutputPort * | myAimDirectionPort |
| Output Port Name: aim-direction Output Port Description: Only active when acquiring a target. | |
Acquire controller for the human movement model.
Causes a human to stop and turn toward a target. Uses Descriptor Type: DtTurretAcquireControllerDescriptor
| DtHumanAcquireController::DtHumanAcquireController | ( | 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 DtHumanAcquireController::~DtHumanAcquireController | ( | ) | [virtual] |
Destructor.
| DtHumanAcquireController::DtHumanAcquireController | ( | ) | [protected] |
default constructor; not implemented
| DtHumanAcquireController::DtHumanAcquireController | ( | const DtHumanAcquireController & | orig | ) | [protected] |
copy constructor; not implemented
| virtual bool DtHumanAcquireController::init | ( | ) | [virtual] |
Calls setRadio()
Reimplemented from DtControllerComponent.
Reimplemented in DtHumanLauncherAcquireController.
| virtual bool DtHumanAcquireController::createWeaponStatePort | ( | ) | [virtual] |
| virtual DtIntegerOutputPort* DtHumanAcquireController::lifeformWeaponStatePort | ( | ) | [virtual] |
| virtual bool DtHumanAcquireController::createTargetListPort | ( | ) | [virtual] |
| virtual bool DtHumanAcquireController::createAimDirectionPort | ( | ) | [virtual] |
| 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.
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] |
Reimplemented in DtHumanLauncherAcquireController.
| virtual void DtHumanAcquireController::setAcquire | ( | ) | [virtual] |
if a target is selected, sets the ports as acquired, turn and set the weapon state
| virtual void DtHumanAcquireController::getWeaponProcessSR | ( | ) | [virtual] |
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.
| static DtSimComponent* DtHumanAcquireController::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). |
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
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] |
bool DtHumanAcquireController::myAcquiring [protected] |
double DtHumanAcquireController::myTimeAiming [protected] |
const DtIndividualLifeformAcquireDescriptor* DtHumanAcquireController::myAcquireDescriptor [protected] |