KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
EnvironmentalsAppearance.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: EnvironmentalsAppearance
32  created: 22/09/2008 - Updated May 2012
33  author: Karl Jones
34 
35  purpose: Represents the appearance of the Enviromentals.
36  Implemented as struct so as to prevent the size from
37  changing due to RTTI etc. This struct will be part of a
38  union with all specific appearance values so it is implemented
39  slightly different.
40  No constructors to prevent C2620 error caused by union of
41  classes/structs.
42  size: 32 Bits / 4 Octet
43 *********************************************************************/
44 
45 #pragma once
46 
47 #include "./../KDefines.h"
48 #include "./Enums/KDISEnums.h"
49 
50 namespace KDIS {
51 namespace DATA_TYPE {
52 
54 {
55 protected:
56 
57  KUINT32 m_Unused1 : 16; // 0-15
58  KUINT32 m_Density : 4; // 16-19
59  KUINT32 m_Unused2 : 1; // 20 - This bit is assumed to be unused, in the standard it is unaccounted for. (SISO-EBV-REF-010-2006)
60  KUINT32 m_FrozenStatus : 1; // 21
61  KUINT32 m_Unused3 : 1; // 22
62  KUINT32 m_State : 1; // 23
63  KUINT32 m_Unused4 : 7; // 24-30
64  KUINT32 m_MaskedCloaked : 1; // 31
65 
66 public:
67 
68  //************************************
69  // FullName: KDIS::DATA_TYPE::EnvironmentalsAppearance::SetEntityDensity
70  // KDIS::DATA_TYPE::EnvironmentalsAppearance::GetEntityDensity
71  //!Description: Describes the density of the environmentals.
72  // Parameter: EntityDensity ED
73  //************************************
74  void SetEntityDensity( KDIS::DATA_TYPE::ENUMS::EntityDensity ED );
75  KDIS::DATA_TYPE::ENUMS::EntityDensity GetEntityDensity() const;
76 
77  //************************************
78  // FullName: KDIS::DATA_TYPE::EnvironmentalsAppearance::SetEntityFrozenStatus
79  // KDIS::DATA_TYPE::EnvironmentalsAppearance::IsEntityFrozen
80  //!Description: Is the entity frozen?
81  //! Note: Frozen entities should not be dead-reckoned, they should remain
82  //! frozen in place. You would likely freeze entites when your application is
83  //! in a paused state.
84  // Parameter: KBOOL EFS
85  //************************************
86  void SetEntityFrozenStatus( KBOOL EFS );
87  KBOOL IsEntityFrozen() const;
88 
89  //************************************
90  // FullName: KDIS::DATA_TYPE::EnvironmentalsAppearance::SetEntityStateActive
91  // KDIS::DATA_TYPE::EnvironmentalsAppearance::IsEntityStateActive
92  //!Description: Active(true) / De active(false)
93  // Parameter: KBOOL ES
94  //************************************
95  void SetEntityStateActive( KBOOL ES );
96  KBOOL IsEntityStateActive() const;
97 
98  //************************************
99  // FullName: KDIS::DATA_TYPE::EnvironmentalsAppearance::SetEntitySurrdenderState
100  // KDIS::DATA_TYPE::EnvironmentalsAppearance::IsEntityMaskedCloaked
101  //!Description: Is the entity masked/cloaked or not.
102  //! True = Masked/Cloaked, False = Not Masked/Cloaked.
103  // Parameter: KBOOL MC
104  //************************************
105  void SetEntityMaskedCloaked( KBOOL MC );
106  KBOOL IsEntityMaskedCloaked() const;
107 
108  //************************************
109  // FullName: KDIS::DATA_TYPE::EnvironmentalsAppearance::GetAsString
110  //!Description: Returns a string representation
111  //************************************
112  KString GetAsString() const;
113 
114  KBOOL operator == ( const EnvironmentalsAppearance & Value ) const;
115  KBOOL operator != ( const EnvironmentalsAppearance & Value ) const;
116 };
117 
118 } // END namespace DATA_TYPES
119 } // END namespace KDIS
120 
unsigned int KUINT32
Definition: KDefines.h:103
Definition: EnvironmentalsAppearance.h:53
bool KBOOL
Definition: KDefines.h:119
std::string KString
Definition: KDefines.h:116
EntityDensity
Definition: EnumEntityInfoInteraction.h:771
#define KDIS_EXPORT
Definition: KDefines.h:82