VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
turretAcquireController.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2003 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
17 
19 
20 class DtString;
22 class DtSimMessage;
23 class DtEntityListPort;
24 class DtSimIndividualLocalEntity;
25 
27 class DtVectorOutputPort;
33 
60 {
61 
62 public:
63 
67  DtLocalObject* owner,
68  DtSimulationServices* simManager,
69  DtComponentDescriptor* desc = 0,
70  DtReaderWriterRegistry* parentRegistry = 0);
71 
73  virtual ~DtTurretAcquireController() override;
74 
77  virtual const char* type() const override;
78 
80  virtual bool postAddComponentsInit() override;
81 
83  virtual void preFirstTickInit() override;
84 
86  virtual void tick() override;
87 
89  virtual bool inSector(const DtSimObject* entity) const;
90 
92  virtual DtSimObjectReference chooseTarget(const DtEntityTargetList& targetList,
93  DtTime currentTime) ;
94 
96  virtual DtSimObjectReference easier(DtSimObjectReference entity1, DtSimObjectReference entity2)
97  const;
98 
103  virtual DtIntegerOutputPort * losPort();
104 
108  static DtSimComponent * creator(const DtString& name,
109  DtLocalObject* owner,
110  DtSimulationServices* simManager,
111  DtComponentDescriptor* desc = 0,
112  DtReaderWriterRegistry* parentRegistry = 0);
113 
114 protected:
115 
116  virtual void lookupAndCacheProcessSR();
117 
119  virtual bool createPorts() override;
120 
122  virtual bool createPortGroups() override;
123 
136  virtual bool canTrackTarget(const DtVector& localEyepoint, DtSimObjectReference targetObject,
137  bool *dataAvailable = 0) ;
138 
144  virtual bool canAcquireTarget(const DtRwLocationReference& target, DtString& reasonOut);
145 
146 
147 private:
148 
151 
154  orig);
155 
157  const DtTurretAcquireController & operator=(const
159 
160 protected:
161 
168 
171 
178 
186 
190 
198 
206 
214 
222 
224 
226 
229 
232 };
233 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
The DtTurretAcquireController attempts to slew the turret to track targets.
Definition: turretAcquireController.h:59
const DtControllerComponent & operator=(const DtControllerComponent &orig)
assignment operator
virtual bool postAddComponentsInit() override
Calls enableTaskTypes()
DtEntityListInputPort * myTargetListPort
Input Port Name: target-list Input Port Description: List of detected hostile targets. Input Port Range: Input Port Default Value: Input Group Parent:
Definition: turretAcquireController.h:177
Instances of DtBooleanOutputPort are output ports through which data producers can send boolean data...
Definition: boolIOPort.h:45
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
Holds a position of some form. May be an absolute position, or a reference to another object...
Definition: rwLocationReference.h:25
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.
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
File: turBalGunPSR.h.
Definition: vrfTurretedBalGunPSR.h:29
const DtTurretAcquireControllerDescriptor * myTurretAcquireControllerDescriptor
Definition: turretAcquireController.h:225
DtIntegerOutputPort * myLosPort
Output Port Name: line-of-sight Output Port Description: Indicates if a LOS calculation was performed...
Definition: turretAcquireController.h:185
Instances of DtVectorOutputPort are output ports through which data producers can send a DtVector...
Definition: vectorIOPort.h:52
Contains class declarations for DtEntityListInputPort, DtEntityListOutputPort, and DtEntityListPortDa...
Definition: entListIOPort.h:29
DtBooleanOutputPort * myForbidTurnPort
Output Port Name: forbid-turn Output Port Description: Indicates whether the entity can be turned to ...
Definition: turretAcquireController.h:205
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 frame...
DtVrfTurretedBalGunPSR * myProcessState
Pointer to a process state repository used to store state data associated with this component...
Definition: turretAcquireController.h:167
DtVectorOutputPort * myAimPointPort
Output Port Name: aim-point Output Port Description: Only active when acquiring a target...
Definition: turretAcquireController.h:197
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
DtBooleanOutputPort * myAllowAzimuthAimingPort
Output Port Name: allow-azimuth-aiming Output Port Description: Indicates whether the aim-controller ...
Definition: turretAcquireController.h:221
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:97
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
A DtComponentDescriptor that has a flag to indicate whether or not line of sight should be checked...
Definition: turretAcquireControllerDescriptor.h:40
Instances of DtIntegerOutputPort are output ports through which data producers can send integer value...
Definition: integerIOPort.h:45
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Member to allow for access to platform specific data.
Definition: turretAcquireController.h:231
DtOutputPortGroup * myAimWeaponControlPortGroup
Output Port Group Name: aim-weapon-control Output Port Group Description: .
Definition: turretAcquireController.h:189
bool myNoLosWarningWasGiven
Remember if this debug message has already been printed.
Definition: turretAcquireController.h:228
A locally simulated VRF object.
Definition: localObject.h:98
DtBooleanOutputPort * myAimAtAnglePort
Output Port Name: aim-at-angle Output Port Description: Indicates whether the aim controller should a...
Definition: turretAcquireController.h:213

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)