VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
aimWeaponController.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 
13 
15 class DtInputPortGroup;
16 class DtVectorInputPort;
17 class DtBooleanInputPort;
18 class DtAnalogInputPort;
19 class DtAnalogOutputPort;
24 
29 {
30 
31 public:
32 
35  DtAimWeaponController(const DtString& name,
36  DtVrfObject* owner,
37  DtSimManager* simManager,
38  DtComponentDescriptor* desc = 0,
39  DtReaderWriterRegistry* parentRegistry = 0);
40 
42  virtual ~DtAimWeaponController();
43 
44  virtual bool init();
45 
48  virtual bool postAddComponentsInit();
49 
52  virtual const char* type() const;
53 
54  virtual void tick();
55 
59  static DtSimComponent * creator(const DtString& name,
60  DtVrfObject* owner,
61  DtSimManager* simManager,
62  DtComponentDescriptor* desc = 0,
63  DtReaderWriterRegistry* parentRegistry = 0);
64 
65 protected:
66 
68  virtual bool createPortGroups();
69 
71  virtual bool createPorts();
72 
80  virtual void lookupAndCacheProcessSR();
81 
98  virtual double periodicToNumberLine(const double testBearing,
99  double& leftBearing, double& rightBearing);
100 
101 
102 private:
103 
106 
108  DtAimWeaponController(const
109  DtAimWeaponController & orig);
110 
113  const DtAimWeaponController & orig);
114 
115 
116 protected:
117 
119 
121 
122 
126 
133 
140 
146 
152 
160 
168 
176 
183 
192 
199 
200 
206 
212 
219 
221 
228 
232 };
DtAnalogInputPort * myAimAzimuthInputPort
Input Port Name: aim-azimuth Input Port Description: The azimuth at which to aim the weapon...
Definition: aimWeaponController.h:145
#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
DtIntegerOutputPort * myLifeformWeaponStatePort
Output Port Name: weapon-state Output Port Description: Output Port Range: Output Port Default Valu...
Definition: aimWeaponController.h:218
const DtControllerComponent & operator=(const DtControllerComponent &orig)
assignment operator
Instances of DtBooleanOutputPort are output ports through which data producers can send boolean data...
Definition: boolIOPort.h:45
DtInputPortGroup * myAimWeaponControlPortGroup
Input Port Group Name: aim-weapon-control Input Port Group Description: .
Definition: aimWeaponController.h:125
DtAnalogInputPort * myAimElevationInputPort
Input Port Name: aim-elevation Input Port Description: The elevation at which to aim the weapon...
Definition: aimWeaponController.h:151
virtual const char * type() const =0
This returns a string from compTypes.h, and identifies the type of component.
DtBooleanInputPort * myForbidTurnPort
Input Port Name: forbid-turn Input Port Description: Indicates whether the entity can be turned to fa...
Definition: aimWeaponController.h:159
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
DtBooleanOutputPort * myBaseAimAtAnglePort
Output Port Name: base-aim-at-angle Output Port Description: Expected to be connected to the aim-at-a...
Definition: aimWeaponController.h:191
virtual bool init()
Calls setRadio()
DtAimWeaponControllerDescriptor * myAimWeaponDescriptor
Definition: aimWeaponController.h:118
File: turBalGunPSR.h.
Definition: vrfTurretedBalGunPSR.h:26
Contains class declarations for DtVectorInputPort, DtVectorOutputPort, and DtVectorPortData.
Definition: vectorIOPort.h:27
bool myLastInAzimuthRange
Remembers whether the target location was in range last tick or not.
Definition: aimWeaponController.h:231
Instances of DtAnalogOutputPort are input ports through which data producers can send real numbers...
Definition: analogIOPort.h:45
DtBooleanOutputPort * myWeaponAimedPort
Output Port Name: weapon-aimed Output Port Description: True if the weapon is currently aimed at a ta...
Definition: aimWeaponController.h:198
DtBooleanInputPort * myAimAtAnglePort
Input Port Name: aim-at-angle Input Port Description: Indicates that aiming should be done using the ...
Definition: aimWeaponController.h:139
virtual void tick()
This gives the thread of control to the component.
Contains class declarations for DtBooleanInputPort, DtBooleanOutputPort, and DtBooleanPortData.
Definition: boolIOPort.h:25
DtVectorInputPort * myAimPointPort
Input Port Name: aim-point Input Port Description: Local position to aim at.
Definition: aimWeaponController.h:132
The DtArticulatedPartStateRepository class is used to represent articulated parts for an entity...
Definition: articulatedPartStateRepository.h:29
DtAnalogOutputPort * myAimElevationOutputPort
Output Port Name: aim-elevation-output Output Port Description: The elevation at which to aim the wea...
Definition: aimWeaponController.h:205
DtVrfTurretedBalGunPSR * myProcessState
Pointer to a process state repository used to store state data associated with this component...
Definition: aimWeaponController.h:227
virtual bool createPorts()
Called by init.
DtAnalogOutputPort * myAimAzimuthOutputPort
Output Port Name: aim-azimuth-output Output Port Description: The azimuth at which to aim the weapon...
Definition: aimWeaponController.h:211
End User Description: DtControllerComponent is the base class for all controllers components...
Definition: controllerComponent.h:29
virtual bool createPortGroups()
Called by init.
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
DtAnalogOutputPort * myFaceDirectionPort
Output Port Name: face-direction Output Port Description: The direction that the system (or body) tha...
Definition: aimWeaponController.h:182
DtBooleanInputPort * myAllowAzimuthAimingPort
Input Port Name: allow-azimuth-aiming Input Port Description: Indicates whether we should perform azi...
Definition: aimWeaponController.h:175
DtInputPortGroup is a data port group of a data consumer.
Definition: inputPortGroup.h:32
Contains class declarations for DtAnalogInputPort, DtAnalogOutputPort, and DtAnalogPortData.
Definition: analogIOPort.h:25
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
DtBooleanInputPort * myAllowElevationAimingPort
Input Port Name: allow-elevation-aiming Input Port Description: Indicates whether we should perform e...
Definition: aimWeaponController.h:167
Instances of DtAimWeaponControllerDescriptor are used to specify the parameters for a DtAimWeaponCont...
Definition: aimWeaponControllerDescriptor.h:17
This class is responsible for controlling the aiming of a weapon at a target point.
Definition: aimWeaponController.h:28

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)