VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
launcherActuator.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1999 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 #pragma once
11 
14 #include <vl/hostStructs.h>
15 
16 class DtSimManager;
17 
19 class DtVectorInputPort;
20 
38 {
39 
40 public:
41 
44  DtLauncherActuator(const DtString& name,
45  DtVrfObject* owner,
46  DtSimManager* simManager,
47  DtComponentDescriptor* desc = 0,
48  DtReaderWriterRegistry* parentRegistry = 0);
49 
51  virtual ~DtLauncherActuator();
52 
55  virtual bool init();
56 
59  virtual const char* type() const;
60 
69  virtual void fireTheWeapon();
70 
72  virtual DtFireInteraction * createFireInteraction(const DtVrfObject *missile);
73 
77  static DtSimComponent * creator(const DtString& name,
78  DtVrfObject* owner,
79  DtSimManager* simManager,
80  DtComponentDescriptor* desc = 0,
81  DtReaderWriterRegistry* parentRegistry = 0);
82 
83 protected:
84 
87  virtual bool createPorts();
88 
91  virtual bool shouldHitTarget(const DtVector& localStartPosition,
92  const DtVector& localTargetPosition, const DtVector& localInitialVelocity,
93  const DtVrfObject *targetObject) const;
94 
97  virtual bool useHitProbability(const DtVrfObject *targetObject) const;
98 
99  virtual const DtString& probabilityString() const;
100 
101 protected:
102 
105 
108 
110  const DtLauncherActuator & operator=(const DtLauncherActuator & orig);
111 
112 
113 protected:
114 
116 
119 
126 
133 
140 
142 
146 
148 };
149 
DtVectorInputPort * myTargetPointPort
Input Port Name: target-point Input Port Description: Local position of the target.
Definition: launcherActuator.h:139
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
DtLauncherActuator is a simple model of a missile launcher.
Definition: launcherActuator.h:37
const DtWeaponActuator & operator=(const DtWeaponActuator &orig)
assignment operator; not implemented
Contains class declarations for DtObjectIdInputPort, DtObjectIdOutputPort, and DtObjectIdPortData.
Definition: objectIdIOPort.h:27
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
DtMissileLauncherActuatorDescriptor * myMissileLauncherDesc
Definition: launcherActuator.h:115
DtObjectIdInputPort * myMissileIdPort
Input Port Name: missile-id Input Port Description: Object id of the missile.
Definition: launcherActuator.h:125
Contains class declarations for DtVectorInputPort, DtVectorOutputPort, and DtVectorPortData.
Definition: vectorIOPort.h:27
DtWeaponActuator is a simple model of a ballistic gun.
Definition: weaponActuator.h:50
virtual void fireTheWeapon()
Calls createFireInteraction() and sends the resulting DtFireInteraction through the exercise connecti...
static DtSimComponent * creator(const DtString &name, DtVrfObject *owner, DtSimManager *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
DtObjectIdInputPort * myTargetEntityIdPort
Input Port Name: target-entity Input Port Description: Object id of the target.
Definition: launcherActuator.h:132
virtual bool createPorts()
Creates the input ports and adds them to the component.
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:67
static bool myDetonationCbackRegistered
Flag for indicating whether the detonation callback for munitions has been registered.
Definition: launcherActuator.h:145
DtMissileLauncherActuatorDescriptor; descriptor for the DtLauncherActuator component.
Definition: missileLauncherActuatorDescriptor.h:21
virtual DtFireInteraction * createFireInteraction()
Creates and fills out a DtFireInteraction. Returns a DtFireInteraction.
virtual const char * type() const
Returns a string identifies the class type of component.
The simulation engine is controlled by a single,top-level class called the Simulation Manager...
Definition: simManager.h:102
virtual bool init()
to get access to the entity&#39;s localStateRepository, which this component will update, and then connect to the controller&#39;s ports.
DtVector myCurrentTargetPoint
Definition: launcherActuator.h:147

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)