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-2026 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;
127 
129 
130 protected:
131  static double theLethalDetonationRange;
133 };
134 
135 
DtVector32 myAccel
in topographic (N, E, down) coordinates
Definition: f18/vehicleSim.h:139
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:62
virtual void simulate()
Call once per frame to simulate.
virtual void munitionUpdate()
float myTurretAzRate
Definition: f18/vehicleSim.h:143
DtTime myDetonateTime
Definition: parallel/vehicleSim.h:121
virtual void emissionsUpdate()
DtEntityStateRepository * myESR
Definition: f18/vehicleSim.h:120
double myBeamTime
Definition: parallel/vehicleSim.h:107
Part of the F18 example.
Definition: f18/vehicleSim.h:29
DtVector myPos
topographic Euler angles
Definition: f18/vehicleSim.h:137
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:129
DtEmitterSystemPublisher * mySysPub
Definition: parallel/vehicleSim.h:96
virtual void moveArtParts()
bool myHaveArtParts
Definition: f18/vehicleSim.h:146
virtual ~DtVehicleSim()
Destructor.
DtTaitBryans are used to represent orientation of an object, using a set of three Euler angles...
Definition: vlTaitBryan.h:43
DtEmitterBeamRepository * myBeam
Definition: parallel/vehicleSim.h:100
This file provides protocol independence for local emitters.
DtTopoView * myTopoView
Definition: f18/vehicleSim.h:121
DtTaitBryan myEuler
Definition: f18/vehicleSim.h:136
virtual bool isDestroyed()
Reaction to detonations.
bool myEmissionsEnabled
Definition: parallel/vehicleSim.h:126
float myTurnRate
Definition: f18/vehicleSim.h:131
virtual void disableEmissions()
Emissions (radar) - delegated to DtEmitterComponent
float myTurretAz
in body coordinates
Definition: f18/vehicleSim.h:142
static DtTime myDt
Definition: parallel/vehicleSim.h:83
Instances of DtEntityPublisher are used for local or source simulations of entities (i...
Definition: entityPublisherHLA.h:29
virtual void toggleEmissions()
Emissions (radar) - delegated to DtEmitterComponent
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()
Emissions (radar) - delegated to DtEmitterComponent
This file provides protocol independence for Fire Interactions.
Instances of DtFireInteraction are used to represent the firing of a weapon.
Definition: fireInteractionHLA.h:35
bool myIsDestroyed
Definition: f18/vehicleSim.h:149
virtual void reactToDamage()
Reaction to detonations.
virtual void reactToDetonation()
Reaction to detonations.
DtReflectedEntityList * myRel
Definition: f18/vehicleSim.h:122
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:140
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:155
DtFireInteraction * myFire
Definition: parallel/vehicleSim.h:120
float myTurnRadius
Definition: f18/vehicleSim.h:130
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:118
This class contains the declaration of DtTopoView.
Contains the DtParallelExecutionContainer class declarations.
DtVector32 myVel
in topographic (N, E, down) coordinates
Definition: f18/vehicleSim.h:138
float myGunElev
Definition: f18/vehicleSim.h:144
virtual DtTime timeDestroyed()
Reaction to detonations.
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:145
static DtTime theMunitionFlightTime
Definition: f18/vehicleSim.h:156
float myScalarAccel
Definition: f18/vehicleSim.h:132
DtDeadReckonTypes
Definition: disEnums.h:1020
DtReal DtTime
A definition of DtTime.
Definition: vlTime.h:21
virtual void fireMunition()
Fire and detonate functions.
Instances of DtString are used to represent strings.
Definition: vlString.h:38
This file provides protocol independence for Detonation Interactions.
DtTime myTimeDestroyed
Definition: f18/vehicleSim.h:148
static void setLethalDetonationRange(double range)
DtEntityPublisher * myEntityPub
Definition: f18/vehicleSim.h:119
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 Mon Sep 28 00:09:32 EDT 2026 from SVN revision 295353
Copyright © 1992-2025 MAK Technologies. All Rights Reserved (www.mak.com)