VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
warfareComponent.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 1992-2026 MAK Technologies, Inc
3  * All rights reserved.
4  ****************************************************************************/
5 
6 // warfareComponent.h - handles weapon fire and detonation for DtVehicleSim
7 
8 #pragma once
9 
10 #include <vl/exerciseConn.h>
12 #include <vl/fireInteraction.h>
13 
14 // Forward declarations to minimize header dependencies
15 class DtVehicleSim;
18 class DtEntityPublisher;
19 
21 {
22 public:
25 
28 
30 
31  void fireMunition(const DtGlobalObjectDesignator& tg);
34  void detonateMunition();
36  void tick();
38 
40 
46 
48  static void theDetonationCb(DtDetonationInteraction* inter, void* self);
49 
50 private:
52 
58 
63 };
DtFireInteraction * myFire
Current outgoing fire interaction and scheduled detonation time.
Definition: warfareComponent.h:60
Instances of DtExerciseConn are used to provide an application&#39;s interface or connection to the netwo...
Definition: exerciseConnDIS.h:63
~DtWarfareComponent()
Destructor.
DtEntityPublisher * myEntityPub
Owning vehicle, shared context, and entity state used for fire/detonations.
Definition: warfareComponent.h:56
Definition: warfareComponent.h:20
void processDetonation(DtDetonationInteraction *detInter)
Reaction to detonation interactions affecting the owning vehicle.
void detonateMunition()
Immediately detonate the currently active munition (if any)
Part of the F18 example.
Definition: f18/vehicleSim.h:29
DtTime myDetonateTime
Owning vehicle, shared context, and entity state used for fire/detonations.
Definition: warfareComponent.h:61
DtDetonationPdu is used to represent the impact or detonation of a munition.
Definition: detonationPdu.h:42
DtVehicleSim * myOwner
Owning vehicle, shared context, and entity state used for fire/detonations.
Definition: warfareComponent.h:53
void fireMunition(const DtGlobalObjectDesignator &tg)
Fire and detonation interface delegated from DtVehicleSim.
Instances of DtEntityPublisher are used for local or source simulations of entities, (i.e.
Definition: entityPublisherDIS.h:33
Instances of DtEntityStateRepository are used to maintain attributes and state of entity objects in a...
Definition: entityStateRepository.h:42
This file provides protocol independence for Fire Interactions.
DtEntityStateRepository * myESR
Owning vehicle, shared context, and entity state used for fire/detonations.
Definition: warfareComponent.h:57
Instances of this class provide a protocol independent interface to a list of reflected entities in a...
Definition: reflectedEntityListDIS.h:31
DtWarfareComponent(DtVehicleSim *owner, DtExerciseConn *conn, DtReflectedEntityList *rel, DtEntityPublisher *entPub, DtEntityStateRepository *esr)
Construct a warfare component bound to a vehicle and its state/network context.
Instances of DtEntityIdentifier are used as a unique ID for entities in DIS.
Definition: entityIdentifier.h:31
This file provides protocol to independence DtExerciseConn.
int checkDetonation(DtDetonationInteraction *detInter)
Evaluate whether an incoming detonation is lethal for this vehicle.
Instances of DtFireInteraction are used to represent the firing of a weapon.
Definition: firePdu.h:34
DtReflectedEntityList * myRel
Owning vehicle, shared context, and entity state used for fire/detonations.
Definition: warfareComponent.h:55
DtExerciseConn * myExConn
Owning vehicle, shared context, and entity state used for fire/detonations.
Definition: warfareComponent.h:54
static void theDetonationCb(DtDetonationInteraction *inter, void *self)
Static callback handler registered with DtDetonationInteraction.
This file provides protocol independence for Detonation Interactions.
void tick()
Per-frame update driving munition timing and scheduled detonation.

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)