open-dis-cpp
EntityStateUpdatePdu.h
1 #pragma once
2 
3 #include <dis6/EntityID.h>
4 #include <dis6/Vector3Float.h>
5 #include <dis6/Vector3Double.h>
6 #include <dis6/Orientation.h>
7 #include <dis6/ArticulationParameter.h>
8 #include <vector>
9 #include <dis6/EntityInformationFamilyPdu.h>
10 #include <dis6/utils/DataStream.h>
11 #include <dis6/opendis6_export.h>
12 
13 
14 namespace DIS
15 {
16 // 5.3.3.4. Nonstatic information about a particular entity may be communicated by issuing an Entity State Update PDU. COMPLETE
17 
18 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
19 //
20 // @author DMcG, jkg
21 
22 class OPENDIS6_EXPORT EntityStateUpdatePdu : public EntityInformationFamilyPdu
23 {
24 protected:
27 
29  char _padding1;
30 
33 
36 
39 
42 
45 
46  std::vector<ArticulationParameter> _articulationParameters;
47 
48 
49  public:
51  virtual ~EntityStateUpdatePdu();
52 
53  virtual void marshal(DataStream& dataStream) const;
54  virtual void unmarshal(DataStream& dataStream);
55 
56  EntityID& getEntityID();
57  const EntityID& getEntityID() const;
58  void setEntityID(const EntityID &pX);
59 
60  char getPadding1() const;
61  void setPadding1(char pX);
62 
63  unsigned char getNumberOfArticulationParameters() const;
64 
65  Vector3Float& getEntityLinearVelocity();
66  const Vector3Float& getEntityLinearVelocity() const;
67  void setEntityLinearVelocity(const Vector3Float &pX);
68 
69  Vector3Double& getEntityLocation();
70  const Vector3Double& getEntityLocation() const;
71  void setEntityLocation(const Vector3Double &pX);
72 
73  Orientation& getEntityOrientation();
74  const Orientation& getEntityOrientation() const;
75  void setEntityOrientation(const Orientation &pX);
76 
77  int getEntityAppearance() const;
78  void setEntityAppearance(int pX);
79 
80  std::vector<ArticulationParameter>& getArticulationParameters();
81  const std::vector<ArticulationParameter>& getArticulationParameters() const;
82  void setArticulationParameters(const std::vector<ArticulationParameter>& pX);
83 
84 
85 virtual int getMarshalledSize() const;
86 
87  bool operator ==(const EntityStateUpdatePdu& rhs) const;
88 };
89 }
90 
91 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
92 // Redistribution and use in source and binary forms, with or without
93 // modification, are permitted provided that the following conditions
94 // are met:
95 //
96 // * Redistributions of source code must retain the above copyright
97 // notice, this list of conditions and the following disclaimer.
98 // * Redistributions in binary form must reproduce the above copyright
99 // notice, this list of conditions and the following disclaimer
100 // in the documentation and/or other materials provided with the
101 // distribution.
102 // * Neither the names of the Naval Postgraduate School (NPS)
103 // Modeling Virtual Environments and Simulation (MOVES) Institute
104 // (http://www.nps.edu and http://www.MovesInstitute.org)
105 // nor the names of its contributors may be used to endorse or
106 // promote products derived from this software without specific
107 // prior written permission.
108 //
109 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
110 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
111 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
112 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
113 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
114 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
115 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
116 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
117 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
118 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
119 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
120 // POSSIBILITY OF SUCH DAMAGE.
Orientation _entityOrientation
describes the orientation of the entity, in euler angles
Definition: EntityStateUpdatePdu.h:41
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
Definition: EntityInformationFamilyPdu.h:16
a class to support managing a network buffer.
Definition: DataStream.h:28
int _entityAppearance
a series of bit flags that are used to help draw the entity, such as smoking, on fire, etc.
Definition: EntityStateUpdatePdu.h:44
EntityID _entityID
This field shall identify the entity issuing the PDU.
Definition: EntityStateUpdatePdu.h:26
Definition: Vector3Float.h:15
Definition: EntityID.h:15
Definition: Vector3Double.h:15
unsigned char _numberOfArticulationParameters
How many articulation parameters are in the variable length list.
Definition: EntityStateUpdatePdu.h:32
Definition: Orientation.h:15
char _padding1
Padding.
Definition: EntityStateUpdatePdu.h:29
Vector3Double _entityLocation
describes the location of the entity in the world
Definition: EntityStateUpdatePdu.h:38
Vector3Float _entityLinearVelocity
Describes the speed of the entity in the world.
Definition: EntityStateUpdatePdu.h:35
Definition: EntityStateUpdatePdu.h:22