KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
PointRecord2.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: PointRecord2
32  created: 17/08/2009
33  author: Karl Jones
34 
35  purpose: A geometry record representing a moving point.
36  size: 384 bits / 48 octets
37 *********************************************************************/
38 
39 #pragma once
40 
41 #include "./PointRecord1.h"
42 #include "./Vector.h"
43 
44 namespace KDIS {
45 namespace DATA_TYPE {
46 
48 {
49 protected:
50 
52 
54 
55 public:
56 
57  static const KUINT16 POINT_RECORD_2_SIZE = 48;
58 
59  PointRecord2();
60 
61  PointRecord2( KDataStream & stream ) throw( KException );
62 
63  PointRecord2( KUINT8 Index, const WorldCoordinates & Location, const Vector & Velocity );
64 
65  virtual ~PointRecord2();
66 
67  //************************************
68  // FullName: KDIS::DATA_TYPE::PointRecord2::SetVelocity
69  // KDIS::DATA_TYPE::PointRecord2::GetVelocity
70  //!Description: Specifies the velocity of the point.
71  //! Represented as a Linear Velocity Vector.
72  // Parameter: const Vector & V, void
73  //************************************
74  void SetVelocity( const Vector & V );
75  const Vector & GetVelocity() const;
76  Vector & GetVelocity();
77 
78  //************************************
79  // FullName: KDIS::DATA_TYPE::PointRecord2::GetAsString
80  //!Description: Returns a string representation
81  //************************************
82  virtual KString GetAsString() const;
83 
84  //************************************
85  // FullName: KDIS::DATA_TYPE::PointRecord2::Decode
86  //!Description: Convert From Network Data.
87  // Parameter: KDataStream & stream
88  //************************************
89  virtual void Decode( KDataStream & stream ) throw( KException );
90 
91  //************************************
92  // FullName: KDIS::DATA_TYPE::PointRecord2::Encode
93  //!Description: Convert To Network Data.
94  // Parameter: KDataStream & stream
95  //************************************
96  virtual KDataStream Encode() const;
97  virtual void Encode( KDataStream & stream ) const;
98 
99  KBOOL operator == ( const PointRecord2 & Value )const;
100  KBOOL operator != ( const PointRecord2 & Value )const;
101 };
102 
103 } // END namespace DATA_TYPES
104 } // END namespace KDIS
unsigned int KUINT32
Definition: KDefines.h:103
unsigned short int KUINT16
Definition: KDefines.h:101
Vector m_Vel
Definition: PointRecord2.h:51
Definition: Vector.h:71
Definition: KDefines.h:182
Definition: KDataStream.h:48
Definition: WorldCoordinates.h:52
bool KBOOL
Definition: KDefines.h:119
std::string KString
Definition: KDefines.h:116
unsigned char KUINT8
Definition: KDefines.h:99
Definition: PointRecord2.h:47
Definition: PointRecord1.h:47
#define KDIS_EXPORT
Definition: KDefines.h:82
KUINT32 m_ui32Padding
Definition: PointRecord2.h:53