VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DtCigiBaseDiGuyCtrlExt.h
Go to the documentation of this file.
1 
5 
6 #pragma once
7 
9 
10 #include <CigiBaseVariableSizePckt.h>
11 
12 #include <string>
13 
14 namespace makCigiExt
15 {
16 
18 
19  // This is the size of the FIXED portion of the packet
21 
23 
24  // This is the size of the FIXED portion of the packet
26 
27  //=========================================================
32  {
33  public:
34  //=========================================================
38  {
39  Unpaused=0,
40  Paused=1
41  };
42 
43  //=========================================================
47  {
48  Stowed=0,
49  Deployed=1
50  };
51 
52  //=========================================================
56  {
57  Standing=0,
58  Sitting=1,
59  Crouched=2,
60  Prone=3
61  };
62 
63  //=========================================================
67  {
68  Alive=0,
69  Dead=1
70  };
71 
72  //==> Management
73 
74  //=========================================================
78 
79  //=========================================================
82  virtual ~DtCigiBaseDiGuyCtrlExt(void);
83 
84  //=========================================================
88 
89  //=========================================================
92  DtCigiBaseDiGuyCtrlExt& operator=(const DtCigiBaseDiGuyCtrlExt& BaseIn);
93 
94  //==> Buffer Packing/Unpacking
95 
96  //=========================================================
107  virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const = 0;
108 
109  //=========================================================
119  virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) = 0;
120 
121  //=========================================================
129  { return(PacketSize + refPacket.GetVariableDataSize()); }
130 
131  //==> Accessing Member Variable Values functions
132 
133  //+> EntityID
134 
135  //=========================================================
145  int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true)
146  {
147  myEntityID = EntityIDIn;
148  return(CIGI_SUCCESS);
149  }
150 
151  //=========================================================
157  Cigi_uint16 GetEntityID(void) const { return(myEntityID); }
158 
159  //+> PostureEn
160 
161  //=========================================================
169  int SetPostureEn(const bool PostureEnIn, bool bndchk=true)
170  {
171  myPostureEn = PostureEnIn;
172  return(CIGI_SUCCESS);
173  }
174 
175  //=========================================================
178  bool GetPostureEn(void) const { return(myPostureEn); }
179 
180  //+> Posture
181 
182  //=========================================================
194  int SetPosture(const PostureGrp PostureIn, bool bndchk=true);
195 
196  //=========================================================
204  PostureGrp GetPosture(void) const { return(myPosture); }
205 
206  //+> WeaponStateEn
207 
208  //=========================================================
216  int SetWeaponStateEn(const bool WeaponStateEnIn, bool bndchk=true)
217  {
218  myWeaponStateEn = WeaponStateEnIn;
219  return(CIGI_SUCCESS);
220  }
221 
222  //=========================================================
225  bool GetWeaponStateEn(void) const { return(myWeaponStateEn); }
226 
227  //+> WeaponState
228 
229  //=========================================================
239  int SetWeaponState(const WeaponStateGrp WeaponStateIn, bool bndchk=true);
240 
241  //=========================================================
247  WeaponStateGrp GetWeaponState(void) const { return(myWeaponState); }
248 
249  //+> AnimationStateEn
250 
251  //=========================================================
259  int SetAnimationStateEn(const bool AnimationStateEnIn, bool bndchk=true)
260  {
261  myAnimationStateEn = AnimationStateEnIn;
262  return(CIGI_SUCCESS);
263  }
264 
265  //=========================================================
268  bool GetAnimationStateEn(void) const { return(myAnimationStateEn); }
269 
270  //+> AnimationState
271 
272  //=========================================================
282  int SetAnimationState(const AnimationStateGrp AnimationStateIn, bool bndchk=true);
283 
284  //=========================================================
290  AnimationStateGrp GetAnimationState(void) const { return(myAnimationState); }
291 
292  //+> HealthStateEn
293 
294  //=========================================================
302  int SetHealthStateEn(const bool HealthStateEnIn, bool bndchk=true)
303  {
304  myHealthStateEn = HealthStateEnIn;
305  return(CIGI_SUCCESS);
306  }
307 
308  //=========================================================
311  bool GetHealthStateEn(void) const { return(myHealthStateEn); }
312 
313  //+> HealthState
314 
315  //=========================================================
325  int SetHealthState(const HealthStateGrp HealthStateIn, bool bndchk=true);
326 
327  //=========================================================
333  HealthStateGrp GetHealthState(void) const { return(myHealthState); }
334 
335  //+> AnimationSpeedEn
336 
337  //=========================================================
345  int SetAnimationSpeedEn(const bool AnimationSpeedEnIn, bool bndchk=true)
346  {
347  myAnimationSpeedEn = AnimationSpeedEnIn;
348  return(CIGI_SUCCESS);
349  }
350 
351  //=========================================================
354  bool GetAnimationSpeedEn(void) const { return(myAnimationSpeedEn); }
355 
356  //+> Animation Speed
357 
358  //=========================================================
365  int SetAnimationSpeed(const double AnimationSpeedIn, bool bndchk=true);
366 
367  //=========================================================
371  double GetAnimationSpeed(void) const { return(myAnimationSpeed); }
372 
373  //+> ScaleEn
374 
375  //=========================================================
383  int SetScaleEn(const bool ScaleEnIn, bool bndchk=true)
384  {
385  myScaleEn = ScaleEnIn;
386  return(CIGI_SUCCESS);
387  }
388 
389  //=========================================================
392  bool GetScaleEn(void) const { return(myScaleEn); }
393 
394  //+> Scale
395 
396  //=========================================================
404  int SetScale(float XScaleIn, float YScaleIn, float ZScaleIn, bool bndchk=true);
405 
406  //=========================================================
412  void GetScale(float& XScaleOut, float& YScaleOut, float& ZScaleOut ) const;
413 
414  //+> WeightEn
415 
416  //=========================================================
424  int SetWeightEn(const bool WeightEnIn, bool bndchk=true)
425  {
426  myWeightEn = WeightEnIn;
427  return(CIGI_SUCCESS);
428  }
429 
430  //=========================================================
433  bool GetWeightEn(void) const { return(myWeightEn); }
434 
435  //+> Weight
436 
437  //=========================================================
443  int SetWeight(const float WeightIn, bool bndchk=true);
444 
445  //=========================================================
449  float GetWeight(void) const { return(myWeight); }
450 
451  //+> Animation
452 
455  int SetAnimation(const std::string &AnimationIn, bool bndchk=true);
456 
459  int GetAnimationSize(void) const { return(myAnimationSize); }
460 
461  //=========================================================
464  const std::string & GetAnimation(void) const { return(myAnimation); }
465 
466  //+> Head Appearance
467 
470  int SetHeadAppearance(const std::string &HeadAppearanceIn, bool bndchk=true);
471 
475  int GetHeadAppearanceSize(void) const { return(myHeadAppearanceSize); }
476 
477  //=========================================================
480  const std::string & GetHeadAppearance(void) const { return(myHeadAppearance); }
481 
482  //+> Item Appearance
483 
486  int SetItemAppearance(const std::string &ItemAppearanceIn, bool bndchk=true);
487 
491  int GetItemAppearanceSize(void) const { return(myItemAppearanceSize); }
492 
493  //=========================================================
496  const std::string & GetItemAppearance(void) const { return(myItemAppearance); }
497 
498  protected:
499  static int CalculatePaddedStringSize( int StringSizeIn );
500  static void BufferToString( PackPointer& CDta, std::string& StringOut );
501 
502 
503  protected:
504 
505  Cigi_uint16 myEntityID;
508  int myAnimationSize; // This is the string size padded to a multiple of 8
509  std::string myAnimation;
510  int myHeadAppearanceSize; // This is the string size padded to a multiple of 8
511  std::string myHeadAppearance;
512  int myItemAppearanceSize; // This is the string size padded to a multiple of 8
513  std::string myItemAppearance;
517  float myXScale;
518  float myYScale;
519  float myZScale;
520  float myWeight;
521 
527  bool myScaleEn;
529 
530  //=========================================================
535 
539  static const int MaxStringCharCnt = 71;
540  };
541 }
542 
const std::string & GetItemAppearance(void) const
Gets the Item Appearance string.
Definition: DtCigiBaseDiGuyCtrlExt.h:496
int SetWeightEn(const bool WeightEnIn, bool bndchk=true)
Sets the WeightEn with bound checking control.
Definition: DtCigiBaseDiGuyCtrlExt.h:424
AnimationStateGrp
The enumeration for the Animation Paused/Not Paused flag.
Definition: DtCigiBaseDiGuyCtrlExt.h:37
Cigi_uint16 myEntityID
Definition: DtCigiBaseDiGuyCtrlExt.h:505
WeaponStateGrp GetWeaponState(void) const
Gets the WeaponState value.
Definition: DtCigiBaseDiGuyCtrlExt.h:247
const std::string & GetAnimation(void) const
Gets the Animation (Action) string.
Definition: DtCigiBaseDiGuyCtrlExt.h:464
float myWeight
Definition: DtCigiBaseDiGuyCtrlExt.h:520
int SetAnimationStateEn(const bool AnimationStateEnIn, bool bndchk=true)
Sets the AnimationStateEn with bound checking control.
Definition: DtCigiBaseDiGuyCtrlExt.h:259
const int CIGI_DI_GUY_CTRL_EXT_PACKET_SIZE
Definition: DtCigiBaseDiGuyCtrlExt.h:20
PostureGrp GetPosture(void) const
Gets the Posture value.
Definition: DtCigiBaseDiGuyCtrlExt.h:204
WeaponStateGrp
The enumeration for the Weapon State flag.
Definition: DtCigiBaseDiGuyCtrlExt.h:46
The base class for all DiGuy Control (extended) packets.
Definition: DtCigiBaseDiGuyCtrlExt.h:30
int GetAnimationSize(void) const
Definition: DtCigiBaseDiGuyCtrlExt.h:459
Cigi_uint16 GetEntityID(void) const
Gets the Entity ID value.
Definition: DtCigiBaseDiGuyCtrlExt.h:157
PostureGrp
The enumeration for the Posture flags.
Definition: DtCigiBaseDiGuyCtrlExt.h:55
std::string myHeadAppearance
Definition: DtCigiBaseDiGuyCtrlExt.h:511
int myHeadAppearanceSize
Definition: DtCigiBaseDiGuyCtrlExt.h:510
float myYScale
Definition: DtCigiBaseDiGuyCtrlExt.h:518
double myAnimationSpeed
Definition: DtCigiBaseDiGuyCtrlExt.h:514
double GetAnimationSpeed(void) const
Gets the AnimationSpeed.
Definition: DtCigiBaseDiGuyCtrlExt.h:371
Contains DLL export macros.
PostureGrp myPosture
Definition: DtCigiBaseDiGuyCtrlExt.h:506
int GetHeadAppearanceSize(void) const
Definition: DtCigiBaseDiGuyCtrlExt.h:475
HealthStateGrp
The enumeration for the Health flag.
Definition: DtCigiBaseDiGuyCtrlExt.h:66
int myItemAppearanceSize
Definition: DtCigiBaseDiGuyCtrlExt.h:512
bool myPostureEn
Definition: DtCigiBaseDiGuyCtrlExt.h:522
bool myScaleEn
Definition: DtCigiBaseDiGuyCtrlExt.h:527
float GetWeight(void) const
Gets the Weight.
Definition: DtCigiBaseDiGuyCtrlExt.h:449
AnimationStateGrp myAnimationState
Definition: DtCigiBaseDiGuyCtrlExt.h:515
virtual int GetTruePacketSize(CigiBaseVariableSizePckt &refPacket)
A virtual function to determine the size that the packet will take up when packed.
Definition: DtCigiBaseDiGuyCtrlExt.h:128
bool GetScaleEn(void) const
Gets the ScaleEn value.
Definition: DtCigiBaseDiGuyCtrlExt.h:392
const int CIGI_DI_GUY_CTRL_EXT_PACKET_SIZE_V4
Definition: DtCigiBaseDiGuyCtrlExt.h:25
bool GetAnimationStateEn(void) const
Gets the AnimationStateEn value.
Definition: DtCigiBaseDiGuyCtrlExt.h:268
bool GetWeightEn(void) const
Gets the WeightEn value.
Definition: DtCigiBaseDiGuyCtrlExt.h:433
HealthStateGrp GetHealthState(void) const
Gets the HealthState value.
Definition: DtCigiBaseDiGuyCtrlExt.h:333
int SetPostureEn(const bool PostureEnIn, bool bndchk=true)
Sets the PostureEn with bound checking control.
Definition: DtCigiBaseDiGuyCtrlExt.h:169
int GetItemAppearanceSize(void) const
Definition: DtCigiBaseDiGuyCtrlExt.h:491
const int CIGI_DI_GUY_CTRL_EXT_PACKET_ID_V4
Definition: DtCigiBaseDiGuyCtrlExt.h:22
int myAnimationSize
Definition: DtCigiBaseDiGuyCtrlExt.h:508
bool GetWeaponStateEn(void) const
Gets the WeaponStateEn value.
Definition: DtCigiBaseDiGuyCtrlExt.h:225
int SetHealthStateEn(const bool HealthStateEnIn, bool bndchk=true)
Sets the HealthStateEn with bound checking control.
Definition: DtCigiBaseDiGuyCtrlExt.h:302
int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true)
Sets the Entity ID with bound checking control.
Definition: DtCigiBaseDiGuyCtrlExt.h:145
const int CIGI_DI_GUY_CTRL_EXT_PACKET_ID
Definition: DtCigiBaseDiGuyCtrlExt.h:17
int SetWeaponStateEn(const bool WeaponStateEnIn, bool bndchk=true)
Sets the WeaponStateEn with bound checking control.
Definition: DtCigiBaseDiGuyCtrlExt.h:216
bool myHealthStateEn
Definition: DtCigiBaseDiGuyCtrlExt.h:526
int SetScaleEn(const bool ScaleEnIn, bool bndchk=true)
Sets the ScaleEn with bound checking control.
Definition: DtCigiBaseDiGuyCtrlExt.h:383
AnimationStateGrp GetAnimationState(void) const
Gets the AnimationState value.
Definition: DtCigiBaseDiGuyCtrlExt.h:290
const std::string & GetHeadAppearance(void) const
Gets the Head Appearance string.
Definition: DtCigiBaseDiGuyCtrlExt.h:480
std::string myAnimation
Definition: DtCigiBaseDiGuyCtrlExt.h:509
#define DT_DLL_MAKCIGIEXTENSIONS
Definition: makCigiExtensions.h:17
int SetAnimationSpeedEn(const bool AnimationSpeedEnIn, bool bndchk=true)
Sets the AnimationSpeedEn with bound checking control.
Definition: DtCigiBaseDiGuyCtrlExt.h:345
bool myAnimationSpeedEn
Definition: DtCigiBaseDiGuyCtrlExt.h:525
bool myAnimationStateEn
Definition: DtCigiBaseDiGuyCtrlExt.h:524
bool myWeightEn
Definition: DtCigiBaseDiGuyCtrlExt.h:528
WeaponStateGrp myWeaponState
Definition: DtCigiBaseDiGuyCtrlExt.h:507
float myXScale
Definition: DtCigiBaseDiGuyCtrlExt.h:517
std::string myItemAppearance
Definition: DtCigiBaseDiGuyCtrlExt.h:513
float myZScale
Definition: DtCigiBaseDiGuyCtrlExt.h:519
bool GetPostureEn(void) const
Gets the PostureEn value.
Definition: DtCigiBaseDiGuyCtrlExt.h:178
bool GetHealthStateEn(void) const
Gets the HealthStateEn value.
Definition: DtCigiBaseDiGuyCtrlExt.h:311
HealthStateGrp myHealthState
Definition: DtCigiBaseDiGuyCtrlExt.h:516
bool myWeaponStateEn
Definition: DtCigiBaseDiGuyCtrlExt.h:523
bool GetAnimationSpeedEn(void) const
Gets the AnimationSpeedEn value.
Definition: DtCigiBaseDiGuyCtrlExt.h:354

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)