VR-Forces 5.0.2 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/rwUUID.h>
21 
22 #include <map>
23 
27 
29 class DtSimTask;
30 
33 {
34 public:
36 
38  DtReaderWriterRegistry* const parentRegistry = 0);
39 
41  DtReaderWriterRegistry* const parentRegistry = 0);
42 
44  DtFireMissionInformation(const DtString & writeName,const DtFireMissionInformation& orig,
45  DtReaderWriterRegistry* const parentRegistry = 0);
46 
47  virtual ~DtFireMissionInformation();
48 
50 
51  const DtRwVector& currentTargetLocation() const {return myCurrentTargetLocation; };
52  void setCurrentTargetLocation(const DtVector& loc) { myCurrentTargetLocation=loc; };
53 
57  DtRwSimObjectReference target() const { return myTarget; };
58 
60  void setTarget(const DtUUID& name) { myTarget.setUUID(name); };
61 
62  const DtRwString& ammoType() const { return myAmmoType; };
63  void setAmmoType(const DtString& ammo) { myAmmoType = ammo; };
64 
65  const DtRwInt numberOfRounds() const { return myNumberRounds; };
66  void setNumberOfRounds(const int num) { myNumberRounds = num; };
67 
69  virtual void setHeightAboveTerrain(DtReal height) { myHeightAboveTerrain = height; };
71  virtual DtReal heightAboveTerrain() { return myHeightAboveTerrain; };
72 
74  virtual void setMuzzleSpeed(DtReal v) { myMuzzleSpeed = v; myMuzzleSpeed.setValueSpecified(true);};
76  virtual DtRwReal muzzleSpeed() { return myMuzzleSpeed; };
77 
79  virtual void setMuzzleOrientation(const DtRwTaitBryan & o) { myMuzzleOrientation = o; myMuzzleOrientation.setValueSpecified(true);};
81  virtual DtRwTaitBryan & muzzleOrientation() { return myMuzzleOrientation; };
82 
84  DtRwSimObjectReference route() const { return myRoute; };
85  void setRoute(const DtUUID& name) { myRoute.setUUID(name); };
86 
88  void setFuseType(int i) { myFuseType = i; myFuseType.setValueSpecified(true); };
89  bool fuseTypeSpecified() const { return myFuseType; };
90  DtDetonatorFuze fuseType() const { return (DtDetonatorFuze)myFuseType.value(); };
91 
92  virtual const DtReal detonationProximity() const { return myDetonationProximity; };
93  virtual void setDetonationProximity(DtReal prox) { myDetonationProximity = prox; };
94 
95  virtual bool generateKnownTargetPoint() const { return myGenerateKnownTargetPoint; };
96  virtual void setGenerateKnownTargetPoint(bool b) { myGenerateKnownTargetPoint = b; };
97 
101  virtual void setKnownTargetPointName(const DtString& s) { myKnownTargetPointName = s; myKnownTargetPointName.setValueSpecified(s.length() != 0); };
102  virtual const DtString& knownTargetPointName() const { return myKnownTargetPointName; };
103 
104 protected:
105  DtRwSimObjectReference myTarget;
117 
121 };
122 
125 
127 typedef std::map<DtString, DtFireMissionInformation> DtMappedFireMissionList;
128 
UUID is a unique ID wrapper class.
Definition: rwUUID.h:229
virtual void setDetonationProximity(DtReal prox)
Definition: fireMissionInformation.h:93
Definition: symbolString.h:20
DtRwTemplatedListPtr< DtFireMissionInformation, true > DtFireMissionList
Definition: fireMissionInformation.h:124
DtRwSimObjectReference route() const
Additional Parameters for Cruise Missiles.
Definition: fireMissionInformation.h:84
virtual DtRwTaitBryan & muzzleOrientation()
Get the initial velocity for the shell to be fired at.
Definition: fireMissionInformation.h:81
void setAmmoType(const DtString &ammo)
Definition: fireMissionInformation.h:63
DtRwInt myNumberRounds
Definition: fireMissionInformation.h:108
Definition: readerWriter.h:85
Description: Readable, Writable DtString Variable substitutions are done on this object when it is re...
Definition: rwString.h:20
DtRwString myAmmoType
Definition: fireMissionInformation.h:106
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:79
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:32
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: simObjectReference.h:74
virtual bool generateKnownTargetPoint() const
Definition: fireMissionInformation.h:95
virtual DtReal heightAboveTerrain()
Get the height above terrain for the shell to detonate.
Definition: fireMissionInformation.h:71
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:57
DtRwSimObjectReference myRoute
Additional parameters needed for cruise missiles.
Definition: fireMissionInformation.h:113
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
DtRwReal myHeightAboveTerrain
Definition: fireMissionInformation.h:109
void setNumberOfRounds(const int num)
Definition: fireMissionInformation.h:66
Description: Readable, Writable int.
Definition: rwInt.h:25
DtRwBoolean myGenerateKnownTargetPoint
Definition: fireMissionInformation.h:116
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:120
DtRwInt myFuseType
Definition: fireMissionInformation.h:115
void setRoute(const DtUUID &name)
Definition: fireMissionInformation.h:85
DtRwReal myMuzzleSpeed
Definition: fireMissionInformation.h:110
void setFuseType(int i)
Type of fuse to use, if known.
Definition: fireMissionInformation.h:88
void setTarget(const DtUUID &name)
Was: setTargetName.
Definition: fireMissionInformation.h:60
virtual const DtReal detonationProximity() const
Definition: fireMissionInformation.h:92
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:69
void setCurrentTargetLocation(const DtVector &loc)
Definition: fireMissionInformation.h:52
DtRwReal myDetonationProximity
Definition: fireMissionInformation.h:114
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
DtRwVector myCurrentTargetLocation
Definition: fireMissionInformation.h:107
A version of DtRwList that contains a homogeneous list of a templated RW type. The templated type spe...
Definition: rwTemplatedList.h:26
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:90
bool fuseTypeSpecified() const
Definition: fireMissionInformation.h:89
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:101
std::map< DtString, DtFireMissionInformation > DtMappedFireMissionList
Definition: fireMissionInformation.h:127
const DtRwInt numberOfRounds() const
Definition: fireMissionInformation.h:65
virtual void setGenerateKnownTargetPoint(bool b)
Definition: fireMissionInformation.h:96
DtRwTaitBryan myMuzzleOrientation
Definition: fireMissionInformation.h:111
const DtRwVector & currentTargetLocation() const
Definition: fireMissionInformation.h:51
virtual DtRwReal muzzleSpeed()
Get the initial velocity for the shell to be fired at.
Definition: fireMissionInformation.h:76
virtual void setMuzzleSpeed(DtReal v)
If specified in the task set the initial speed of the munition. Usefull for hand grenades.
Definition: fireMissionInformation.h:74
File: rwVector.h.
const DtRwString & ammoType() const
Definition: fireMissionInformation.h:62

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)