VR-Forces 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  //=========================================================
366  int SetAnimationSpeed(const double AnimationSpeedIn, bool bndchk=true);
367 
368  //=========================================================
372  double GetAnimationSpeed(void) const { return(myAnimationSpeed); }
373 
374  //+> ScaleEn
375 
376  //=========================================================
384  int SetScaleEn(const bool ScaleEnIn, bool bndchk=true)
385  {
386  myScaleEn = ScaleEnIn;
387  return(CIGI_SUCCESS);
388  }
389 
390  //=========================================================
393  bool GetScaleEn(void) const { return(myScaleEn); }
394 
395  //+> Scale
396 
397  //=========================================================
406  int SetScale(float XScaleIn, float YScaleIn, float ZScaleIn, bool bndchk=true);
407 
408  //=========================================================
414  void GetScale(float& XScaleOut, float& YScaleOut, float& ZScaleOut ) const;
415 
416  //+> WeightEn
417 
418  //=========================================================
426  int SetWeightEn(const bool WeightEnIn, bool bndchk=true)
427  {
428  myWeightEn = WeightEnIn;
429  return(CIGI_SUCCESS);
430  }
431 
432  //=========================================================
435  bool GetWeightEn(void) const { return(myWeightEn); }
436 
437  //+> Weight
438 
439  //=========================================================
446  int SetWeight(const float WeightIn, bool bndchk=true);
447 
448  //=========================================================
452  float GetWeight(void) const { return(myWeight); }
453 
454  //+> Animation
455 
458  int SetAnimation(const std::string &AnimationIn, bool bndchk=true);
459 
462  int GetAnimationSize(void) const { return(myAnimationSize); }
463 
464  //=========================================================
467  const std::string & GetAnimation(void) const { return(myAnimation); }
468 
469  //+> Head Appearance
470 
473  int SetHeadAppearance(const std::string &HeadAppearanceIn, bool bndchk=true);
474 
478  int GetHeadAppearanceSize(void) const { return(myHeadAppearanceSize); }
479 
480  //=========================================================
483  const std::string & GetHeadAppearance(void) const { return(myHeadAppearance); }
484 
485  //+> Item Appearance
486 
489  int SetItemAppearance(const std::string &ItemAppearanceIn, bool bndchk=true);
490 
494  int GetItemAppearanceSize(void) const { return(myItemAppearanceSize); }
495 
496  //=========================================================
499  const std::string & GetItemAppearance(void) const { return(myItemAppearance); }
500 
501  protected:
502  static int CalculatePaddedStringSize( int StringSizeIn );
503  static void BufferToString( PackPointer& CDta, std::string& StringOut );
504 
505 
506  protected:
507 
508  Cigi_uint16 myEntityID;
511  int myAnimationSize; // This is the string size padded to a multiple of 8
512  std::string myAnimation;
513  int myHeadAppearanceSize; // This is the string size padded to a multiple of 8
514  std::string myHeadAppearance;
515  int myItemAppearanceSize; // This is the string size padded to a multiple of 8
516  std::string myItemAppearance;
520  float myXScale;
521  float myYScale;
522  float myZScale;
523  float myWeight;
524 
530  bool myScaleEn;
532 
533  //=========================================================
538 
542  static const int MaxStringCharCnt = 71;
543  };
544 }
545 
const std::string & GetItemAppearance(void) const
Gets the Item Appearance string.
Definition: DtCigiBaseDiGuyCtrlExt.h:499
int SetWeightEn(const bool WeightEnIn, bool bndchk=true)
Sets the WeightEn with bound checking control.
Definition: DtCigiBaseDiGuyCtrlExt.h:426
AnimationStateGrp
The enumeration for the Animation Paused/Not Paused flag.
Definition: DtCigiBaseDiGuyCtrlExt.h:37
Cigi_uint16 myEntityID
Definition: DtCigiBaseDiGuyCtrlExt.h:508
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:467
float myWeight
Definition: DtCigiBaseDiGuyCtrlExt.h:523
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:462
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:514
int myHeadAppearanceSize
Definition: DtCigiBaseDiGuyCtrlExt.h:513
float myYScale
Definition: DtCigiBaseDiGuyCtrlExt.h:521
double myAnimationSpeed
Definition: DtCigiBaseDiGuyCtrlExt.h:517
double GetAnimationSpeed(void) const
Gets the AnimationSpeed.
Definition: DtCigiBaseDiGuyCtrlExt.h:372
Contains DLL export macros.
PostureGrp myPosture
Definition: DtCigiBaseDiGuyCtrlExt.h:509
int GetHeadAppearanceSize(void) const
Definition: DtCigiBaseDiGuyCtrlExt.h:478
HealthStateGrp
The enumeration for the Health flag.
Definition: DtCigiBaseDiGuyCtrlExt.h:66
int myItemAppearanceSize
Definition: DtCigiBaseDiGuyCtrlExt.h:515
bool myPostureEn
Definition: DtCigiBaseDiGuyCtrlExt.h:525
bool myScaleEn
Definition: DtCigiBaseDiGuyCtrlExt.h:530
float GetWeight(void) const
Gets the Weight.
Definition: DtCigiBaseDiGuyCtrlExt.h:452
AnimationStateGrp myAnimationState
Definition: DtCigiBaseDiGuyCtrlExt.h:518
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:393
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:435
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:494
const int CIGI_DI_GUY_CTRL_EXT_PACKET_ID_V4
Definition: DtCigiBaseDiGuyCtrlExt.h:22
int myAnimationSize
Definition: DtCigiBaseDiGuyCtrlExt.h:511
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:529
int SetScaleEn(const bool ScaleEnIn, bool bndchk=true)
Sets the ScaleEn with bound checking control.
Definition: DtCigiBaseDiGuyCtrlExt.h:384
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:483
std::string myAnimation
Definition: DtCigiBaseDiGuyCtrlExt.h:512
#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:528
bool myAnimationStateEn
Definition: DtCigiBaseDiGuyCtrlExt.h:527
bool myWeightEn
Definition: DtCigiBaseDiGuyCtrlExt.h:531
WeaponStateGrp myWeaponState
Definition: DtCigiBaseDiGuyCtrlExt.h:510
float myXScale
Definition: DtCigiBaseDiGuyCtrlExt.h:520
std::string myItemAppearance
Definition: DtCigiBaseDiGuyCtrlExt.h:516
float myZScale
Definition: DtCigiBaseDiGuyCtrlExt.h:522
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:519
bool myWeaponStateEn
Definition: DtCigiBaseDiGuyCtrlExt.h:526
bool GetAnimationSpeedEn(void) const
Gets the AnimationSpeedEn value.
Definition: DtCigiBaseDiGuyCtrlExt.h:354

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)