VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
humanAcquireController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
15 
17 class DtVrfBalGunPSR;
18 class DtSimMessage;
19 class DtAnalogOutputPort;
20 class DtVectorOutputPort;
23 
28 {
29 
30 public:
31 
35  DtLocalObject* owner,
36  DtSimulationServices* simManager,
37  DtComponentDescriptor* desc = 0,
38  DtReaderWriterRegistry* parentRegistry = 0);
39 
41  virtual ~DtHumanAcquireController() override;
42 
43  virtual bool init() override;
44 
45  virtual bool createTargetListPort();
46 
47  virtual bool createAimPointPort();
48 
50  virtual bool createAllowTurnPort();
51 
52  virtual bool createAimAtAnglePort();
53 
56  virtual const char* type() const override;
57 
58  virtual void tick() override;
59 
62  virtual bool haveTarget() const;
63 
69  virtual double findHeadingToCurrentTarget() const;
70 
73  virtual void selectATarget();
74 
75  virtual bool inSector(const DtSimObject* entity) const;
76 
77  virtual DtSimObjectReference easier(DtSimObjectReference entity1, DtSimObjectReference entity2) const;
78 
81  virtual void setAcquire();
82 
86  virtual void getWeaponProcessSR();
87 
90  virtual DtSimObjectReference chooseTarget(const DtEntityTargetList& targetList) const;
91 
95  virtual bool targetVisible(DtSimObjectReference targetObj,
96  const DtVector& localEyepoint) const;
97 
101  static DtSimComponent * creator(const DtString& name,
102  DtLocalObject* owner,
103  DtSimulationServices* simManager,
104  DtComponentDescriptor* desc = 0,
105  DtReaderWriterRegistry* parentRegistry = 0);
106 
107 protected:
108 
110  virtual bool createPorts() override;
111 
113  virtual bool createPortGroups() override;
114 
117  virtual bool postAddComponentsInit() override;
118 
119 protected:
120 
123 
126  DtHumanAcquireController & orig);
127 
130  const DtHumanAcquireController & orig);
131 
132 
133 protected:
134 
137 
144 
148 
156 
164 
172 
174 
176  double myTimeAiming;
180 };
181 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
double myTimeAiming
Definition: humanAcquireController.h:176
DtOutputPortGroup * myAimWeaponControlPortGroup
Output Port Group Name: aim-weapon-control Output Port Group Description: .
Definition: humanAcquireController.h:147
const DtControllerComponent & operator=(const DtControllerComponent &orig)
assignment operator
virtual bool postAddComponentsInit() override
Calls enableTaskTypes()
DtBooleanOutputPort * myForbidTurnPort
Output Port Name: forbid-turn Output Port Description: Indicates whether the entity can be turned to ...
Definition: humanAcquireController.h:163
Instances of DtBooleanOutputPort are output ports through which data producers can send boolean data...
Definition: boolIOPort.h:45
DtBooleanOutputPort * myAimAtAnglePort
Output Port Name: aim-at-angle Output Port Description: Indicates whether the aim controller should a...
Definition: humanAcquireController.h:171
DtVectorOutputPort * myAimPointPort
Output Port Name: aim-point Output Port Description: Only active when acquiring a target...
Definition: humanAcquireController.h:155
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
virtual const char * type() const override=0
This returns a string from compTypes.h, and identifies the type of component.
DtIndividualLifeformAcquireDescriptor; descriptor for the DtIndividualLifeformAcquireComponent compon...
Definition: individualLifeformAcquireDescriptor.h:24
Definition: readerWriterRegistry.h:39
DtOutputPortGroup is a data port group of a data provider. It may contain any number of DtOutputPorts...
Definition: outputPortGroup.h:34
Acquire controller for the human movement model. Causes a human to stop and turn toward a target...
Definition: humanAcquireController.h:27
virtual bool init() override
Calls setRadio()
Instances of DtAnalogOutputPort are input ports through which data producers can send real numbers...
Definition: analogIOPort.h:45
Instances of DtVectorOutputPort are output ports through which data producers can send a DtVector...
Definition: vectorIOPort.h:52
const DtIndividualLifeformAcquireDescriptor * myAcquireDescriptor
Definition: humanAcquireController.h:179
Contains class declarations for DtEntityListInputPort, DtEntityListOutputPort, and DtEntityListPortDa...
Definition: entListIOPort.h:29
File: simMsg.h.
Definition: simMessage.h:35
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
double myTimeRequiredToAim
Definition: humanAcquireController.h:177
DtEntityListInputPort * myTargetListPort
Input Port Name: target-list Input Port Description: Input Port Range: Input Port Default Value: I...
Definition: humanAcquireController.h:143
bool myAcquiring
Definition: humanAcquireController.h:175
virtual bool createPorts()
Called by init. Derived classes should override this method to create all their input/output ports an...
End User Description: DtControllerComponent is the base class for all controllers components...
Definition: controllerComponent.h:31
virtual bool createPortGroups()
Called by init. Derived classes should override this method to create all their input/output port gro...
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:96
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
Represents a single simulation object in the exercise. Object may be VRF simulation, or non-VRF simulated, and may be simulated by the local sim engine, or by a remote sim engine. Only public (external) state of the object is available. All data is read-only. All access to data of the object is thread safe within the simulation frame.
Definition: simObject.h:80
Instances of DtIntegerOutputPort are output ports through which data producers can send integer value...
Definition: integerIOPort.h:45
Class DtVrfBalGunPSR: Used to hold checkpointable state for the processes associated with ballistic g...
Definition: vrfBalGunPSR.h:36
DtVrfBalGunPSR * myWeaponProcessState
Definition: humanAcquireController.h:178
A locally simulated VRF object.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)