KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
GaussianPuffRecord.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: GaussianPuffRecord
32  created: 27:08:2009
33  author: Karl Jones
34 
35  purpose: A geometry record representing a gaussian puff.
36  size: 960 bits / 120 octets
37 *********************************************************************/
38 
39 #pragma once
40 
41 #include "./EnvironmentRecord.h"
42 #include "./WorldCoordinates.h"
43 #include "./EulerAngles.h"
44 #include "./Vector.h"
45 
46 namespace KDIS {
47 namespace DATA_TYPE {
48 
50 {
51 protected:
52 
54 
56 
58 
60 
62 
64 
66 
68 
69 public:
70 
71  static const KUINT16 GAUSSIAN_PUFF_RECORD_SIZE = 120;
72 
74 
75  GaussianPuffRecord( KDataStream & stream ) throw( KException );
76 
77  GaussianPuffRecord( KUINT8 Index, const WorldCoordinates & PuffLocation, const WorldCoordinates & OriginationLocation,
78  const Vector & Sigma, const Vector & DDT, const EulerAngles & Orientation, const Vector & Velocity,
79  const Vector & AngularVelocity, KFLOAT32 CentroidHeight );
80 
81  virtual ~GaussianPuffRecord();
82 
83  //************************************
84  // FullName: KDIS::DATA_TYPE::GaussianPuffRecord::SetPuffLocation
85  // KDIS::DATA_TYPE::GaussianPuffRecord::GetPuffLocation
86  //!Description: Specifies the location of the puff.
87  // Parameter: const WorldCoordinates & L, void
88  //************************************
89  void SetPuffLocation( const WorldCoordinates & L );
90  const WorldCoordinates & GetPuffLocation() const;
91  WorldCoordinates & GetPuffLocation();
92 
93  //************************************
94  // FullName: KDIS::DATA_TYPE::GaussianPuffRecord::SetOriginationLocation
95  // KDIS::DATA_TYPE::GaussianPuffRecord::GetOriginationLocation
96  //!Description: Specifies the origination location of the puff.
97  // Parameter: const WorldCoordinates & L, void
98  //************************************
99  void SetOriginationLocation( const WorldCoordinates & L );
100  const WorldCoordinates & GetOriginationLocation() const;
101  WorldCoordinates & GetOriginationLocation();
102 
103  //************************************
104  // FullName: KDIS::DATA_TYPE::GaussianPuffRecord::SetSigma
105  // KDIS::DATA_TYPE::GaussianPuffRecord::GetSigma
106  //!Description: X, Y, Z sigma for the gaussian puff.
107  // Parameter: const Vector & S, void
108  //************************************
109  void SetSigma( const Vector & S );
110  const Vector & GetSigma() const;
111  Vector & GetSigma();
112 
113  //************************************
114  // FullName: KDIS::DATA_TYPE::GaussianPuffRecord::SetDOverDtSigma
115  // KDIS::DATA_TYPE::GaussianPuffRecord::GetDOverDtSigma
116  //!Description: d(Sigma)/dt
117  // Parameter: const Vector & S, void
118  //************************************
119  void SetDOverDtSigma( const Vector & S );
120  const Vector & GetDOverDtSigma() const;
121  Vector & GetDOverDtSigma();
122 
123  //************************************
124  // FullName: KDIS::DATA_TYPE::GaussianPuffRecord::SetOrientation
125  // KDIS::DATA_TYPE::GaussianPuffRecord::GetOrientation
126  //!Description: Orientation of the puff.
127  // Parameter: const EulerAngles & O
128  //************************************
129  void SetOrientation( const EulerAngles & O );
130  const EulerAngles & GetOrientation() const;
131  EulerAngles & GetOrientation();
132 
133  //************************************
134  // FullName: KDIS::DATA_TYPE::GaussianPuffRecord::SetVelocity
135  // KDIS::DATA_TYPE::GaussianPuffRecord::GetVelocity
136  //!Description: Specifies the velocity of the puff.
137  //! Represented as a Linear Velocity Vector.
138  // Parameter: const Vector & V, void
139  //************************************
140  void SetVelocity( const Vector & V );
141  const Vector & GetVelocity() const;
142  Vector & GetVelocity();
143 
144  //************************************
145  // FullName: KDIS::DATA_TYPE::GaussianPuffRecord::SetAngularVelocity
146  // KDIS::DATA_TYPE::GaussianPuffRecord::GetAngularVelocity
147  //!Description: Specifies the angular velocity of the puff.
148  //! Represented as a Linear Velocity Vector.
149  // Parameter: const Vector & V, void
150  //************************************
151  void SetAngularVelocity( const Vector & V );
152  const Vector & GetAngularVelocity() const;
153  Vector & GetAngularVelocity();
154 
155  //************************************
156  // FullName: KDIS::DATA_TYPE::GaussianPuffRecord::SetCentroidHeight
157  // KDIS::DATA_TYPE::GaussianPuffRecord::GetCentroidHeight
158  //!Description: Specifies the centroid height of the puff in meters.
159  // Parameter: const KFLOAT32 H, void
160  //************************************
161  void SetCentroidHeight( KFLOAT32 H );
162  KFLOAT32 GetCentroidHeight() const;
163 
164  //************************************
165  // FullName: KDIS::DATA_TYPE::GaussianPuffRecord::GetAsString
166  //!Description: Returns a string representation
167  //************************************
168  virtual KString GetAsString() const;
169 
170  //************************************
171  // FullName: KDIS::DATA_TYPE::GaussianPuffRecord::Decode
172  //!Description: Convert From Network Data.
173  // Parameter: KDataStream & stream
174  //************************************
175  virtual void Decode( KDataStream & stream ) throw( KException );
176 
177  //************************************
178  // FullName: KDIS::DATA_TYPE::GaussianPuffRecord::Encode
179  //!Description: Convert To Network Data.
180  // Parameter: KDataStream & stream
181  //************************************
182  virtual KDataStream Encode() const;
183  virtual void Encode( KDataStream & stream ) const;
184 
185  KBOOL operator == ( const GaussianPuffRecord & Value )const;
186  KBOOL operator != ( const GaussianPuffRecord & Value )const;
187 };
188 
189 } // END namespace DATA_TYPES
190 } // END namespace KDIS
Vector m_DDTSigma
Definition: GaussianPuffRecord.h:59
Vector m_Velocity
Definition: GaussianPuffRecord.h:63
unsigned short int KUINT16
Definition: KDefines.h:101
float KFLOAT32
Definition: KDefines.h:113
WorldCoordinates m_PuffLocation
Definition: GaussianPuffRecord.h:53
Definition: GaussianPuffRecord.h:49
EulerAngles m_Ori
Definition: GaussianPuffRecord.h:61
Definition: Vector.h:71
Definition: KDefines.h:182
Definition: KDataStream.h:48
Definition: WorldCoordinates.h:52
bool KBOOL
Definition: KDefines.h:119
Vector m_AngularVelocity
Definition: GaussianPuffRecord.h:65
Definition: EulerAngles.h:46
std::string KString
Definition: KDefines.h:116
WorldCoordinates m_OrigLocation
Definition: GaussianPuffRecord.h:55
Vector m_Sigma
Definition: GaussianPuffRecord.h:57
KFLOAT32 m_f32CentHeight
Definition: GaussianPuffRecord.h:67
unsigned char KUINT8
Definition: KDefines.h:99
#define KDIS_EXPORT
Definition: KDefines.h:82
Definition: EnvironmentRecord.h:59