VR-Forces 5.0.1 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 
24 {
28 };
29 
35 
36 
39 {
40 
41 protected:
42 
44 
45 public:
46 
47  DtVrfBalGunPSR(DtLocalObject* vrfObject,
48  const DtString& rwName = DtString::nullString(),
49  DtReaderWriterRegistry* parentRegistry = 0);
50 
51  DtVrfBalGunPSR(const DtVrfBalGunPSR& orig,
52  const DtString& rwName = DtString::nullString(),
53  DtReaderWriterRegistry* parentRegistry = 0);
54 
55  const DtVrfBalGunPSR& operator=(
56  const DtVrfBalGunPSR& orig);
57 
58  virtual ~DtVrfBalGunPSR();
59 
61  const DtString& rwName = DtString::nullString(),
62  DtReaderWriterRegistry* parentRegistry = 0) const;
63 
65  virtual DtString type() const;
66 
68  virtual const DtDetonationDescriptorList& pendingDetonations() const;
69 
71  virtual void addPendingDetonation(DtDetonationDescriptor* desc);
72 
74  virtual void removePendingDetonation(const DtString& eventId);
75 
77  virtual void setFiringCycleCompleteTime(DtTime completeTime);
78 
80  virtual DtTime timeFiringCycleComplete() const;
81 
88  virtual void setCommandedToFire();
89  virtual bool isCommandedToFire();
90 
91  virtual void setHasFired();
92  virtual bool hasFired();
94 
98 
101  virtual void setNextFireEventTime(const double time);
102  virtual double nextFireEventTime() const;
104 
107  virtual void setBurstRoundsRemaining(const int rounds);
108  virtual int burstRoundsRemaining() const;
110 
112 
113  virtual void setDisplayName(const DtString& displayName);
114  virtual const DtString displayName() const;
115 
118  virtual void setFiringTracers();
119  virtual void setNotFiringTracers();
120  virtual bool isFiringTracers() const;
121  virtual bool isFiringTracersSpecified()const;
123 
126  virtual DtArtPartType gunArtPart() const;
127  virtual void setGunArtPart(DtArtPartType gunArtPart);
129 
134  //virtual void setTurretArtPart(const DtArtPartType num);
135  //virtual DtArtPartType turretArtPart() const;
137 
140  virtual DtBaseWeaponComponentInterface* weaponInterface() const;
141  virtual void setWeaponInterface(DtBaseWeaponComponentInterface* weapon);
143 
144 public:
145 
146  static DtVrfProcessStateRepository* creator (const DtString& name,
147  DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
148 
149 protected:
150 
154 
157  enum FireState
158  {
160  HasFired
161  };
162 
170 
176 
184 
188 
190 
193 
198 
202 
203 };
virtual DtVrfProcessStateRepository * clone(const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=0) const
DtDetonationDescriptorList myPendingDetonations
List of DtDetonationDescriptors, used to save/restore information about pending scheduled detonations...
Definition: vrfBalGunPSR.h:153
DtRwBoolean myFiringTracers
A flag that indicates if the gun is firing tracer rounds (mixed with ball)
Definition: vrfBalGunPSR.h:192
Definition: vrfBalGunPSR.h:25
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:33
int myGunArtPart
The art part number for the gun we're associated with.
Definition: vrfBalGunPSR.h:197
DtRwReal myNextFireEventTime
State variables for bursts with multiple detonations. These are used if the number of rounds-per-deto...
Definition: vrfBalGunPSR.h:183
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:186
DtLineOfSightState
Definition: vrfBalGunPSR.h:23
#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:157
static DtVrfProcessStateRepository * creator(const DtString &name, DtLocalObject *vrfObject, DtReaderWriterRegistry *parentRegistry)
Create an instance of a DtVrfWeaponPSR.
class DtDetonationDescriptor:
Definition: detonationDescriptor.h:32
DtRwString myDisplayName
Definition: vrfBalGunPSR.h:189
Description: Readable, Writable int.
Definition: rwInt.h:25
Definition: vrfBalGunPSR.h:26
Definition: vrfBalGunPSR.h:27
DtBaseWeaponComponentInterface * myWeaponInterface
The weapon control interface for this gun, if it exists. This is set during postAddComponentsInit by ...
Definition: vrfBalGunPSR.h:201
const DtVrfWeaponPSR & operator=(const DtVrfWeaponPSR &orig)
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
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:169
virtual DtString type() const
Returns the string type of the repository, as defined in procSRTypes.h.
Abstract base class for all psrs that will serve as an interface between a controlling component on t...
Definition: baseWeaponComponentInterface.h:28
Definition: vrfBalGunPSR.h:159
Class DtVrfBalGunPSR: Used to hold checkpointable state for the processes associated with ballistic g...
Definition: vrfBalGunPSR.h:38
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:175
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)