VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
vrfBalGunPSR.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
14 
15 #pragma once
16 
19 #include "vlutil/vlTime.h"
20 
22 {
26 };
27 
33 
34 
37 {
38 
39 protected:
40 
42 
43 public:
44 
45  DtVrfBalGunPSR(DtLocalObject* vrfObject,
46  const DtString& rwName = DtString::nullString(),
47  DtReaderWriterRegistry* parentRegistry = 0);
48 
49  DtVrfBalGunPSR(const DtVrfBalGunPSR& orig,
50  const DtString& rwName = DtString::nullString(),
51  DtReaderWriterRegistry* parentRegistry = 0);
52 
53  const DtVrfBalGunPSR& operator=(
54  const DtVrfBalGunPSR& orig);
55 
56  virtual ~DtVrfBalGunPSR() override;
57 
59  const DtString& rwName = DtString::nullString(), DtReaderWriterRegistry* parentRegistry = 0) const override;
60 
62  virtual DtString type() const override;
63 
65  virtual const DtDetonationDescriptorList& pendingDetonations() const;
66 
68  virtual void addPendingDetonation(DtDetonationDescriptor* desc);
69 
71  virtual void removePendingDetonation(const DtString& eventId);
72 
74  virtual void setFiringCycleCompleteTime(DtTime completeTime);
75 
77  virtual DtTime timeFiringCycleComplete() const;
78 
85  virtual void setCommandedToFire();
86  virtual bool isCommandedToFire();
87 
88  virtual void setHasFired();
89  virtual bool hasFired();
91 
95 
98  virtual void setNextFireEventTime(const double time);
99  virtual double nextFireEventTime() const;
101 
104  virtual void setBurstRoundsRemaining(const int rounds);
105  virtual int burstRoundsRemaining() const;
107 
109 
110  virtual void setDisplayName(const DtString& displayName);
111  virtual const DtString displayName() const;
112 
115  virtual void setFiringTracers();
116  virtual void setNotFiringTracers();
117  virtual bool isFiringTracers() const;
118  virtual bool isFiringTracersSpecified()const;
120 
123  virtual DtArtPartType gunArtPart() const;
124  virtual void setGunArtPart(DtArtPartType gunArtPart);
126 
131  //virtual void setTurretArtPart(const DtArtPartType num);
132  //virtual DtArtPartType turretArtPart() const;
134 
137  virtual DtBaseWeaponComponentInterface* weaponInterface() const;
138  virtual void setWeaponInterface(DtBaseWeaponComponentInterface* weapon);
140 
141 public:
142 
143  static DtVrfProcessStateRepository* creator (const DtString& name,
144  DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
145 
146 protected:
147 
151 
154  enum FireState
155  {
157  HasFired
158  };
159 
167 
173 
181 
185 
187 
190 
195 
199 };
DtDetonationDescriptorList myPendingDetonations
List of DtDetonationDescriptors, used to save/restore information about pending scheduled detonations...
Definition: vrfBalGunPSR.h:150
DtRwBoolean myFiringTracers
A flag that indicates if the gun is firing tracer rounds (mixed with ball)
Definition: vrfBalGunPSR.h:189
Definition: vrfBalGunPSR.h:23
Description: Readable, Writable DtString Variable substitutions are done on this object when it is re...
Definition: rwString.h:20
Definition: readerWriterRegistry.h:39
File: weaponPSR.h.
Definition: vrfWeaponPSR.h:32
int myGunArtPart
The art part number for the gun we're associated with.
Definition: vrfBalGunPSR.h:194
DtRwReal myNextFireEventTime
State variables for bursts with multiple detonations. These are used if the number of rounds-per-deto...
Definition: vrfBalGunPSR.h:180
Instances of DtDetonationDescriptorList are readable/writable lists of DtDetonationDescriptors.
Definition: detonationDescriptorList.h:18
DtRwInt myBurstRoundsRemaining
The number of rounds left in the burst, yet to process in fire events.
Definition: vrfBalGunPSR.h:183
DtLineOfSightState
File: balGunPSR.h.
Definition: vrfBalGunPSR.h:21
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
FireState
State describing the gun. We could add more physical gun states here such as "jammed.".
Definition: vrfBalGunPSR.h:154
static DtVrfProcessStateRepository * creator(const DtString &name, DtLocalObject *vrfObject, DtReaderWriterRegistry *parentRegistry)
Create an instance of a DtVrfWeaponPSR.
class DtDetonationDescriptor:
Definition: detonationDescriptor.h:33
DtRwString myDisplayName
Definition: vrfBalGunPSR.h:186
Description: Readable, Writable int.
Definition: rwInt.h:25
Definition: vrfBalGunPSR.h:24
Definition: vrfBalGunPSR.h:25
DtBaseWeaponComponentInterface * myWeaponInterface
The weapon control interface for this gun, if it exists. This is set during postAddComponentsInit by ...
Definition: vrfBalGunPSR.h:198
const DtVrfWeaponPSR & operator=(const DtVrfWeaponPSR &orig)
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
virtual DtString type() const override
Returns the string type of the repository, as defined in psrTypes.h.
Class DtVrfProcessStateRepository: Abstract base class for all process state repositories. Process state repositories represent (potentially) shared, savable information for one or more components functioning together to achieve some process or set of processes; such as aiming and firing a weapon; moving an object; or just waiting a specified amount of time.
Definition: vrfProcessStateRepository.h:45
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
DtRwInt myFireState
State describing the gun; for communication between the controller and actuator. The controller sets ...
Definition: vrfBalGunPSR.h:166
Abstract base class for all psrs that will serve as an interface between a controlling component on t...
Definition: baseWeaponComponentInterface.h:29
virtual DtVrfProcessStateRepository * clone(const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=nullptr) const override
Definition: vrfBalGunPSR.h:156
Class DtVrfBalGunPSR: Used to hold checkpointable state for the processes associated with ballistic g...
Definition: vrfBalGunPSR.h:36
DtRwReal myFireCycleCompleteTime
The time at which the gun firing cycle is complete. Set by the gun actuator component to inform the g...
Definition: vrfBalGunPSR.h:172
A locally simulated VRF object.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)