open-dis-cpp
ArticulatedParts.h
1 #pragma once
2 
3 #include <dis7/utils/DataStream.h>
4 #include <dis7/opendis7_export.h>
5 
6 
7 namespace DIS
8 {
9 // articulated parts for movable parts and a combination of moveable/attached parts of an entity. Section 6.2.94.2
10 
11 // Copyright (c) 2007-2009, MOVES Institute, Naval Postgraduate School. All rights reserved.
12 //
13 // @author DMcG, jkg
14 
15 class OPENDIS7_EXPORT ArticulatedParts
16 {
17 protected:
19  unsigned char _recordType;
20 
22  unsigned char _changeIndicator;
23 
25  unsigned short _partAttachedTo;
26 
28  unsigned int _parameterType;
29 
33 
35  unsigned int _padding;
36 
37 
38  public:
40  virtual ~ArticulatedParts();
41 
42  virtual void marshal(DataStream& dataStream) const;
43  virtual void unmarshal(DataStream& dataStream);
44 
45  unsigned char getRecordType() const;
46  void setRecordType(unsigned char pX);
47 
48  unsigned char getChangeIndicator() const;
49  void setChangeIndicator(unsigned char pX);
50 
51  unsigned short getPartAttachedTo() const;
52  void setPartAttachedTo(unsigned short pX);
53 
54  unsigned int getParameterType() const;
55  void setParameterType(unsigned int pX);
56 
57  float getParameterValue() const;
58  void setParameterValue(float pX);
59 
60 
61 virtual int getMarshalledSize() const;
62 
63  bool operator ==(const ArticulatedParts& rhs) const;
64 };
65 }
66 
67 // Copyright (c) 1995-2009 held by the author(s). All rights reserved.
68 // Redistribution and use in source and binary forms, with or without
69 // modification, are permitted provided that the following conditions
70 // are met:
71 //
72 // * Redistributions of source code must retain the above copyright
73 // notice, this list of conditions and the following disclaimer.
74 // * Redistributions in binary form must reproduce the above copyright
75 // notice, this list of conditions and the following disclaimer
76 // in the documentation and/or other materials provided with the
77 // distribution.
78 // * Neither the names of the Naval Postgraduate School (NPS)
79 // Modeling Virtual Environments and Simulation (MOVES) Institute
80 // (http://www.nps.edu and http://www.MovesInstitute.org)
81 // nor the names of its contributors may be used to endorse or
82 // promote products derived from this software without specific
83 // prior written permission.
84 //
85 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
86 // AS IS AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
87 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
88 // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
89 // COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
90 // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
91 // BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
92 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
93 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
94 // LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
95 // ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
96 // POSSIBILITY OF SUCH DAMAGE.
Symbolic names as defined in 5.1.4.
Definition: AcknowledgePdu.h:8
a class to support managing a network buffer.
Definition: DataStream.h:28
Definition: ArticulatedParts.h:15
unsigned short _partAttachedTo
the identification of the articulated part to which this articulation parameter is attached...
Definition: ArticulatedParts.h:25
float _parameterValue
This field shall specify the parameter value and shall be specified by a 32-bit floating point number...
Definition: ArticulatedParts.h:32
unsigned char _recordType
the identification of the Variable Parameter record.
Definition: ArticulatedParts.h:19
unsigned char _changeIndicator
indicate the change of any parameter for any articulated part.
Definition: ArticulatedParts.h:22
unsigned int _padding
32 bits of unused padding
Definition: ArticulatedParts.h:35
unsigned int _parameterType
the type of parameter represented, 32 bit enumeration
Definition: ArticulatedParts.h:28