KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ConeRecord1.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: ConeRecord1
32  created: 19:08:2009
33  author: Karl Jones
34 
35  purpose: A geometry record representing an cone.
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 
59 
61 
62 public:
63 
64  static const KUINT16 CONE_RECORD_1_SIZE = 56;
65 
66  ConeRecord1();
67 
68  ConeRecord1( KDataStream & stream ) throw( KException );
69 
70  ConeRecord1( KUINT8 Index, const WorldCoordinates & VertexLocation, const EulerAngles & Orientation,
71  KFLOAT32 Height, KFLOAT32 PeakAngle );
72 
73  virtual ~ConeRecord1();
74 
75  //************************************
76  // FullName: KDIS::DATA_TYPE::ConeRecord1::SetVertexLocation
77  // KDIS::DATA_TYPE::ConeRecord1::GetVertexLocation
78  //!Description: Specifies the location of the cones vertex.
79  // Parameter: const WorldCoordinates & VL
80  //************************************
81  void SetVertexLocation( const WorldCoordinates & VL );
82  const WorldCoordinates & GetVertexLocation() const;
83  WorldCoordinates & GetVertexLocation();
84 
85  //************************************
86  // FullName: KDIS::DATA_TYPE::ConeRecord1::SetOrientation
87  // KDIS::DATA_TYPE::ConeRecord1::GetOrientation
88  //!Description: Orientation for the cone.
89  // Parameter: const EulerAngles & O
90  //************************************
91  void SetOrientation( const EulerAngles & O );
92  const EulerAngles & GetOrientation() const;
93  EulerAngles & GetOrientation();
94 
95  //************************************
96  // FullName: KDIS::DATA_TYPE::ConeRecord1::SetHeight
97  // KDIS::DATA_TYPE::ConeRecord1::GetHeight
98  //!Description: Height of the cone in meters.
99  // Parameter: KFLOAT32 H
100  //************************************
101  void SetHeight( KFLOAT32 H );
102  KFLOAT32 GetHeight() const;
103 
104  //************************************
105  // FullName: KDIS::DATA_TYPE::ConeRecord1::SetPeakAngle
106  // KDIS::DATA_TYPE::ConeRecord1::GetPeakAngle
107  //!Description: The cones peak angle. Measured in radians i presume,
108  //! it does not say in SISO-REF-010-2006.
109  // Parameter: KFLOAT32 H
110  //************************************
111  void SetPeakAngle( KFLOAT32 PA );
112  KFLOAT32 GetPeakAngle() const;
113 
114  //************************************
115  // FullName: KDIS::DATA_TYPE::ConeRecord1::GetAsString
116  //!Description: Returns a string representation
117  //************************************
118  virtual KString GetAsString() const;
119 
120  //************************************
121  // FullName: KDIS::DATA_TYPE::ConeRecord1::Decode
122  //!Description: Convert From Network Data.
123  // Parameter: KDataStream & stream
124  //************************************
125  virtual void Decode( KDataStream & stream ) throw( KException );
126 
127  //************************************
128  // FullName: KDIS::DATA_TYPE::ConeRecord1::Encode
129  //!Description: Convert To Network Data.
130  // Parameter: KDataStream & stream
131  //************************************
132  virtual KDataStream Encode() const;
133  virtual void Encode( KDataStream & stream ) const;
134 
135  KBOOL operator == ( const ConeRecord1 & Value )const;
136  KBOOL operator != ( const ConeRecord1 & Value )const;
137 };
138 
139 } // END namespace DATA_TYPES
140 } // END namespace KDIS
unsigned int KUINT32
Definition: KDefines.h:103
WorldCoordinates m_Loc
Definition: ConeRecord1.h:52
unsigned short int KUINT16
Definition: KDefines.h:101
float KFLOAT32
Definition: KDefines.h:113
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
KFLOAT32 m_f32Height
Definition: ConeRecord1.h:56
unsigned char KUINT8
Definition: KDefines.h:99
KFLOAT32 m_f32PeakAngle
Definition: ConeRecord1.h:58
Definition: ConeRecord1.h:48
#define KDIS_EXPORT
Definition: KDefines.h:82
EulerAngles m_Ori
Definition: ConeRecord1.h:54
KUINT32 m_ui32Padding
Definition: ConeRecord1.h:60
Definition: EnvironmentRecord.h:59