KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
RectangularVolumeRecord2.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: RectangularVolumeRecord2
32  created: 21/08/2009
33  author: Karl Jones
34 
35  purpose: A geometry record representing a moving rectangular volume.
36  size: 704 bits / 88 octets
37 *********************************************************************/
38 
39 #pragma once
40 
42 
43 namespace KDIS {
44 namespace DATA_TYPE {
45 
47 {
48 protected:
49 
51 
53 
55 
57 
58 public:
59 
60  static const KUINT16 RECTANGLE_VOLUME_RECORD_2_SIZE = 88;
61 
63 
64  RectangularVolumeRecord2( KDataStream & stream ) throw( KException );
65 
66  RectangularVolumeRecord2( KUINT8 Index, const WorldCoordinates & CornerLocation, const Vector & RectangleLength,
67  const Vector & DDT, const EulerAngles & Orientation, const Vector & Velocity,
68  const Vector & AngularVelocity );
69 
70  virtual ~RectangularVolumeRecord2();
71 
72  //************************************
73  // FullName: KDIS::DATA_TYPE::RectangularVolumeRecord2::SetDOverDt
74  // KDIS::DATA_TYPE::RectangularVolumeRecord2::GetDOverDt
75  //!Description: Specifies the location of the corner of the rectangle.
76  // Parameter: const Vector & DDT
77  //************************************
78  void SetDOverDt( const Vector & DDT );
79  const Vector & GetDOverDt() const;
80  Vector & GetDOverDt();
81 
82  //************************************
83  // FullName: KDIS::DATA_TYPE::RectangularVolumeRecord2::SetVelocity
84  // KDIS::DATA_TYPE::RectangularVolumeRecord2::GetVelocity
85  //!Description: Specifies the velocity of the rectangle.
86  //! Represented as a Linear Velocity Vector.
87  // Parameter: const Vector & V, void
88  //************************************
89  void SetVelocity( const Vector & V );
90  const Vector & GetVelocity() const;
91  Vector & GetVelocity();
92 
93  //************************************
94  // FullName: KDIS::DATA_TYPE::RectangularVolumeRecord2::SetAngularVelocity
95  // KDIS::DATA_TYPE::RectangularVolumeRecord2::GetAngularVelocity
96  //!Description: Specifies the angular velocity of the rectangle.
97  //! Represented as a Linear Velocity Vector.
98  // Parameter: const Vector & V, void
99  //************************************
100  void SetAngularVelocity( const Vector & V );
101  const Vector & GetAngularVelocity() const;
102  Vector & GetAngularVelocity();
103 
104  //************************************
105  // FullName: KDIS::DATA_TYPE::RectangularVolumeRecord2::GetAsString
106  //!Description: Returns a string representation
107  //************************************
108  virtual KString GetAsString() const;
109 
110  //************************************
111  // FullName: KDIS::DATA_TYPE::RectangularVolumeRecord2::Decode
112  //!Description: Convert From Network Data.
113  // Parameter: KDataStream & stream
114  //************************************
115  virtual void Decode( KDataStream & stream ) throw( KException );
116 
117  //************************************
118  // FullName: KDIS::DATA_TYPE::RectangularVolumeRecord2::Encode
119  //!Description: Convert To Network Data.
120  // Parameter: KDataStream & stream
121  //************************************
122  virtual KDataStream Encode() const;
123  virtual void Encode( KDataStream & stream ) const;
124 
125  KBOOL operator == ( const RectangularVolumeRecord2 & Value )const;
126  KBOOL operator != ( const RectangularVolumeRecord2 & Value )const;
127 };
128 
129 } // END namespace DATA_TYPES
130 } // END namespace KDIS
Vector m_AngularVelocity
Definition: RectangularVolumeRecord2.h:54
Definition: RectangularVolumeRecord1.h:49
unsigned short int KUINT16
Definition: KDefines.h:101
float KFLOAT32
Definition: KDefines.h:113
Definition: RectangularVolumeRecord2.h:46
Vector m_Velocity
Definition: RectangularVolumeRecord2.h:52
Vector m_DDT
Definition: RectangularVolumeRecord2.h:50
Definition: Vector.h:71
Definition: KDefines.h:182
Definition: KDataStream.h:48
Definition: WorldCoordinates.h:52
bool KBOOL
Definition: KDefines.h:119
KFLOAT32 m_f32Padding
Definition: RectangularVolumeRecord2.h:56
Definition: EulerAngles.h:46
std::string KString
Definition: KDefines.h:116
unsigned char KUINT8
Definition: KDefines.h:99
#define KDIS_EXPORT
Definition: KDefines.h:82