KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
EllipsoidRecord1.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: EllipsoidRecord1
32  created: 18:08:2009
33  author: Karl Jones
34 
35  purpose: A geometry record representing an elipsoid.
36  size: 448 bits / 56 octets
37 *********************************************************************/
38 
39 #pragma once
40 
41 #include "./EnvironmentRecord.h"
42 #include "./WorldCoordinates.h"
43 #include "./EulerAngles.h"
44 
45 namespace KDIS {
46 namespace DATA_TYPE {
47 
49 {
50 protected:
51 
53 
55 
57 
58 public:
59 
60  static const KUINT16 ELIPSOID_RECORD_1_SIZE = 56;
61 
63 
64  EllipsoidRecord1( KDataStream & stream ) throw( KException );
65 
66  EllipsoidRecord1( KUINT8 Index, const WorldCoordinates & CentroidLocation,
67  const Vector & Sigma, const EulerAngles & Orientation );
68 
69  virtual ~EllipsoidRecord1();
70 
71  //************************************
72  // FullName: KDIS::DATA_TYPE::EllipsoidRecord1::SetCentroidLocation
73  // KDIS::DATA_TYPE::EllipsoidRecord1::GetCentroidLocation
74  //!Description: Specifies the location of the center of the sphere.
75  // Parameter: const WorldCoordinates & CL
76  //************************************
77  void SetCentroidLocation( const WorldCoordinates & CL );
78  const WorldCoordinates & GetCentroidLocation() const;
79  WorldCoordinates & GetCentroidLocation();
80 
81  //************************************
82  // FullName: KDIS::DATA_TYPE::EllipsoidRecord1::SetSigma
83  // KDIS::DATA_TYPE::EllipsoidRecord1::GetSigma
84  //!Description: Sigma (X, Y, Z) for the ellipsoid.
85  // Parameter: const Vector & S
86  //************************************
87  void SetSigma( const Vector & S );
88  const Vector & GetSigma() const;
89  Vector & GetSigma();
90 
91  //************************************
92  // FullName: KDIS::DATA_TYPE::EllipsoidRecord1::SetOrientation
93  // KDIS::DATA_TYPE::EllipsoidRecord1::GetOrientation
94  //!Description: Orientation for the ellipsoid.
95  // Parameter: const EulerAngles & O
96  //************************************
97  void SetOrientation( const EulerAngles & O );
98  const EulerAngles & GetOrientation() const;
99  EulerAngles & GetOrientation();
100 
101  //************************************
102  // FullName: KDIS::DATA_TYPE::EllipsoidRecord1::GetAsString
103  //!Description: Returns a string representation
104  //************************************
105  virtual KString GetAsString() const;
106 
107  //************************************
108  // FullName: KDIS::DATA_TYPE::EllipsoidRecord1::Decode
109  //!Description: Convert From Network Data.
110  // Parameter: KDataStream & stream
111  //************************************
112  virtual void Decode( KDataStream & stream ) throw( KException );
113 
114  //************************************
115  // FullName: KDIS::DATA_TYPE::EllipsoidRecord1::Encode
116  //!Description: Convert To Network Data.
117  // Parameter: KDataStream & stream
118  //************************************
119  virtual KDataStream Encode() const;
120  virtual void Encode( KDataStream & stream ) const;
121 
122  KBOOL operator == ( const EllipsoidRecord1 & Value )const;
123  KBOOL operator != ( const EllipsoidRecord1 & Value )const;
124 };
125 
126 } // END namespace DATA_TYPES
127 } // END namespace KDIS
Definition: EllipsoidRecord1.h:48
unsigned short int KUINT16
Definition: KDefines.h:101
WorldCoordinates m_CentLocation
Definition: EllipsoidRecord1.h:52
Definition: Vector.h:71
Definition: KDefines.h:182
Definition: KDataStream.h:48
Definition: WorldCoordinates.h:52
bool KBOOL
Definition: KDefines.h:119
Definition: EulerAngles.h:46
std::string KString
Definition: KDefines.h:116
Vector m_Sigma
Definition: EllipsoidRecord1.h:54
EulerAngles m_Ori
Definition: EllipsoidRecord1.h:56
unsigned char KUINT8
Definition: KDefines.h:99
#define KDIS_EXPORT
Definition: KDefines.h:82
Definition: EnvironmentRecord.h:59