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