VR-Forces 4.8 Class Documentation
 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 
15 #include <vl/hostStructs.h>
17 
18 #include <vl/fireInteraction.h>
19 
20 class DtString;
21 class DtSimManager;
22 class DtSimMessage;
23 class DtEntityListPort;
24 class DtSimIndividualLocalEntity;
25 
27 class DtVectorOutputPort;
32 
59 {
60 
61 public:
62 
66  DtVrfObject* owner,
67  DtSimManager* simManager,
68  DtComponentDescriptor* desc = 0,
69  DtReaderWriterRegistry* parentRegistry = 0);
70 
72  virtual ~DtTurretAcquireController();
73 
76  virtual const char* type() const;
77 
79  virtual bool postAddComponentsInit();
80 
82  virtual void preFirstTickInit();
83 
85  virtual void tick();
86 
88  virtual bool inSector(const DtVrfObject* entity) const;
89 
91  virtual const DtVrfObject* chooseTarget(const DtEntityTargetList& targetList,
92  DtTime currentTime) ;
93 
95  virtual const DtVrfObject* easier(const DtVrfObject* entity1, const DtVrfObject* entity2)
96  const;
97 
102  virtual DtIntegerOutputPort * losPort();
103 
107  static DtSimComponent * creator(const DtString& name,
108  DtVrfObject* owner,
109  DtSimManager* simManager,
110  DtComponentDescriptor* desc = 0,
111  DtReaderWriterRegistry* parentRegistry = 0);
112 
113 protected:
114 
115  virtual void lookupAndCacheProcessSR();
116 
118  virtual bool createPorts();
119 
121  virtual bool createPortGroups();
122 
135  virtual bool canTrackTarget(const DtVector& localEyepoint, const DtVrfObject* targetObject,
136  bool *dataAvailable = 0) ;
137 
138 
139 private:
140 
143 
146  orig);
147 
149  const DtTurretAcquireController & operator=(const
151 
152 protected:
153 
160 
163 
170 
178 
182 
190 
198 
206 
214 
216 
218 
221 };
222 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
virtual bool postAddComponentsInit()
Called after all components have been created, initialized and added to the component manager...
Definition: simComponent.h:144
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
The DtTurretAcquireController attempts to slew the turret to track targets.
Definition: turretAcquireController.h:58
const DtControllerComponent & operator=(const DtControllerComponent &orig)
assignment operator
DtEntityListInputPort * myTargetListPort
Input Port Name: target-list Input Port Description: List of detected hostile targets.
Definition: turretAcquireController.h:169
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...
virtual const char * type() const =0
This returns a string from compTypes.h, and identifies the type of component.
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:42
Definition: readerWriterRegistry.h:39
DtOutputPortGroup is a data port group of a data provider.
Definition: outputPortGroup.h:30
File: turBalGunPSR.h.
Definition: vrfTurretedBalGunPSR.h:26
const DtTurretAcquireControllerDescriptor * myTurretAcquireControllerDescriptor
Definition: turretAcquireController.h:217
DtIntegerOutputPort * myLosPort
Output Port Name: line-of-sight Output Port Description: Indicates if a LOS calculation was performed...
Definition: turretAcquireController.h:177
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:27
DtBooleanOutputPort * myForbidTurnPort
Output Port Name: forbid-turn Output Port Description: Indicates whether the entity can be turned to ...
Definition: turretAcquireController.h:197
File: simMsg.h.
Definition: simMessage.h:35
virtual void tick()
This gives the thread of control to the component.
DtVrfTurretedBalGunPSR * myProcessState
Pointer to a process state repository used to store state data associated with this component...
Definition: turretAcquireController.h:159
DtVectorOutputPort * myAimPointPort
Output Port Name: aim-point Output Port Description: Only active when acquiring a target...
Definition: turretAcquireController.h:189
virtual bool createPorts()
Called by init.
End User Description: DtControllerComponent is the base class for all controllers components...
Definition: controllerComponent.h:29
DtBooleanOutputPort * myAllowAzimuthAimingPort
Output Port Name: allow-azimuth-aiming Output Port Description: Indicates whether the aim-controller ...
Definition: turretAcquireController.h:213
virtual bool createPortGroups()
Called by init.
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
A DtComponentDescriptor that has a flag to indicate whether or not line of sight should be checked...
Definition: turretAcquireControllerDescriptor.h:40
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:102
Instances of DtIntegerOutputPort are output ports through which data producers can send integer value...
Definition: integerIOPort.h:45
DtOutputPortGroup * myAimWeaponControlPortGroup
Output Port Group Name: aim-weapon-control Output Port Group Description: .
Definition: turretAcquireController.h:181
bool myNoLosWarningWasGiven
Remember if this debug message has already been printed.
Definition: turretAcquireController.h:220
DtBooleanOutputPort * myAimAtAnglePort
Output Port Name: aim-at-angle Output Port Description: Indicates whether the aim controller should a...
Definition: turretAcquireController.h:205

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)