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/rwUUID.h>
22 
23 #include <map>
24 
28 
30 class DtSimTask;
31 
34 {
35 public:
37 
39  DtReaderWriterRegistry* const parentRegistry = 0);
40 
42  DtReaderWriterRegistry* const parentRegistry = 0);
43 
45  DtFireMissionInformation(const DtString & writeName,const DtFireMissionInformation& orig,
46  DtReaderWriterRegistry* const parentRegistry = 0);
47 
48  virtual ~DtFireMissionInformation();
49 
51 
52  const DtRwVector& currentTargetLocation() const {return myCurrentTargetLocation; };
53  void setCurrentTargetLocation(const DtVector& loc) { myCurrentTargetLocation=loc; };
54 
58  DtRwSimObjectReference target() const { return myTarget; };
59 
61  void setTarget(const DtUUID& name) { myTarget.setUUID(name); };
62 
63  const DtRwString& ammoType() const { return myAmmoType; };
64  void setAmmoType(const DtString& ammo) { myAmmoType = ammo; };
65 
66  const DtRwInt numberOfRounds() const { return myNumberRounds; };
67  void setNumberOfRounds(const int num) { myNumberRounds = num; };
68 
70  virtual void setHeightAboveTerrain(DtReal height) { myHeightAboveTerrain = height; };
72  virtual DtReal heightAboveTerrain() { return myHeightAboveTerrain; };
73 
75  virtual void setMuzzleSpeed(DtReal v) { myMuzzleSpeed = v; myMuzzleSpeed.setValueSpecified(true);};
77  virtual DtRwReal muzzleSpeed() { return myMuzzleSpeed; };
78 
80  virtual void setMuzzleOrientation(const DtRwTaitBryan & o) { myMuzzleOrientation = o; myMuzzleOrientation.setValueSpecified(true);};
82  virtual DtRwTaitBryan & muzzleOrientation() { return myMuzzleOrientation; };
83 
85  DtRwSimObjectReference route() const { return myRoute; };
86  void setRoute(const DtUUID& name) { myRoute.setUUID(name); };
87 
89  void setFuseType(int i) { myFuseType = i; myFuseType.setValueSpecified(true); };
90  bool fuseTypeSpecified() const { return myFuseType; };
91  DtDetonatorFuze fuseType() const { return (DtDetonatorFuze)myFuseType.value(); };
92 
93  virtual const DtReal detonationProximity() const { return myDetonationProximity; };
94  virtual void setDetonationProximity(DtReal prox) { myDetonationProximity = prox; };
95 
96  virtual bool generateKnownTargetPoint() const { return myGenerateKnownTargetPoint; };
97  virtual void setGenerateKnownTargetPoint(bool b) { myGenerateKnownTargetPoint = b; };
98 
102  virtual void setKnownTargetPointName(const DtString& s) { myKnownTargetPointName = s; myKnownTargetPointName.setValueSpecified(s.length() != 0); };
103  virtual const DtString& knownTargetPointName() const { return myKnownTargetPointName; };
104 
105 protected:
106  DtRwSimObjectReference myTarget;
118 
122 };
123 
126 
128 typedef std::map<DtString, DtFireMissionInformation> DtMappedFireMissionList;
129 
UUID is a unique ID wrapper class.
Definition: uuid.h:59
virtual void setDetonationProximity(DtReal prox)
Definition: fireMissionInformation.h:94
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:125
DtRwSimObjectReference route() const
Additional Parameters for Cruise Missiles.
Definition: fireMissionInformation.h:85
virtual DtRwTaitBryan & muzzleOrientation()
Get the initial velocity for the shell to be fired at.
Definition: fireMissionInformation.h:82
void setAmmoType(const DtString &ammo)
Definition: fireMissionInformation.h:64
DtRwInt myNumberRounds
Definition: fireMissionInformation.h:109
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:107
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:80
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:33
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:96
virtual DtReal heightAboveTerrain()
Get the height above terrain for the shell to detonate.
Definition: fireMissionInformation.h:72
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:58
DtRwSimObjectReference myRoute
Additional parameters needed for cruise missiles.
Definition: fireMissionInformation.h:114
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
DtRwReal myHeightAboveTerrain
Definition: fireMissionInformation.h:110
void setNumberOfRounds(const int num)
Definition: fireMissionInformation.h:67
Description: Readable, Writable int.
Definition: rwInt.h:25
DtRwBoolean myGenerateKnownTargetPoint
Definition: fireMissionInformation.h:117
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:121
DtRwInt myFuseType
Definition: fireMissionInformation.h:116
void setRoute(const DtUUID &name)
Definition: fireMissionInformation.h:86
DtRwReal myMuzzleSpeed
Definition: fireMissionInformation.h:111
void setFuseType(int i)
Type of fuse to use, if known.
Definition: fireMissionInformation.h:89
void setTarget(const DtUUID &name)
Was: setTargetName.
Definition: fireMissionInformation.h:61
virtual const DtReal detonationProximity() const
Definition: fireMissionInformation.h:93
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:70
void setCurrentTargetLocation(const DtVector &loc)
Definition: fireMissionInformation.h:53
DtRwReal myDetonationProximity
Definition: fireMissionInformation.h:115
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
DtRwVector myCurrentTargetLocation
Definition: fireMissionInformation.h:108
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:91
bool fuseTypeSpecified() const
Definition: fireMissionInformation.h:90
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:102
std::map< DtString, DtFireMissionInformation > DtMappedFireMissionList
Definition: fireMissionInformation.h:128
const DtRwInt numberOfRounds() const
Definition: fireMissionInformation.h:66
virtual void setGenerateKnownTargetPoint(bool b)
Definition: fireMissionInformation.h:97
DtRwTaitBryan myMuzzleOrientation
Definition: fireMissionInformation.h:112
const DtRwVector & currentTargetLocation() const
Definition: fireMissionInformation.h:52
virtual DtRwReal muzzleSpeed()
Get the initial velocity for the shell to be fired at.
Definition: fireMissionInformation.h:77
virtual void setMuzzleSpeed(DtReal v)
If specified in the task set the initial speed of the munition. Usefull for hand grenades.
Definition: fireMissionInformation.h:75
File: rwVector.h.
const DtRwString & ammoType() const
Definition: fireMissionInformation.h:63

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)