VR-Forces 5.0.3 Developer's Guide
 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 
16 
18 class DtLocalObject;
19 
20 class DtStringInputPort;
21 class DtVectorInputPort;
23 
40 {
41 
42 public:
43 
46  DtLauncherActuator(const DtString& name,
47  DtLocalObject* owner,
48  DtSimulationServices* simManager,
49  DtComponentDescriptor* desc = 0,
50  DtReaderWriterRegistry* parentRegistry = 0);
51 
53  virtual ~DtLauncherActuator();
54 
57  virtual bool init();
58 
61  virtual const char* type() const;
62 
69  virtual void fireTheWeapon();
70 
74 
78  static DtSimComponent * creator(const DtString& name,
79  DtLocalObject* owner,
80  DtSimulationServices* simManager,
81  DtComponentDescriptor* desc = 0,
82  DtReaderWriterRegistry* parentRegistry = 0);
83 
84 protected:
85 
88  virtual DtCreateObjectHandle createMissile(DtVrfLocalObjectCreateInformation& createdInfo);
89 
92  virtual bool createPorts();
93 
96  virtual bool shouldHitTarget(const DtVector& localStartPosition,
97  const DtVector& localTargetPosition, const DtVector& localInitialVelocity,
98  const DtSimObject* targetObject) const;
99 
102  virtual bool useHitProbability(const DtSimObject* targetObject) const;
103 
104  virtual const DtString& probabilityString() const;
105 
106 protected:
107 
110 
113 
115  const DtLauncherActuator & operator=(const DtLauncherActuator & orig);
116 
117 
118 protected:
119 
121 
124 
131 
138 
145 
147 
151 
153 };
154 
DtVectorInputPort * myTargetPointPort
Input Port Name: target-point Input Port Description: Local position of the target. Input Port Range: Input Port Default Value: Input Group Parent: weapon-control.
Definition: launcherActuator.h:144
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
DtLauncherActuator is a simple model of a missile launcher.
Definition: launcherActuator.h:39
Handle returned from Create Object Service calls.
Definition: createObjectHandle.h:12
Definition: fireEvent.h:16
const DtWeaponActuator & operator=(const DtWeaponActuator &orig)
assignment operator; not implemented
Contains class declarations for DtStringInputPort, DtStringOutputPort, and DtStringPortData.
Definition: stringIOPort.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:49
Definition: readerWriterRegistry.h:39
The DtLocalObjectCreateInformation class is a subset of the information used in the DtIfCreateVrfObje...
Definition: vrfLocalObjectCreateInformation.h:26
DtMissileLauncherActuatorDescriptor * myMissileLauncherDesc
Definition: launcherActuator.h:120
Contains class declarations for DtVectorInputPort, DtVectorOutputPort, and DtVectorPortData.
Definition: vectorIOPort.h:27
DtWeaponActuator is a simple model of a ballistic gun.
Definition: weaponActuator.h:54
virtual void fireTheWeapon()
Calls createFireInteraction() and sends the resulting makVrfEvents::DtFireEvent through the exercise ...
virtual bool createPorts()
Creates the input ports and adds them to the component.
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
DtStringInputPort * myTargetEntityIdPort
Input Port Name: target-entity Input Port Description: Object id of the target. Input Port Range: In...
Definition: launcherActuator.h:137
virtual makVrfEvents::DtFireEvent * createFireInteraction()
Creates and fills out a makVrfEvents::DtFireEvent. Returns a makVrfEvents::DtFireEvent.
DtStringInputPort * myMissileIdPort
Input Port Name: missile-id Input Port Description: Object id of the missile. Input Port Range: Inpu...
Definition: launcherActuator.h:130
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:90
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
static bool myDetonationCbackRegistered
Flag for indicating whether the detonation callback for munitions has been registered.
Definition: launcherActuator.h:150
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:79
DtMissileLauncherActuatorDescriptor; descriptor for the DtLauncherActuator component.
Definition: missileLauncherActuatorDescriptor.h:21
virtual const char * type() const
Returns a string identifies the class type of component. Type values are defined in compTypes...
virtual bool init()
to get access to the entity's localStateRepository, which this component will update, and then connect to the controller's ports. Calls createPSR() to creat e
DtVector myCurrentTargetPoint
Definition: launcherActuator.h:152
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)