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();
57 
59  const DtString& rwName = DtString::nullString(),
60  DtReaderWriterRegistry* parentRegistry = 0) const;
61 
63  virtual DtString type() const;
64 
66  virtual const DtDetonationDescriptorList& pendingDetonations() const;
67 
69  virtual void addPendingDetonation(DtDetonationDescriptor* desc);
70 
72  virtual void removePendingDetonation(const DtString& eventId);
73 
75  virtual void setFiringCycleCompleteTime(DtTime completeTime);
76 
78  virtual DtTime timeFiringCycleComplete() const;
79 
86  virtual void setCommandedToFire();
87  virtual bool isCommandedToFire();
88 
89  virtual void setHasFired();
90  virtual bool hasFired();
92 
96 
99  virtual void setNextFireEventTime(const double time);
100  virtual double nextFireEventTime() const;
102 
105  virtual void setBurstRoundsRemaining(const int rounds);
106  virtual int burstRoundsRemaining() const;
108 
110 
111  virtual void setDisplayName(const DtString& displayName);
112  virtual const DtString displayName() const;
113 
116  virtual void setFiringTracers();
117  virtual void setNotFiringTracers();
118  virtual bool isFiringTracers() const;
119  virtual bool isFiringTracersSpecified()const;
121 
124  virtual DtArtPartType gunArtPart() const;
125  virtual void setGunArtPart(DtArtPartType gunArtPart);
127 
132  //virtual void setTurretArtPart(const DtArtPartType num);
133  //virtual DtArtPartType turretArtPart() const;
135 
138  virtual DtBaseWeaponComponentInterface* weaponInterface() const;
139  virtual void setWeaponInterface(DtBaseWeaponComponentInterface* weapon);
141 
142 public:
143 
144  static DtVrfProcessStateRepository* creator (const DtString& name,
145  DtLocalObject* vrfObject, DtReaderWriterRegistry* parentRegistry);
146 
147 protected:
148 
152 
155  enum FireState
156  {
158  HasFired
159  };
160 
168 
174 
182 
186 
188 
191 
196 
200 };
DtDetonationDescriptorList myPendingDetonations
List of DtDetonationDescriptors, used to save/restore information about pending scheduled detonations...
Definition: vrfBalGunPSR.h:151
DtRwBoolean myFiringTracers
A flag that indicates if the gun is firing tracer rounds (mixed with ball)
Definition: vrfBalGunPSR.h:190
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:31
int myGunArtPart
The art part number for the gun we're associated with.
Definition: vrfBalGunPSR.h:195
DtRwReal myNextFireEventTime
State variables for bursts with multiple detonations. These are used if the number of rounds-per-deto...
Definition: vrfBalGunPSR.h:181
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:184
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:155
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:187
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:199
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 procSRTypes.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:167
Abstract base class for all psrs that will serve as an interface between a controlling component on t...
Definition: baseWeaponComponentInterface.h:28
virtual DtVrfProcessStateRepository * clone(const DtString &rwName=DtString::nullString(), DtReaderWriterRegistry *parentRegistry=nullptr) const override
Definition: vrfBalGunPSR.h:157
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:173
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 Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)