VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
fireForEffectTask.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
14 #pragma once
15 
16 #include <vlutil/vlMachineTypes.h>
17 
18 #include "vrftasks/simTask.h"
19 #include <readerWriter/rwString.h>
20 #include "vrfutil/rwResource.h"
21 #include <readerWriter/rwInt.h>
22 #include <readerWriter/rwReal.h>
23 #include <readerWriter/rwBoolean.h>
24 #include "vrfutil/rwTaitBryan.h"
25 
33 {
34 
35 protected:
38 
42  parentRegistry = nullptr);
43 
45  DtFireForEffectTask(const DtString & writeName, const DtFireForEffectTask &
46  orig, DtReaderWriterRegistry * parentRegistry = nullptr);
47 
50 
51 public:
52  virtual ~DtFireForEffectTask() override;
53 
56  virtual void addWeapon(const DtString& weap);
58  virtual const DtRwStringList& weaponNames() const;
60  virtual DtRwStringList& weaponNames();
62  virtual void setWeaponNames(const DtRwStringList& weapons);
63 
73  virtual bool getWeaponOnList(const DtString& weaponName, DtString& weapon) const;
74 
77 
78  virtual void setWeaponId(const DtString& weaponId);
79  virtual DtString weaponId() const;
81  virtual bool weaponIdSpecified() const;
84 
86 
87  virtual void setAmmoType(const DtEntityType& ammoType);
88  virtual const DtEntityType& ammoType() const;
90  virtual bool ammoTypeSpecified() const;
92 
94  //virtual void setAmmoTypeSpecified(bool specified);
95  //virtual bool ammoTypeSpecified() const;
96 
97  virtual void setNumberOfRounds(int rounds);
98  virtual int numberOfRounds() const;
99  virtual bool numberOfRoundsSpecified() const;
100 
101  virtual void setDispersionRadius(DtReal radius);
102  virtual DtReal dispersionRadius() const;
103  virtual bool dispersionRadiusSpecified() const;
104 
105  virtual void setApplyHeightAboveTerrain(bool);
106  virtual bool applyHeightAboveTerrain() const;
107 
108  virtual void setHeightAboveTerrain(DtReal height);
109  virtual DtReal heightAboveTerrain() const;
110  virtual bool heightAboveTerrainSpecified() const;
111 
114  virtual void setAllowTargetInsideStructure(bool);
117  virtual bool allowTargetInsideStructure() const;
118 
119  virtual void setMuzzleSpeed(DtReal v);
120  virtual DtReal muzzleSpeed() const;
121  virtual bool muzzleSpeedSpecified() const;
122 
123  virtual void setMuzzleOrientation(DtTaitBryan & orient);
124  virtual const DtRwTaitBryan & muzzleOrientation() const;
125  virtual bool muzzleOrientationSpecified() const;
126 
128  virtual void setFuseType(int i);
129  virtual bool fuseTypeSpecified() const;
130  virtual DtDetonatorFuze fuseType() const;
131 
132  virtual void setGenerateKnownTargetPoint(bool);
133  virtual bool generateKnownTargetPoint() const;
134 
138  virtual void setKnownTargetPointName(const DtString&);
139  virtual const DtString& knownTargetPointName() const;
140 
141  virtual void setContinuousFire(bool);
142  virtual bool continuousFire() const;
143 
144  virtual void setFireMissionIndex(unsigned int);
145  virtual unsigned int fireMissionIndex() const;
146 
147 
150  virtual int netRepSize() const override;
151 
153  virtual bool setFromNet(const char* contentBuffer,
154  unsigned contentSize) override;
155 
156  virtual void postGetSelf() override;
157 
160  virtual bool setToNet() override;
161 
166  virtual DtString parameterStringRep() const;
167 
168 protected:
173 
181 
186 
189 
193 
196 
200 
203 };
204 
DtRwBoolean myContinuousFire
Whether or not the firing will be continuous until a cease fire task is received. ...
Definition: fireForEffectTask.h:195
DtRwBoolean myAllowTargetInsideStructure
Definition: fireForEffectTask.h:178
DtRwReal myMuzzleSpeed
In some circumstances like a hand tossed grenade the user may want to temper the force with which the...
Definition: fireForEffectTask.h:184
DtRwInt myFuseType
Definition: fireForEffectTask.h:179
DtRwResource myAmmoType
Indicates the ammo type to be fired.
Definition: fireForEffectTask.h:202
DtRwTaitBryan myMuzzleOrientation
Definition: fireForEffectTask.h:185
virtual void postGetSelf()
Called after either version of getSelf (mtl or environment). Default is no-op.
DtRwString myWeaponId
Weapon ID string for the weapon that should be used. Replaces myWeaponNames in VRF 5...
Definition: fireForEffectTask.h:199
DtRwReal myHeightAboveTerrain
Definition: fireForEffectTask.h:177
Description: Readable, Writable DtString Variable substitutions are done on this object when it is re...
Definition: rwString.h:20
Description: Readable, Writable DtTaitBryan.
Definition: rwTaitBryan.h:20
Definition: readerWriterRegistry.h:39
DtRwBoolean myApplyHeightAboveTerrain
Definition: fireForEffectTask.h:176
DtRwBoolean myGenerateKnownTargetPoint
On detonation create a known target point of first two letters of shooters name plus 4 random numbers...
Definition: fireForEffectTask.h:188
Contains the DtRwTaitBryan class declaration.
DtRwString myKnownTargetPointName
If generating a known point, set this text to be the name of the known point rather than having the s...
Definition: fireForEffectTask.h:192
virtual bool setFromNet(const char *contentBuffer, unsigned contentSize)
Sets mySubtask member from the incoming contentBuffer (cast to type DtNetSimTask). Derived classes should call down to this function first, and then extract their own data starting at the location contentBuffer + DtSimTask::netRepSize().
Description: Readable, Writable int.
Definition: rwInt.h:25
virtual bool setToNet()
Calls netRep() to create the network buffer. Casts the resulting myNetRep to type DtNetSimTask*...
#define DT_DLL_vrftasks
This file is used to determine how to build.
Definition: vrftasksDefines.h:26
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
DtRwReal myDispersionRadius
Definition: fireForEffectTask.h:175
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
DtRwStringList myWeaponNames
Definition: fireForEffectTask.h:172
DtSimTask is an abstract base class from which real tasks can derive. It manages the read/write capab...
Definition: simTask.h:30
const DtSimTask & operator=(const DtSimTask &orig)
assignment operator; same as copy constructor
DtRwInt myNumberOfRounds
Definition: fireForEffectTask.h:174
Definition: rwStringList.h:20
DtRwInt myFireMissionIndex
Definition: fireForEffectTask.h:180
This class will read in an old resource by name and convert it to the type, or, just read it as type...
Definition: rwResource.h:12
File: fireForEff.h.
Definition: fireForEffectTask.h:32
virtual int netRepSize() const
Returns the size in bytes of the network representation of the class. This is the size in bytes of th...

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)