KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
EllipsoidRecord2.h
Go to the documentation of this file.
1 /*********************************************************************
2 Copyright 2013 Karl Jones
3 All rights reserved.
4 
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
7 
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.
13 
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.
24 
25 For Further Information Please Contact me at
26 Karljj1@yahoo.com
27 http://p.sf.net/kdis/UserGuide
28 *********************************************************************/
29 
30 /********************************************************************
31  class: EllipsoidRecord2
32  created: 18/08/2009
33  author: Karl Jones
34 
35  purpose: A geometry record representing a moving elipsoid.
36  size: 768 bits / 96 octets
37 *********************************************************************/
38 
39 #pragma once
40 
41 #include "./EllipsoidRecord1.h"
42 
43 namespace KDIS {
44 namespace DATA_TYPE {
45 
47 {
48 protected:
49 
51 
53 
55 
57 
58 public:
59 
60  static const KUINT16 ELIPSOID_RECORD_2_SIZE = 96;
61 
63 
64  EllipsoidRecord2( KDataStream & stream ) throw( KException );
65 
66  EllipsoidRecord2( KUINT8 Index, const WorldCoordinates & CentroidLocation, const Vector & Sigma, const EulerAngles & Orientation,
67  const Vector & DDT, const Vector & Velocity, const Vector & AngularVelocity );
68 
69  virtual ~EllipsoidRecord2();
70 
71  //************************************
72  // FullName: KDIS::DATA_TYPE::EllipsoidRecord2::SetDOverDt
73  // KDIS::DATA_TYPE::EllipsoidRecord2::GetDOverDt
74  //!Description: d(Sigma)/dt.
75  // Parameter: const Vector & S
76  //************************************
77  void SetDOverDt( const Vector & S );
78  const Vector & GetDOverDt() const;
79  Vector & GetDOverDt();
80 
81  //************************************
82  // FullName: KDIS::DATA_TYPE::EllipsoidRecord2::SetVelocity
83  // KDIS::DATA_TYPE::EllipsoidRecord2::GetVelocity
84  //!Description: Specifies the velocity of the elipsoid.
85  //! Represented as a Linear Velocity Vector.
86  // Parameter: const Vector & V, void
87  //************************************
88  void SetVelocity( const Vector & V );
89  const Vector & GetVelocity() const;
90  Vector & GetVelocity();
91 
92  //************************************
93  // FullName: KDIS::DATA_TYPE::EllipsoidRecord2::SetAngularVelocity
94  // KDIS::DATA_TYPE::EllipsoidRecord2::GetAngularVelocity
95  //!Description: Specifies the angular velocity of the elipsoid.
96  //! Represented as a Linear Velocity Vector.
97  // Parameter: const Vector & V, void
98  //************************************
99  void SetAngularVelocity( const Vector & V );
100  const Vector & GetAngularVelocity() const;
101  Vector & GetAngularVelocity();
102 
103  //************************************
104  // FullName: KDIS::DATA_TYPE::EllipsoidRecord2::GetAsString
105  //!Description: Returns a string representation
106  //************************************
107  virtual KString GetAsString() const;
108 
109  //************************************
110  // FullName: KDIS::DATA_TYPE::EllipsoidRecord2::Decode
111  //!Description: Convert From Network Data.
112  // Parameter: KDataStream & stream
113  //************************************
114  virtual void Decode( KDataStream & stream ) throw( KException );
115 
116  //************************************
117  // FullName: KDIS::DATA_TYPE::EllipsoidRecord2::Encode
118  //!Description: Convert To Network Data.
119  // Parameter: KDataStream & stream
120  //************************************
121  virtual KDataStream Encode() const;
122  virtual void Encode( KDataStream & stream ) const;
123 
124  KBOOL operator == ( const EllipsoidRecord2 & Value )const;
125  KBOOL operator != ( const EllipsoidRecord2 & Value )const;
126 };
127 
128 } // END namespace DATA_TYPES
129 } // END namespace KDIS
unsigned int KUINT32
Definition: KDefines.h:103
Definition: EllipsoidRecord1.h:48
unsigned short int KUINT16
Definition: KDefines.h:101
Definition: EllipsoidRecord2.h:46
KUINT32 m_ui32Padding
Definition: EllipsoidRecord2.h:56
Vector m_AngularVelocity
Definition: EllipsoidRecord2.h:54
Definition: Vector.h:71
Definition: KDefines.h:182
Definition: KDataStream.h:48
Definition: WorldCoordinates.h:52
bool KBOOL
Definition: KDefines.h:119
Vector m_DDT
Definition: EllipsoidRecord2.h:50
Definition: EulerAngles.h:46
Vector m_Velocity
Definition: EllipsoidRecord2.h:52
std::string KString
Definition: KDefines.h:116
unsigned char KUINT8
Definition: KDefines.h:99
#define KDIS_EXPORT
Definition: KDefines.h:82