VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
fireMissionInformation.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include "vrfobjcore/simObject.h"
13 #include "readerWriter/rwVector.h"
14 #include <readerWriter/rwInt.h>
15 #include <readerWriter/rwList.h>
16 #include <readerWriter/rwString.h>
17 #include <readerWriter/rwReal.h>
18 #include "vrfutil/rwTaitBryan.h"
20 #include "vrfutil/rwResource.h"
21 #include <vrfutil/rwUUID.h>
22 #include <vrfutil/rwEntityType.h>
24 
25 #include <map>
26 
30 
32 class DtSimTask;
33 
36 {
37 public:
39 
41  DtReaderWriterRegistry* const parentRegistry = 0);
42 
44  DtReaderWriterRegistry* const parentRegistry = 0);
45 
47  DtFireMissionInformation(const DtString & writeName,const DtFireMissionInformation& orig,
48  DtReaderWriterRegistry* const parentRegistry = 0);
49 
50  virtual ~DtFireMissionInformation() override;
51 
53 
54  const DtRwVector& currentTargetLocation() const {return myCurrentTargetLocation; };
55  void setCurrentTargetLocation(const DtVector& loc) { myCurrentTargetLocation=loc; };
56 
60  DtRwSimObjectReference target() const { return myTarget; };
61 
63  void setTarget(const DtUUID& name) { myTarget.setUUID(name); };
64 
65  const DtEntityType& ammoType() const { return myAmmoType; };
66  void setAmmoType(const DtEntityType& ammo) { myAmmoType = ammo; };
67 
68  const DtRwInt numberOfRounds() const { return myNumberRounds; };
69  void setNumberOfRounds(const int num) { myNumberRounds = num; };
70 
72  virtual void setHeightAboveTerrain(DtReal height) { myHeightAboveTerrain = height; };
74  virtual DtReal heightAboveTerrain() { return myHeightAboveTerrain; };
75 
77  virtual void setMuzzleSpeed(DtReal v) { myMuzzleSpeed = v; myMuzzleSpeed.setValueSpecified(true);};
79  virtual DtRwReal muzzleSpeed() { return myMuzzleSpeed; };
80 
82  virtual void setMuzzleOrientation(const DtRwTaitBryan & o) { myMuzzleOrientation = o; myMuzzleOrientation.setValueSpecified(true);};
84  virtual DtRwTaitBryan & muzzleOrientation() { return myMuzzleOrientation; };
85 
87  DtRwSimObjectReference route() const { return myRoute; };
88  void setRoute(const DtUUID& name) { myRoute.setUUID(name); };
89 
91  void setFuseType(int i) { myFuseType = i; myFuseType.setValueSpecified(true); };
92  bool fuseTypeSpecified() const { return myFuseType; };
93  DtDetonatorFuze fuseType() const { return (DtDetonatorFuze)myFuseType.value(); };
94 
95  virtual const DtReal detonationProximity() const { return myDetonationProximity; };
96  virtual void setDetonationProximity(DtReal prox) { myDetonationProximity = prox; };
97 
98  virtual bool generateKnownTargetPoint() const { return myGenerateKnownTargetPoint; };
99  virtual void setGenerateKnownTargetPoint(bool b) { myGenerateKnownTargetPoint = b; };
100 
104  virtual void setKnownTargetPointName(const DtString& s) { myKnownTargetPointName = s; myKnownTargetPointName.setValueSpecified(s.length() != 0); };
105  virtual const DtString& knownTargetPointName() const { return myKnownTargetPointName; };
106 
107 protected:
108  DtRwSimObjectReference myTarget;
120 
124 };
125 
128 
130 typedef std::map<DtString, DtFireMissionInformation> DtMappedFireMissionList;
131 
UUID is a unique ID wrapper class.
Definition: uuid.h:59
virtual void setDetonationProximity(DtReal prox)
Definition: fireMissionInformation.h:96
This class allows one to collect and compare strings using an index number instead of having to do st...
Definition: symbolString.h:27
DtRwTemplatedListPtr< DtFireMissionInformation, true > DtFireMissionList
Definition: fireMissionInformation.h:127
DtRwSimObjectReference route() const
Additional Parameters for Cruise Missiles.
Definition: fireMissionInformation.h:87
virtual DtRwTaitBryan & muzzleOrientation()
Get the initial velocity for the shell to be fired at.
Definition: fireMissionInformation.h:84
void setAmmoType(const DtEntityType &ammo)
Definition: fireMissionInformation.h:66
DtRwInt myNumberRounds
Definition: fireMissionInformation.h:111
Definition: readerWriter.h:85
Description: Readable, Writable DtString Variable substitutions are done on this object when it is re...
Definition: rwString.h:20
const DtEntityType & ammoType() const
Definition: fireMissionInformation.h:65
Description: Readable, Writable DtTaitBryan.
Definition: rwTaitBryan.h:20
Definition: readerWriterRegistry.h:39
Contains the DtUUID class declaration.
virtual void setMuzzleOrientation(const DtRwTaitBryan &o)
If specified in the task set the orientation of the munition. Usefull for hand grenades.
Definition: fireMissionInformation.h:82
virtual void setValueSpecified(bool specified, bool recurse=false)
The specified flags are used for optional values. On construction, all objects are marked as specifie...
Definition: fireMissionInformation.h:35
Contains the DtRwTaitBryan class declaration.
Definition: rwVector.h:23
Specialized reader/writer version of the shared object reference that will encapsulate the actual sha...
Definition: rwSimObjectReference.h:21
virtual bool generateKnownTargetPoint() const
Definition: fireMissionInformation.h:98
virtual DtReal heightAboveTerrain()
Get the height above terrain for the shell to detonate.
Definition: fireMissionInformation.h:74
DtRwSimObjectReference target() const
If the fire mission objective is an entity we need to know it so we can update the location...
Definition: fireMissionInformation.h:60
DtRwSimObjectReference myRoute
Additional parameters needed for cruise missiles.
Definition: fireMissionInformation.h:116
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
DtRwReal myHeightAboveTerrain
Definition: fireMissionInformation.h:112
void setNumberOfRounds(const int num)
Definition: fireMissionInformation.h:69
Description: Readable, Writable int.
Definition: rwInt.h:25
DtRwBoolean myGenerateKnownTargetPoint
Definition: fireMissionInformation.h:119
DtRwString myKnownTargetPointName
If generating a known point, set this text to be the name of the known point rather than having the s...
Definition: fireMissionInformation.h:123
DtRwInt myFuseType
Definition: fireMissionInformation.h:118
void setRoute(const DtUUID &name)
Definition: fireMissionInformation.h:88
DtRwReal myMuzzleSpeed
Definition: fireMissionInformation.h:113
void setFuseType(int i)
Type of fuse to use, if known.
Definition: fireMissionInformation.h:91
void setTarget(const DtUUID &name)
Was: setTargetName.
Definition: fireMissionInformation.h:63
virtual const DtReal detonationProximity() const
Definition: fireMissionInformation.h:95
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
virtual void setHeightAboveTerrain(DtReal height)
Set the height above terrain for the shell to detonate.
Definition: fireMissionInformation.h:72
void setCurrentTargetLocation(const DtVector &loc)
Definition: fireMissionInformation.h:55
DtRwReal myDetonationProximity
Definition: fireMissionInformation.h:117
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
DtRwVector myCurrentTargetLocation
Definition: fireMissionInformation.h:110
Definition: rwTemplatedList.h:34
DtSimTask is an abstract base class from which real tasks can derive. It manages the read/write capab...
Definition: simTask.h:30
DtDetonatorFuze fuseType() const
Definition: fireMissionInformation.h:93
bool fuseTypeSpecified() const
Definition: fireMissionInformation.h:92
DtRwResource myAmmoType
Definition: fireMissionInformation.h:109
const DtReaderWriter & operator=(const DtReaderWriter &orig)
assignment operator
virtual void setKnownTargetPointName(const DtString &s)
Sets the name of the known target point (if generated). Note that this will not enforce uniqueness on...
Definition: fireMissionInformation.h:104
std::map< DtString, DtFireMissionInformation > DtMappedFireMissionList
Definition: fireMissionInformation.h:130
const DtRwInt numberOfRounds() const
Definition: fireMissionInformation.h:68
virtual void setGenerateKnownTargetPoint(bool b)
Definition: fireMissionInformation.h:99
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
DtRwTaitBryan myMuzzleOrientation
Definition: fireMissionInformation.h:114
const DtRwVector & currentTargetLocation() const
Definition: fireMissionInformation.h:54
virtual DtRwReal muzzleSpeed()
Get the initial velocity for the shell to be fired at.
Definition: fireMissionInformation.h:79
virtual void setMuzzleSpeed(DtReal v)
If specified in the task set the initial speed of the munition. Usefull for hand grenades.
Definition: fireMissionInformation.h:77
File: rwVector.h.

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)