KDIS  2-8-x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
GuidedMunitionsAppearance.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: GuidedMunitionsAppearance
32  created: 22/09/2008 - Updated April 2012
33  author: Karl Jones
34 
35  purpose: Represents the appearance of a Guided Munitions.
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 : 3; // 0-2
58  KUINT32 m_Damage : 2; // 3-4
59  KUINT32 m_Smoke : 2; // 5-6
60  KUINT32 m_TrailingEffect : 2; // 7-8
61  KUINT32 m_Unused2 : 6; // 9-14
62  KUINT32 m_FlamingEffectField : 1; // 15
63  KUINT32 m_LaunchFlash : 1; // 16
64  KUINT32 m_Unused3 : 4; // 17-20
65  KUINT32 m_FrozenStatus : 1; // 21
66  KUINT32 m_PowerPlantStatus : 1; // 22
67  KUINT32 m_State : 1; // 23
68  KUINT32 m_Unused4 : 7; // 24-30
69  KUINT32 m_MaskedCloaked : 1; // 31
70 
71 public:
72 
73  //************************************
74  // FullName: KDIS::DATA_TYPE::GuidedMunitionsAppearance::SetEntityDamage
75  // KDIS::DATA_TYPE::GuidedMunitionsAppearance::GetEntityDamage
76  //!Description: Entity Damage State
77  // Parameter: EntityDamage ED
78  //************************************
79  void SetEntityDamage( KDIS::DATA_TYPE::ENUMS::EntityDamage ED );
80  KDIS::DATA_TYPE::ENUMS::EntityDamage GetEntityDamage() const;
81 
82  //************************************
83  // FullName: KDIS::DATA_TYPE::GuidedMunitionsAppearance::SetEntitySmoke,
84  // KDIS::DATA_TYPE::GuidedMunitionsAppearance::GetEntitySmoke
85  //!Description: Entity Smoke State
86  // Parameter: EntitySmoke ES
87  //************************************
88  void SetEntitySmoke( KDIS::DATA_TYPE::ENUMS::EntitySmoke ES );
89  KDIS::DATA_TYPE::ENUMS::EntitySmoke GetEntitySmoke() const;
90 
91  //************************************
92  // FullName: KDIS::DATA_TYPE::GuidedMunitionsAppearance::SetEntityTrailingEffect
93  // KDIS::DATA_TYPE::GuidedMunitionsAppearance::GetEntityTrailingEffect
94  //!Description: Describes the size of the dust cloud/trailing effect.
95  // Parameter: EntityTrailingEffect ETE
96  //************************************
97  void SetEntityTrailingEffect( KDIS::DATA_TYPE::ENUMS::EntityTrailingEffect ETE );
98  KDIS::DATA_TYPE::ENUMS::EntityTrailingEffect GetEntityTrailingEffect() const;
99 
100  //************************************
101  // FullName: KDIS::DATA_TYPE::GuidedMunitionsAppearance::SetEntityFlamingEffect
102  // KDIS::DATA_TYPE::GuidedMunitionsAppearance::IsEntityFlaming
103  //!Description: Are flames rising from the entity?
104  // Parameter: KBOOL EFE
105  //************************************
106  void SetEntityFlamingEffect( KBOOL EFE );
107  KBOOL IsEntityFlaming() const;
108 
109  //************************************
110  // FullName: KDIS::DATA_TYPE::GuidedMunitionsAppearance::SetLaunchFlashPresent
111  // KDIS::DATA_TYPE::GuidedMunitionsAppearance::IsLaunchFlashPresent
112  //!Description: Presence of a launch flash? True - Flash Present, False - No Flash.
113  // Parameter: KBOOL LF
114  //************************************
115  void SetLaunchFlashPresent( KBOOL LF );
116  KBOOL IsLaunchFlashPresent() const;
117 
118  //************************************
119  // FullName: KDIS::DATA_TYPE::GuidedMunitionsAppearance::SetEntityFrozenStatus
120  // KDIS::DATA_TYPE::GuidedMunitionsAppearance::IsEntityFrozen
121  //!Description: Is the entity frozen?
122  //! Note: Frozen entities should not be dead-reckoned, they should remain
123  //! frozen in place. You would likely freeze entites when your application is
124  //! in a paused state.
125  // Parameter: KBOOL EFS
126  //************************************
127  void SetEntityFrozenStatus( KBOOL EFS );
128  KBOOL IsEntityFrozen() const;
129 
130  //************************************
131  // FullName: KDIS::DATA_TYPE::GuidedMunitionsAppearance::SetEntityPowerPlantOn
132  // KDIS::DATA_TYPE::GuidedMunitionsAppearance::IsEntityPowerPlantOn
133  //!Description: Power Plant On/Off. True = On, False = Off.
134  // Parameter: KBOOL EPPS
135  //************************************
136  void SetEntityPowerPlantOn( KBOOL EPPS );
137  KBOOL IsEntityPowerPlantOn() const;
138 
139  //************************************
140  // FullName: KDIS::DATA_TYPE::GuidedMunitionsAppearance::SetEntityStateActive
141  // KDIS::DATA_TYPE::GuidedMunitionsAppearance::IsEntityStateActive
142  //!Description: True = Active, False = Deactivated.
143  // Parameter: KBOOL ES
144  //************************************
145  void SetEntityStateActive( KBOOL ES );
146  KBOOL IsEntityStateActive() const;
147 
148  //************************************
149  // FullName: KDIS::DATA_TYPE::GuidedMunitionsAppearance::SetEntityStateActive
150  // KDIS::DATA_TYPE::GuidedMunitionsAppearance::IsEntityStateActive
151  //!Description: Is the entity masked or cloaked? True - Masked/Cloaked, False - No Masked/Cloaked
152  // Parameter: KBOOL MC
153  //************************************
154  void SetMaskedCloaked( KBOOL MC );
155  KBOOL IsMaskedCloaked() const;
156 
157  //************************************
158  // FullName: KDIS::DATA_TYPE::GuidedMunitionsAppearance::GetAsString
159  //!Description: Returns a string representation
160  //************************************
161  KString GetAsString() const;
162 
163  KBOOL operator == ( const GuidedMunitionsAppearance & Value ) const;
164  KBOOL operator != ( const GuidedMunitionsAppearance & Value ) const;
165 };
166 
167 } // END namespace DATA_TYPES
168 } // END namespace KDIS
169 
unsigned int KUINT32
Definition: KDefines.h:103
EntityTrailingEffect
Definition: EnumEntityInfoInteraction.h:667
EntityDamage
Definition: EnumEntityInfoInteraction.h:641
EntitySmoke
Definition: EnumEntityInfoInteraction.h:654
bool KBOOL
Definition: KDefines.h:119
std::string KString
Definition: KDefines.h:116
#define KDIS_EXPORT
Definition: KDefines.h:82
Definition: GuidedMunitionsAppearance.h:53