KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ConeRecord2.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: ConeRecord2
32  created: 21:08:2009
33  author: Karl Jones
34 
35  purpose: A geometry record representing a moving cone.
36  size: 704 bits / 88 octets
37 *********************************************************************/
38 
39 #pragma once
40 
41 #include "./ConeRecord1.h"
42 #include "./Vector.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 CONE_RECORD_2_SIZE = 88;
62 
63  ConeRecord2();
64 
65  ConeRecord2( KDataStream & stream ) throw( KException );
66 
67  ConeRecord2( KUINT8 Index, const WorldCoordinates & VertexLocation, const EulerAngles & Orientation,
68  const Vector & Velocity, const Vector & AngularVelocity, KFLOAT32 Height,
69  KFLOAT32 PeakAngle, KFLOAT32 DHeightOverDt, KFLOAT32 DPeakAngleOverDt );
70 
71  virtual ~ConeRecord2();
72 
73  //************************************
74  // FullName: KDIS::DATA_TYPE::ConeRecord2::SetVelocity
75  // KDIS::DATA_TYPE::ConeRecord2::GetVelocity
76  //!Description: Specifies the velocity of the cone.
77  //! Represented as a Linear Velocity Vector.
78  // Parameter: const Vector & V, void
79  //************************************
80  void SetVelocity( const Vector & V );
81  const Vector & GetVelocity() const;
82  Vector & GetVelocity();
83 
84  //************************************
85  // FullName: KDIS::DATA_TYPE::ConeRecord2::SetAngularVelocity
86  // KDIS::DATA_TYPE::ConeRecord2::GetAngularVelocity
87  //!Description: Specifies the angular velocity of the cone.
88  //! Represented as a Linear Velocity Vector.
89  // Parameter: const Vector & V, void
90  //************************************
91  void SetAngularVelocity( const Vector & V );
92  const Vector & GetAngularVelocity() const;
93  Vector & GetAngularVelocity();
94 
95  //************************************
96  // FullName: KDIS::DATA_TYPE::ConeRecord2::SetDHeightOverDt
97  // KDIS::DATA_TYPE::ConeRecord2::GetDHeightOverDt
98  //!Description: d(Height)/dt.
99  // Parameter: KFLOAT32 DDT, void
100  //************************************
101  void SetDHeightOverDt( KFLOAT32 DDT );
102  KFLOAT32 GetDHeightOverDt() const;
103 
104  //************************************
105  // FullName: KDIS::DATA_TYPE::ConeRecord2::SetDPeakAngleOverDt
106  // KDIS::DATA_TYPE::ConeRecord2::GetDPeakAngleOverDt
107  //!Description: d(Peak Angle)/dt.
108  // Parameter: KFLOAT32 DDT, void
109  //************************************
110  void SetDPeakAngleOverDt( KFLOAT32 DDT );
111  KFLOAT32 GetDPeakAngleOverDt() const;
112 
113  //************************************
114  // FullName: KDIS::DATA_TYPE::ConeRecord2::GetAsString
115  //!Description: Returns a string representation
116  //************************************
117  virtual KString GetAsString() const;
118 
119  //************************************
120  // FullName: KDIS::DATA_TYPE::ConeRecord2::Decode
121  //!Description: Convert From Network Data.
122  // Parameter: KDataStream & stream
123  //************************************
124  virtual void Decode( KDataStream & stream ) throw( KException );
125 
126  //************************************
127  // FullName: KDIS::DATA_TYPE::ConeRecord2::Encode
128  //!Description: Convert To Network Data.
129  // Parameter: KDataStream & stream
130  //************************************
131  virtual KDataStream Encode() const;
132  virtual void Encode( KDataStream & stream ) const;
133 
134  KBOOL operator == ( const ConeRecord2 & Value )const;
135  KBOOL operator != ( const ConeRecord2 & Value )const;
136 };
137 
138 } // END namespace DATA_TYPES
139 } // END namespace KDIS
KFLOAT32 m_f32ddtPeak
Definition: ConeRecord2.h:57
unsigned short int KUINT16
Definition: KDefines.h:101
float KFLOAT32
Definition: KDefines.h:113
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
Definition: ConeRecord2.h:47
Vector m_AngularVelocity
Definition: ConeRecord2.h:53
unsigned char KUINT8
Definition: KDefines.h:99
Vector m_Velocity
Definition: ConeRecord2.h:51
Definition: ConeRecord1.h:48
#define KDIS_EXPORT
Definition: KDefines.h:82
KFLOAT32 m_f32ddtHeight
Definition: ConeRecord2.h:55