VR-Link API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
parallel/vehicleSim.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 1992-2025 MAK Technologies, Inc
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
12 #include <vl/exerciseConn.h>
13 #include <vl/reflectedEntityList.h>
14 #include <vl/entityPublisher.h>
16 #include <vl/topoView.h>
18 #include <vl/fireInteraction.h>
19 #include <vl/publisherContainer.h>
20 
22 
25 class DtVehicleSim
26 {
27 public:
28 
31  DtVehicleSim( double refLat, double refLon,
33  const DtEntityIdentifier& id, const DtEntityType& type,
34  const char* name, const char* markings,
35  const DtDeadReckonTypes alg, bool haveArtParts,
36  DtObjectPublisherContainer &pubContainer,
37  DtTime timeSpacing);
38 
40  virtual ~DtVehicleSim();
41 
43  virtual void init( DtConstVector initPos, double initSpeed,
44  double initHeading, double initTRadius,
45  double initPitch, bool autoRoll, double initRoll, int num );
46 
48  virtual void simulate();
49 
51  virtual void fireMunition( const DtGlobalObjectDesignator& tg );
52  virtual void fireMunition();
53  virtual void detonateMunition();
54  virtual void munitionUpdate();
55 
57  virtual void reactToDetonation();
58  virtual int checkDetonation();
59  virtual void reactToDamage();
60  virtual bool isDestroyed();
61  virtual DtTime timeDestroyed();
62 
64  virtual void toggleEmissions();
65  virtual void enableEmissions();
66  virtual void disableEmissions();
67  virtual void emissionsUpdate();
68 
69 public:
70 
71  // Set the current detonation for reaction.
73 
74  static void setLethalDetonationRange( double range );
75  static void setMunitionFlightTime( DtTime time );
76 
77  // set the delta time for next simTick update
78  static void setSimDeltaTime(DtTime theDt) { myDt = theDt; }
79 
80 protected:
81 
82  // delta time for next simTick update
83  static DtTime myDt;
84 
85  // Current detonation, if any.
87 
88 protected:
89 
90  virtual void moveArtParts();
91 
92 protected:
93 
102 
103  float mySpeed;
104  float myTurnRadius;
105  float myTurnRate;
106  float myScalarAccel;
107  double myBeamTime;
108 
110  DtVector myPos;
111  DtVector32 myVel;
114 
115  float myTurretAz;
116  float myTurretAzRate;
117  float myGunElev;
118  float myGunElevRate;
119 
123  bool myIsDestroyed;
124 
125  bool myHaveArtParts;
126  bool myEmissionsEnabled;
127 
129 
130 protected:
131  static double theLethalDetonationRange;
133 };
134 
135 
DtVector32 myAccel
in topographic (N, E, down) coordinates
Definition: f18/vehicleSim.h:157
Instances of DtDetonationInteraction are used to communicate information associated with the impact o...
Definition: detonationInteractionHLA.h:37
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnHLA.h:61
virtual void simulate()
Call once per frame to simulate.
virtual void munitionUpdate()
float myTurretAzRate
Definition: f18/vehicleSim.h:161
DtTime myDetonateTime
Definition: f18/vehicleSim.h:166
DtEmitterSystemPublisher * mySysPub
Definition: f18/vehicleSim.h:134
virtual void emissionsUpdate()
DtEntityStateRepository * myESR
Definition: f18/vehicleSim.h:135
double myBeamTime
Definition: parallel/vehicleSim.h:107
Part of the F18 example.
Definition: f18/vehicleSim.h:31
DtVector myPos
topographic Euler angles
Definition: f18/vehicleSim.h:155
DtTime myTimeSpacing
Definition: parallel/vehicleSim.h:128
Instances of DtTopoView are used to create a Topographic coordinate view of the geocentric coordinate...
Definition: topoView.h:20
This file provides protocol independence for Remote Entity Lists.
float mySpeed
Definition: f18/vehicleSim.h:147
virtual void moveArtParts()
bool myHaveArtParts
Definition: f18/vehicleSim.h:170
virtual ~DtVehicleSim()
Destructor.
DtTaitBryans are used to represent orientation of an object, using a set of three Euler angles...
Definition: vlTaitBryan.h:43
This file provides protocol independence for local emitters.
DtTopoView * myTopoView
Definition: f18/vehicleSim.h:137
DtEmitterBeamRepository * myBeam
Definition: f18/vehicleSim.h:142
DtTaitBryan myEuler
Definition: f18/vehicleSim.h:154
virtual bool isDestroyed()
bool myEmissionsEnabled
Definition: f18/vehicleSim.h:171
float myTurnRate
Definition: f18/vehicleSim.h:149
virtual void disableEmissions()
float myTurretAz
in body coordinates
Definition: f18/vehicleSim.h:160
static DtTime myDt
Definition: parallel/vehicleSim.h:83
Instances of DtEntityPublisher are used for local or source simulations of entities (i...
Definition: entityPublisherHLA.h:28
virtual void toggleEmissions()
Emissions (radar)
Instances of DtEntityStateRepository are used to maintain attributes and state of entity objects in a...
Definition: entityStateRepository.h:42
Definition: vlVector.h:224
static void setSimDeltaTime(DtTime theDt)
Definition: parallel/vehicleSim.h:78
virtual void enableEmissions()
This file provides protocol independence for Fire Interactions.
DtFireInteraction * myFire
Definition: f18/vehicleSim.h:165
Instances of DtFireInteraction are used to represent the firing of a weapon.
Definition: fireInteractionHLA.h:35
bool myIsDestroyed
Definition: f18/vehicleSim.h:168
virtual void reactToDamage()
virtual void reactToDetonation()
Reaction to detonations.
DtReflectedEntityList * myRel
Definition: f18/vehicleSim.h:141
Definition: vlVector.h:162
class DtEmitterBeamRepository:
Definition: emitterBeamRepository.h:44
DtObjectPublisherContainer is an ObjectPublisher container which will execute a method on all contain...
Definition: publisherContainer.h:43
DtVector32 myRotRate
in topographic (N, E, down) coordinates
Definition: f18/vehicleSim.h:158
virtual void init(DtConstVector initPos, double initSpeed, double initHeading, double initTRadius, double initPitch, bool autoRoll, double initRoll)
Set initial values for simulation parameters.
Instances of DtReflectedEntityList are used to manage remote entities from the network.
Definition: reflectedEntityListHLA.h:38
static double theLethalDetonationRange
Definition: f18/vehicleSim.h:182
float myTurnRadius
Definition: f18/vehicleSim.h:148
Instances of DtEntityIdentifier are used as a unique ID for entities in DIS.
Definition: entityIdentifier.h:31
This file provides protocol to independence DtExerciseConn.
DtObjectPublisherContainer & myPublishedObjects
Definition: parallel/vehicleSim.h:101
DtExerciseConn * myExConn
Definition: f18/vehicleSim.h:132
This class contains the declaration of DtTopoView.
Contains the DtParallelExecutionContainer class declarations.
DtVector32 myVel
in topographic (N, E, down) coordinates
Definition: f18/vehicleSim.h:156
float myGunElev
Definition: f18/vehicleSim.h:162
virtual DtTime timeDestroyed()
DtVehicleSim(double refLat, double refLon, DtExerciseConn *conn, DtReflectedEntityList *rel, const DtEntityIdentifier &id, const DtEntityType &type, const char *name, const char *markings, const DtDeadReckonTypes alg, bool haveArtParts)
Constructor.
Instances of DtEmitterSystemPublisher are used for local or source simulations of emitter systems...
Definition: emitterSystemPublisherHLA.h:23
static void setDetonation(const DtDetonationInteraction *theDetonation)
static void setMunitionFlightTime(DtTime time)
static const DtDetonationInteraction * theDetonation
Definition: parallel/vehicleSim.h:86
virtual int checkDetonation()
virtual void detonateMunition()
float myGunElevRate
Definition: f18/vehicleSim.h:163
static DtTime theMunitionFlightTime
Definition: f18/vehicleSim.h:183
float myScalarAccel
Definition: f18/vehicleSim.h:150
DtDeadReckonTypes
Definition: disEnums.h:1013
DtReal DtTime
A definition of DtTime.
Definition: vlTime.h:19
virtual void fireMunition()
Instances of DtString are used to represent strings.
Definition: vlString.h:36
This file provides protocol independence for Detonation Interactions.
DtTime myTimeDestroyed
Definition: f18/vehicleSim.h:167
static void setLethalDetonationRange(double range)
DtEntityPublisher * myEntityPub
Definition: f18/vehicleSim.h:133
This file provides protocol independence for DtEntityPublisher.
DtEntityType is used to represent the type an entity object.
Definition: entityType.h:26

Document ID: Generated on Thu Oct 16 00:12:25 EDT 2025 from SVN revision 280738
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)