chore(include): changed include files from .h to .hpp
[KDIS.git] / include / KDIS / DataTypes / LE_DeadReckoningParameter.hpp
blobc85d4ff9b73a9076f8d28eb5420d1567c94fd34e
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: LE_DeadReckoningParameter
32 created: 2008/09/18
33 author: Karl Jones
35 purpose: Parameters for dead reckoning the position and orientation
36 of the entity. For Live Entities the acceleration and velocity
37 vectors are using KFIXED data types.
38 size: 56 bits / 7 octets
39 *********************************************************************/
41 #pragma once
43 #include "./DataTypeBase.h"
44 #include "./LE_Vector.h"
45 #include "./LE_EulerAngles.h"
47 namespace KDIS {
48 namespace DATA_TYPE {
50 class KDIS_EXPORT LE_DeadReckoningParameter : public DataTypeBase
52 protected:
54 KUINT8 m_ui8DeadRecknoningAlgorithm;
56 LE_Vector8_3 m_LinearAcceleration;
58 LE_Vector8_3 m_AngularVelocity;
60 public:
62 static const KUINT16 LE_DEAD_RECKONING_PARAMETER_SIZE = 7;
64 LE_DeadReckoningParameter();
66 LE_DeadReckoningParameter( KDataStream & stream ) ;
68 LE_DeadReckoningParameter( KDIS::DATA_TYPE::ENUMS::DeadReckoningAlgorithm DRA, const LE_Vector8_3 & LinearAcceleration,
69 const LE_Vector8_3 & AngularVelocity );
71 virtual ~LE_DeadReckoningParameter();
73 //************************************
74 // FullName: KDIS::DATA_TYPE::LE_DeadReckoningParameter::SetDeadReckoningAlgorithm
75 // KDIS::DATA_TYPE::LE_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::LE_DeadReckoningParameter::SetLinearAcceleration
84 // KDIS::DATA_TYPE::LE_DeadReckoningParameter::GetLinearAcceleration
85 // Description: Linear acceleration in decimeters per second.
86 // Parameter: const LE_Vector8_3 & LA
87 //************************************
88 void SetLinearAcceleration( const LE_Vector8_3 & LA );
89 const LE_Vector8_3 & GetLinearAcceleration() const;
90 LE_Vector8_3 & GetLinearAcceleration();
92 //************************************
93 // FullName: KDIS::DATA_TYPE::LE_DeadReckoningParameter::SetAngularVelocity
94 // KDIS::DATA_TYPE::LE_DeadReckoningParameter::GetAngularVelocity
95 // Description: Angular velocity in radians per second.
96 // Parameter: const EulerAngles & AV
97 //************************************
98 void SetAngularVelocity( const LE_Vector8_3 & AV );
99 const LE_Vector8_3 & GetAngularVelocity() const;
100 LE_Vector8_3 & GetAngularVelocity();
102 //************************************
103 // FullName: KDIS::DATA_TYPE::LE_DeadReckoningParameter::GetAsString
104 // Description: Returns a string representation
105 //************************************
106 virtual KString GetAsString() const;
108 //************************************
109 // FullName: KDIS::DATA_TYPE::LE_DeadReckoningParameter::Decode
110 // Description: Convert From Network Data.
111 // Parameter: KDataStream & stream
112 //************************************
113 virtual void Decode( KDataStream & stream ) ;
115 //************************************
116 // FullName: KDIS::DATA_TYPE::LE_DeadReckoningParameter::Encode
117 // Description: Convert To Network Data.
118 // Parameter: KDataStream & stream
119 //************************************
120 virtual KDataStream Encode() const;
121 virtual void Encode( KDataStream & stream ) const;
123 KBOOL operator == ( const LE_DeadReckoningParameter & Value ) const;
124 KBOOL operator != ( const LE_DeadReckoningParameter & Value ) const;
127 } // END namespace DATA_TYPES
128 } // END namespace KDIS