VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtBallisticManager.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (c) 2026 MAK Technologies, Inc.
3  * All rights reserved.
4  *****************************************************************************/
5 
9 
10 #pragma once
11 
12 #include <vrvCore/vrvCore.h>
13 #include <vrvCore/DtDe.h>
14 #include <vrvCore/DtUniqueID.h>
16 
18 #include <matrix/vlVector.h>
19 
20 namespace makVrv
21 {
28  {
29  public:
32  {
35  };
36 
39  {
41  BallisticData();
42 
44  DtVector myPosition;
45 
47  DtVector myVelocity;
48 
51 
53  double myMaxLifetime;
54 
56  double myMaxDistance;
57 
59  double myMass;
60 
62  double myCaliber;
63 
65  int myCount;
66 
71  double myRateOfFire;
72 
74  int myTracerInterval = 0;
75 
78 
82  std::string myProximitySoundGroup;
83 
84  };
85 
86  public:
88  virtual ~DtBallisticManager();
89 
95  static DtBallisticManager& instance(DtDe& de);
96 
97  protected:
102  public:
104  DtBallisticManager() = delete;
105 
107  DtBallisticManager(const DtBallisticManager&) = delete;
108 
110  DtBallisticManager& operator=(const DtBallisticManager&) = delete;
111 
112  public:
114  virtual void tick(void) = 0;
115 
120  virtual void createProjectiles(const BallisticIdentifier& id, const BallisticData& data) = 0;
121 
125  virtual void removeProjectiles(const BallisticIdentifier& id) = 0;
126 
127  protected:
128 
131  };
132 }
Virtual base class. Allows for RTTI and proper virtual destruction. Used by Creators, Factories, Providers, Assemblers and User Interfaces.
Definition: DtVirtualBaseClass.h:19
std::string myProximitySoundGroup
Name of the sound group for proximity audio. Matches a DtBallisticSoundGroup::myName in DtBallisticSo...
Definition: DtBallisticManager.h:82
Visual and physical appearance parameters for a single tracer round type.
Definition: DtTracerDefinition.h:32
DtString mySourceId
Unique string ID of the entity that fired the burst.
Definition: DtBallisticManager.h:34
double myMuzzleVelocity
Initial speed of the projectile leaving the barrel (m/s).
Definition: DtBallisticManager.h:50
vrvCore singleton base class for the ballistic manager.
Definition: DtBallisticManager.h:27
Contains makVrv::DtDe class.
Parameters describing a ballistic burst to be spawned.
Definition: DtBallisticManager.h:38
double myMaxLifetime
Maximum lifetime in seconds before the projectile is automatically despawned.
Definition: DtBallisticManager.h:53
double myMass
Mass of the projectile in kilograms.
Definition: DtBallisticManager.h:59
double myRateOfFire
Rate of fire in rounds per second; must be &gt; 0.
Definition: DtBallisticManager.h:71
Contains makVrv::DtVirtualBaseClass class.
Contains makVrv::DtTracerDefinition class.Defines the visual and physical appearance of a tracer roun...
#define DT_DLL_VRVCORE
Definition: vrvCore.h:20
DtVector myPosition
World-space starting position of the projectile (meters).
Definition: DtBallisticManager.h:44
DtTracerDefinition myTracerDefinition
Visual and physical appearance of tracer rounds for this burst.
Definition: DtBallisticManager.h:77
double myCaliber
Caliber (diameter) of the projectile in millimeters.
Definition: DtBallisticManager.h:62
int myCount
Number of rounds in the burst; must be &gt;= 1.
Definition: DtBallisticManager.h:65
DtVector myVelocity
World-space initial velocity vector at the moment of firing (m/s).
Definition: DtBallisticManager.h:47
DtDe & myDe
Reference to the simulation environment this manager is associated with.
Definition: DtBallisticManager.h:130
double myMaxDistance
Maximum travel distance in meters before the projectile is despawned.
Definition: DtBallisticManager.h:56
Contains makVrv::DtUniqueID type.
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition: DtDe.h:76
Identifies the source entity associated with a ballistic burst.
Definition: DtBallisticManager.h:31
Contains DLL export macros.

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)