1 /*********************************************************************
2 Copyright 2013 Karl Jones
5 Redistribution and use in source and binary forms, with or without
6 modification, are permitted provided that the following conditions are met:
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.
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.
25 For Further Information Please Contact me at
27 http://p.sf.net/kdis/UserGuide
28 *********************************************************************/
30 /********************************************************************
31 class: AntennaLocation
36 purpose: Specifies location of antennas radiating portion in world
37 coordinates and entity coordinates.
38 size: 288 bits / 36 octets
39 *********************************************************************/
43 #include "./DataTypeBase.h"
44 #include "./WorldCoordinates.h"
50 class KDIS_EXPORT AntennaLocation
: public DataTypeBase
54 WorldCoordinates m_AntennaLocation
;
56 Vector m_RelativeAntennaLocation
;
60 static const KUINT16 ANTENNA_LOCATION_SIZE
= 36;
64 AntennaLocation( KDataStream
& stream
);
66 AntennaLocation( const WorldCoordinates
& Location
, const Vector
& RelativeLocation
);
68 virtual ~AntennaLocation();
70 //************************************
71 // FullName: KDIS::DataTypes::AntennaLocation::SetAntennaLocation
72 // KDIS::DataTypes::AntennaLocation::GetAntennaLocation
73 // Description: Antenna world location
74 // Parameter: const WorldCoordinates & AL
75 //************************************
76 void SetAntennaLocation( const WorldCoordinates
& AL
);
77 const WorldCoordinates
& GetAntennaLocation() const;
78 WorldCoordinates
& GetAntennaLocation();
80 //************************************
81 // FullName: KDIS::DataTypes::SetRelativeAntennaLocation
82 // KDIS::DataTypes::GetRelativeAntennaLocation
83 // Description: Antenna entity location. Represented as Entity Coordinate Vector
84 // Parameter: const Vector & RAL
85 //************************************
86 void SetRelativeAntennaLocation( const Vector
& RAL
);
87 const Vector
& GetRelativeAntennaLocation() const;
88 Vector
& GetRelativeAntennaLocation();
90 //************************************
91 // FullName: KDIS::DataTypes::AntennaLocation::GetAsString
92 // Description: Returns a string representation
93 //************************************
94 virtual KString
GetAsString() const;
96 //************************************
97 // FullName: KDIS::DataTypes::AntennaLocation::Decode
98 // Description: Convert From Network Data.
99 // Parameter: KDataStream & stream
100 //************************************
101 virtual void Decode( KDataStream
& stream
) ;
103 //************************************
104 // FullName: KDIS::DataTypes::AntennaLocation::Encode
105 // Description: Convert To Network Data.
106 // Parameter: KDataStream & stream
107 //************************************
108 virtual KDataStream
Encode() const;
109 virtual void Encode( KDataStream
& stream
) const;
111 KBOOL
operator == ( const AntennaLocation
& Value
) const;
112 KBOOL
operator != ( const AntennaLocation
& Value
) const;
115 } // END namespace DATA_TYPES
116 } // END namespace KDIS