00001
00055 #if !defined(_CIGI_BASE_COLL_DET_VOL_DEF_INCLUDED_)
00056 #define _CIGI_BASE_COLL_DET_VOL_DEF_INCLUDED_
00057
00058 #include "CigiBasePacket.h"
00059
00060
00061
00062
00063
00064 #define CIGI_COLL_DET_VOL_DEF_PACKET_ID_V2 25
00065 #define CIGI_COLL_DET_VOL_DEF_PACKET_SIZE_V2 20
00066
00067 #define CIGI_COLL_DET_VOL_DEF_PACKET_ID_V3 23
00068 #define CIGI_COLL_DET_VOL_DEF_PACKET_SIZE_V3 48
00069
00070
00071 class CigiCollDetVolDefV2;
00072 class CigiCollDetVolDefV3;
00073
00074
00075 class CIGI_SPEC CigiBaseCollDetVolDef : public CigiBasePacket
00076 {
00077
00078 friend class CigiCollDetVolDefV2;
00079 friend class CigiCollDetVolDefV3;
00080
00081 public:
00082
00083
00086 enum VolTypeGrp
00087 {
00088 Sphere=0,
00089 Cuboid=1
00090 };
00091
00092
00093
00094
00095
00096
00097
00100 CigiBaseCollDetVolDef();
00101
00102
00105 virtual ~CigiBaseCollDetVolDef();
00106
00107
00108
00109
00110
00121 virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0;
00122
00123
00133 virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0;
00134
00135
00147 virtual int GetCnvt(CigiVersionID &CnvtVersion,
00148 CigiCnvtInfoType::Type &CnvtInfo);
00149
00150
00151
00152
00153
00154
00155
00156
00163 int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true)
00164 {
00165 EntityID = EntityIDIn;
00166 return(CIGI_SUCCESS);
00167 }
00168
00169
00172 Cigi_uint16 GetEntityID(void) const { return(EntityID); }
00173
00174
00175
00176
00177
00184 int SetVolID(const Cigi_uint8 VolIDIn, bool bndchk=true)
00185 {
00186 VolID = VolIDIn;
00187 return(CIGI_SUCCESS);
00188 }
00189
00190
00193 Cigi_uint8 GetVolID(void) const { return(VolID); }
00194
00195
00196
00197
00198
00205 int SetVolEn(const bool VolEnIn, bool bndchk=true)
00206 {
00207 VolEn = VolEnIn;
00208 return(CIGI_SUCCESS);
00209 }
00210
00211
00214 bool GetVolEn(void) const { return(VolEn); }
00215
00216
00217
00218
00219
00227 int SetXoff(const float XoffIn, bool bndchk=true)
00228 {
00229 Xoff = XoffIn;
00230 return(CIGI_SUCCESS);
00231 }
00232
00233
00236 float GetXoff(void) const { return(Xoff); }
00237
00238
00239
00240
00241
00249 int SetYoff(const float YoffIn, bool bndchk=true)
00250 {
00251 Yoff = YoffIn;
00252 return(CIGI_SUCCESS);
00253 }
00254
00255
00258 float GetYoff(void) const { return(Yoff); }
00259
00260
00261
00262
00263
00271 int SetZoff(const float ZoffIn, bool bndchk=true)
00272 {
00273 Zoff = ZoffIn;
00274 return(CIGI_SUCCESS);
00275 }
00276
00277
00280 float GetZoff(void) const { return(Zoff); }
00281
00282
00283
00284
00285
00292 int SetHeightOrRadius(const float HeightOrRadiusIn, bool bndchk=true)
00293 {
00294 HeightOrRadius = HeightOrRadiusIn;
00295 return(CIGI_SUCCESS);
00296 }
00297
00298
00301 float GetHeightOrRadius(void) const { return(HeightOrRadius); }
00302
00303
00304
00305
00306
00313 int SetWidth(const float WidthIn, bool bndchk=true)
00314 {
00315 Width = WidthIn;
00316 return(CIGI_SUCCESS);
00317 }
00318
00319
00322 float GetWidth(void) const { return(Width); }
00323
00324
00325
00326
00327
00334 int SetDepth(const float DepthIn, bool bndchk=true)
00335 {
00336 Depth = DepthIn;
00337 return(CIGI_SUCCESS);
00338 }
00339
00340
00343 float GetDepth(void) const { return(Depth); }
00344
00345
00346
00347 protected:
00348
00349
00350
00351
00355 Cigi_uint16 EntityID;
00356
00357
00361 Cigi_uint8 VolID;
00362
00363
00367 bool VolEn;
00368
00369
00375 VolTypeGrp VolType;
00376
00377
00381 float Xoff;
00382
00383
00387 float Yoff;
00388
00389
00393 float Zoff;
00394
00395
00399 float HeightOrRadius;
00400
00401
00405 float Width;
00406
00407
00411 float Depth;
00412
00413
00417 float Roll;
00418
00419
00423 float Pitch;
00424
00425
00429 float Yaw;
00430
00431
00432 };
00433
00434 #endif // #if !defined(_CIGI_BASE_COLL_DET_VOL_DEF_INCLUDED_)