open-dis-cpp
FirePdu.h
1 #pragma once
2 
3 #include <dis6/EntityID.h>
4 #include <dis6/EventID.h>
5 #include <dis6/Vector3Double.h>
6 #include <dis6/BurstDescriptor.h>
7 #include <dis6/Vector3Float.h>
8 #include <dis6/WarfareFamilyPdu.h>
9 #include <dis6/utils/DataStream.h>
10 #include <dis6/opendis6_export.h>
11 
12 
13 namespace DIS
14 {
15 // Sectioin 5.3.4.1. Information about someone firing something. COMPLETE
16 
17 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
18 //
19 // @author DMcG, jkg
20 
21 class OPENDIS6_EXPORT FirePdu : public WarfareFamilyPdu
22 {
23 protected:
26 
29 
30  int _fireMissionIndex;
31 
34 
37 
40 
42  float _range;
43 
44 
45  public:
46  FirePdu();
47  virtual ~FirePdu();
48 
49  virtual void marshal(DataStream& dataStream) const;
50  virtual void unmarshal(DataStream& dataStream);
51 
52  EntityID& getMunitionID();
53  const EntityID& getMunitionID() const;
54  void setMunitionID(const EntityID &pX);
55 
56  EventID& getEventID();
57  const EventID& getEventID() const;
58  void setEventID(const EventID &pX);
59 
60  int getFireMissionIndex() const;
61  void setFireMissionIndex(int pX);
62 
63  Vector3Double& getLocationInWorldCoordinates();
64  const Vector3Double& getLocationInWorldCoordinates() const;
65  void setLocationInWorldCoordinates(const Vector3Double &pX);
66 
67  BurstDescriptor& getBurstDescriptor();
68  const BurstDescriptor& getBurstDescriptor() const;
69  void setBurstDescriptor(const BurstDescriptor &pX);
70 
71  Vector3Float& getVelocity();
72  const Vector3Float& getVelocity() const;
73  void setVelocity(const Vector3Float &pX);
74 
75  float getRange() const;
76  void setRange(float pX);
77 
78 
79 virtual int getMarshalledSize() const;
80 
81  bool operator ==(const FirePdu& rhs) const;
82 };
83 }
84 
85 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
86 // Redistribution and use in source and binary forms, with or without
87 // modification, are permitted provided that the following conditions
88 // are met:
89 //
90 // * Redistributions of source code must retain the above copyright
91 // notice, this list of conditions and the following disclaimer.
92 // * Redistributions in binary form must reproduce the above copyright
93 // notice, this list of conditions and the following disclaimer
94 // in the documentation and/or other materials provided with the
95 // distribution.
96 // * Neither the names of the Naval Postgraduate School (NPS)
97 // Modeling Virtual Environments and Simulation (MOVES) Institute
98 // (http://www.nps.edu and http://www.MovesInstitute.org)
99 // nor the names of its contributors may be used to endorse or
100 // promote products derived from this software without specific
101 // prior written permission.
102 //
103 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
104 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
105 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
106 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
107 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
108 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
109 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
110 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
111 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
112 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
113 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
114 // POSSIBILITY OF SUCH DAMAGE.
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
BurstDescriptor _burstDescriptor
Describes munitions used in the firing event.
Definition: FirePdu.h:36
a class to support managing a network buffer.
Definition: DataStream.h:28
Definition: BurstDescriptor.h:16
EventID _eventID
ID of event.
Definition: FirePdu.h:28
Definition: EventID.h:15
EntityID _munitionID
ID of the munition that is being shot.
Definition: FirePdu.h:25
Vector3Double _locationInWorldCoordinates
location of the firing event
Definition: FirePdu.h:33
Definition: FirePdu.h:21
Definition: WarfareFamilyPdu.h:18
Definition: Vector3Float.h:15
Definition: EntityID.h:15
Definition: Vector3Double.h:15
float _range
range to the target
Definition: FirePdu.h:42
Vector3Float _velocity
Velocity of the ammunition.
Definition: FirePdu.h:39