KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
RelativeWorldCoordinates.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: RelativeWorldCoordinates
32  created: 02/07/2010
33  author: Karl Jones
34 
35  purpose: Location of the origin of the LE�s coordinate system.
36  size: 64 bits / 8 octets
37 *********************************************************************/
38 
39 #pragma once
40 
41 #include "./DataTypeBase.h"
42 #include "./KFIXED.h"
43 
44 namespace KDIS {
45 namespace DATA_TYPE {
46 
48 {
49 protected:
50 
52 
54 
56 
58 
59 public:
60 
61  static const KUINT16 RELATVE_WORLD_COORDINATES_SIZE = 8;
62 
64 
66 
67  RelativeWorldCoordinates( KDataStream & stream ) throw( KException );
68 
69  virtual ~RelativeWorldCoordinates();
70 
71  //************************************
72  // FullName: KDIS::DATA_TYPE::RelativeWorldCoordinates::SetReferencePoint
73  // KDIS::DATA_TYPE::RelativeWorldCoordinates::GetReferencePoint
74  //!Description: Identifies the number of the reference point against which
75  //! e Delta-X, Delta-Y, and Delta-Z distances are calculated.
76  // Parameter: KUINT16 RP
77  //************************************
78  void SetReferencePoint( KUINT16 RP );
79  KUINT16 GetReferencePoint() const;
80 
81  //************************************
82  // FullName: KDIS::DATA_TYPE::RelativeWorldCoordinates::SetDelta
83  // KDIS::DATA_TYPE::RelativeWorldCoordinates::GetDelta
84  //!Description: The difference between LE�s X, Y and Z direction coordinate and the
85  //! X, Y and Z direction coordinate of the reference point.
86  // Parameter: KFIXED16_3
87  //************************************
88  void SetDeltaX( KFIXED16_3 X );
89  KFIXED16_3 GetDeltaX() const;
90  void SetDeltaY( KFIXED16_3 Y );
91  KFIXED16_3 GetDeltaY() const;
92  void SetDeltaZ( KFIXED16_3 X );
93  KFIXED16_3 GetDeltaZ() const;
94 
95  //************************************
96  // FullName: KDIS::DATA_TYPE::RelativeWorldCoordinates::GetAsString
97  //!Description: Returns a string representation
98  //************************************
99  virtual KString GetAsString() const;
100 
101  //************************************
102  // FullName: KDIS::DATA_TYPE::RelativeWorldCoordinates::Decode
103  //!Description: Convert From Network Data.
104  // Parameter: KDataStream & stream
105  //************************************
106  virtual void Decode( KDataStream & stream ) throw( KException );
107 
108  //************************************
109  // FullName: KDIS::DATA_TYPE::RelativeWorldCoordinates::Encode
110  //!Description: Convert To Network Data.
111  // Parameter: KDataStream & stream
112  //************************************
113  virtual KDataStream Encode() const;
114  virtual void Encode( KDataStream & stream ) const;
115 
116  KBOOL operator == ( const RelativeWorldCoordinates & Value ) const;
117  KBOOL operator != ( const RelativeWorldCoordinates & Value ) const;
118 };
119 
120 } // END namespace DATA_TYPES
121 } // END namespace KDIS
122 
KUINT16 m_ui16RefPnt
Definition: RelativeWorldCoordinates.h:51
KFIXED16_3 m_DelX
Definition: RelativeWorldCoordinates.h:53
unsigned short int KUINT16
Definition: KDefines.h:101
KFIXED16_3 m_DelZ
Definition: RelativeWorldCoordinates.h:57
Definition: KDefines.h:182
Definition: RelativeWorldCoordinates.h:47
Definition: KDataStream.h:48
Definition: DataTypeBase.h:49
bool KBOOL
Definition: KDefines.h:119
std::string KString
Definition: KDefines.h:116
#define KDIS_EXPORT
Definition: KDefines.h:82
KFIXED16_3 m_DelY
Definition: RelativeWorldCoordinates.h:55