open-dis-cpp
DetonationPdu.h
1 #pragma once
2 
3 #include <dis6/EntityID.h>
4 #include <dis6/EventID.h>
5 #include <dis6/Vector3Float.h>
6 #include <dis6/Vector3Double.h>
7 #include <dis6/BurstDescriptor.h>
8 #include <dis6/Vector3Float.h>
9 #include <dis6/ArticulationParameter.h>
10 #include <vector>
11 #include <dis6/WarfareFamilyPdu.h>
12 #include <dis6/utils/DataStream.h>
13 #include <dis6/opendis6_export.h>
14 
15 
16 namespace DIS
17 {
18 // Section 5.3.4.2. Information about stuff exploding. COMPLETE
19 
20 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
21 //
22 // @author DMcG, jkg
23 
24 class OPENDIS6_EXPORT DetonationPdu : public WarfareFamilyPdu
25 {
26 protected:
29 
32 
35 
38 
41 
44 
46  unsigned char _detonationResult;
47 
50 
52  short _pad;
53 
54  std::vector<ArticulationParameter> _articulationParameters;
55 
56 
57  public:
58  DetonationPdu();
59  virtual ~DetonationPdu();
60 
61  virtual void marshal(DataStream& dataStream) const;
62  virtual void unmarshal(DataStream& dataStream);
63 
64  EntityID& getMunitionID();
65  const EntityID& getMunitionID() const;
66  void setMunitionID(const EntityID &pX);
67 
68  EventID& getEventID();
69  const EventID& getEventID() const;
70  void setEventID(const EventID &pX);
71 
72  Vector3Float& getVelocity();
73  const Vector3Float& getVelocity() const;
74  void setVelocity(const Vector3Float &pX);
75 
76  Vector3Double& getLocationInWorldCoordinates();
77  const Vector3Double& getLocationInWorldCoordinates() const;
78  void setLocationInWorldCoordinates(const Vector3Double &pX);
79 
80  BurstDescriptor& getBurstDescriptor();
81  const BurstDescriptor& getBurstDescriptor() const;
82  void setBurstDescriptor(const BurstDescriptor &pX);
83 
84  Vector3Float& getLocationInEntityCoordinates();
85  const Vector3Float& getLocationInEntityCoordinates() const;
86  void setLocationInEntityCoordinates(const Vector3Float &pX);
87 
88  unsigned char getDetonationResult() const;
89  void setDetonationResult(unsigned char pX);
90 
91  unsigned char getNumberOfArticulationParameters() const;
92 
93  short getPad() const;
94  void setPad(short pX);
95 
96  std::vector<ArticulationParameter>& getArticulationParameters();
97  const std::vector<ArticulationParameter>& getArticulationParameters() const;
98  void setArticulationParameters(const std::vector<ArticulationParameter>& pX);
99 
100 
101 virtual int getMarshalledSize() const;
102 
103  bool operator ==(const DetonationPdu& rhs) const;
104 };
105 }
106 
107 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
108 // Redistribution and use in source and binary forms, with or without
109 // modification, are permitted provided that the following conditions
110 // are met:
111 //
112 // * Redistributions of source code must retain the above copyright
113 // notice, this list of conditions and the following disclaimer.
114 // * Redistributions in binary form must reproduce the above copyright
115 // notice, this list of conditions and the following disclaimer
116 // in the documentation and/or other materials provided with the
117 // distribution.
118 // * Neither the names of the Naval Postgraduate School (NPS)
119 // Modeling Virtual Environments and Simulation (MOVES) Institute
120 // (http://www.nps.edu and http://www.MovesInstitute.org)
121 // nor the names of its contributors may be used to endorse or
122 // promote products derived from this software without specific
123 // prior written permission.
124 //
125 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
126 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
127 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
128 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
129 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
130 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
131 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
132 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
133 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
134 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
135 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
136 // POSSIBILITY OF SUCH DAMAGE.
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
unsigned char _detonationResult
result of the explosion
Definition: DetonationPdu.h:46
a class to support managing a network buffer.
Definition: DataStream.h:28
EventID _eventID
ID firing event.
Definition: DetonationPdu.h:31
Vector3Float _velocity
ID firing event.
Definition: DetonationPdu.h:34
Definition: BurstDescriptor.h:16
Vector3Double _locationInWorldCoordinates
where the detonation is, in world coordinates
Definition: DetonationPdu.h:37
Definition: EventID.h:15
EntityID _munitionID
ID of muntion that was fired.
Definition: DetonationPdu.h:28
BurstDescriptor _burstDescriptor
Describes munition used.
Definition: DetonationPdu.h:40
Definition: WarfareFamilyPdu.h:18
Definition: Vector3Float.h:15
Definition: EntityID.h:15
unsigned char _numberOfArticulationParameters
How many articulation parameters we have.
Definition: DetonationPdu.h:49
Definition: Vector3Double.h:15
Vector3Float _locationInEntityCoordinates
location of the detonation or impact in the target entity&#39;s coordinate system.
Definition: DetonationPdu.h:43
short _pad
padding
Definition: DetonationPdu.h:52
Definition: DetonationPdu.h:24