chore(include): changed include files from .h to .hpp
[KDIS.git] / include / KDIS / DataTypes / DeadReckoningParameter.hpp
blob09c20a11d0e3d92d04acf1161a6dfd87b9cf249c
1 /*********************************************************************
2 Copyright 2013 Karl Jones
3 All rights reserved.
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
8 1. Redistributions of source code must retain the above copyright notice, this
9 list of conditions and the following disclaimer.
10 2. Redistributions in binary form must reproduce the above copyright notice,
11 this list of conditions and the following disclaimer in the documentation
12 and/or other materials provided with the distribution.
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
15 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
16 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
18 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
20 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
21 ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
23 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 For Further Information Please Contact me at
26 Karljj1@yahoo.com
27 http://p.sf.net/kdis/UserGuide
28 *********************************************************************/
30 /********************************************************************
31 class: DeadReckoningParameter
32 created: 2008/09/18
33 author: Karl Jones
35 purpose: Parameters for dead reckoning the position and orientation
36 of the entity.
37 size: 320 bits / 40 octets
38 *********************************************************************/
40 #pragma once
42 #include "./DataTypeBase.h"
43 #include "./Vector.h"
45 namespace KDIS {
46 namespace DATA_TYPE {
48 class KDIS_EXPORT DeadReckoningParameter : public DataTypeBase
50 protected:
52 KUINT8 m_ui8DeadRecknoningAlgorithm;
54 KOCTET m_OtherParams[15]; // Undefined
56 Vector m_LinearAcceleration;
58 Vector m_AngularVelocity;
60 public:
62 static const KUINT16 DEAD_RECKONING_PARAMETER_SIZE = 40;
64 DeadReckoningParameter();
66 DeadReckoningParameter( KDataStream & stream ) ;
68 DeadReckoningParameter( KDIS::DATA_TYPE::ENUMS::DeadReckoningAlgorithm DRA, const Vector & LinearAcceleration,
69 const Vector & AngularVelocity );
71 virtual ~DeadReckoningParameter();
73 //************************************
74 // FullName: KDIS::DATA_TYPE::DeadReckoningParameter::SetDeadReckoningAlgorithm
75 // KDIS::DATA_TYPE::DeadReckoningParameter::GetDeadReckoningAlgorithm
76 // Description: Dead Reckoning Algorithm
77 // Parameter: DeadReckoningAlgorithm DRA
78 //************************************
79 void SetDeadReckoningAlgorithm( KDIS::DATA_TYPE::ENUMS::DeadReckoningAlgorithm DRA );
80 KDIS::DATA_TYPE::ENUMS::DeadReckoningAlgorithm GetDeadReckoningAlgorithm() const;
82 //************************************
83 // FullName: KDIS::DATA_TYPE::DeadReckoningParameter::SetLinearAcceleration
84 // KDIS::DATA_TYPE::DeadReckoningParameter::GetLinearAcceleration
85 // Description: Linear Acceleration in m/s.
86 // Parameter: const Vector & LA
87 //************************************
88 void SetLinearAcceleration( const Vector & LA );
89 const Vector & GetLinearAcceleration() const;
90 Vector & GetLinearAcceleration();
92 //************************************
93 // FullName: KDIS::DATA_TYPE::DeadReckoningParameter::SetAngularVelocity
94 // KDIS::DATA_TYPE::DeadReckoningParameter::GetAngularVelocity
95 // Description: Angular Velocity
96 // Parameter: const EulerAngles & AV
97 //************************************
98 void SetAngularVelocity( const Vector & AV );
99 const Vector & GetAngularVelocity() const;
100 Vector & GetAngularVelocity();
102 //************************************
103 // FullName: KDIS::DATA_TYPE::DeadReckoningParameter::SetQuatAxis
104 // KDIS::DATA_TYPE::DeadReckoningParameter::GetQuatAxis
105 // Description: Updated DIS - Geometric Interpretation of Orientation Dead Reckoning / Quaternion axis
106 // Parameter: const EulerAngles & AV
107 //************************************
108 void SetQuatAxis( const Vector & QA );
109 const Vector GetQuatAxis() const;
110 Vector GetQuatAxis();
112 //************************************
113 // FullName: KDIS::DATA_TYPE::DeadReckoningParameter::GetAsString
114 // Description: Returns a string representation
115 //************************************
116 virtual KString GetAsString() const;
118 //************************************
119 // FullName: KDIS::DATA_TYPE::DeadReckoningParameter::Decode
120 // Description: Convert From Network Data.
121 // Parameter: KDataStream & stream
122 //************************************
123 virtual void Decode( KDataStream & stream ) ;
125 //************************************
126 // FullName: KDIS::DATA_TYPE::DeadReckoningParameter::Encode
127 // Description: Convert To Network Data.
128 // Parameter: KDataStream & stream
129 //************************************
130 virtual KDataStream Encode() const;
131 virtual void Encode( KDataStream & stream ) const;
133 KBOOL operator == ( const DeadReckoningParameter & Value ) const;
134 KBOOL operator != ( const DeadReckoningParameter & Value ) const;
137 } // END namespace DATA_TYPES
138 } // END namespace KDIS