00001 00055 #if !defined(_CIGI_BASE_COLL_DET_SEG_RESP_INCLUDED_) 00056 #define _CIGI_BASE_COLL_DET_SEG_RESP_INCLUDED_ 00057 00058 #include "CigiBasePacket.h" 00059 00060 // ==================================================================== 00061 // preprocessor definitions 00062 // ==================================================================== 00063 00064 #define CIGI_COLL_DET_SEG_RESP_PACKET_ID_V1 104 00065 #define CIGI_COLL_DET_SEG_RESP_PACKET_SIZE_V1 24 00066 00067 #define CIGI_COLL_DET_SEG_RESP_PACKET_ID_V2 104 00068 #define CIGI_COLL_DET_SEG_RESP_PACKET_SIZE_V2 24 00069 00070 #define CIGI_COLL_DET_SEG_RESP_PACKET_ID_V3 113 00071 #define CIGI_COLL_DET_SEG_RESP_PACKET_SIZE_V3 16 00072 00073 00074 class CigiCollDetSegRespV1; 00075 class CigiCollDetSegRespV2; 00076 class CigiCollDetSegRespV3; 00077 00078 00079 class CIGI_SPEC CigiBaseCollDetSegResp : public CigiBasePacket 00080 { 00081 00082 friend class CigiCollDetSegRespV1; 00083 friend class CigiCollDetSegRespV2; 00084 friend class CigiCollDetSegRespV3; 00085 00086 public: 00087 00088 //========================================================= 00091 enum CollTypeGrp 00092 { 00093 NonEntity=0, 00094 Entity=1 00095 }; 00096 00097 00098 00099 00100 //==> Management 00101 00102 //========================================================= 00105 CigiBaseCollDetSegResp(); 00106 00107 //========================================================= 00110 virtual ~CigiBaseCollDetSegResp(); 00111 00112 00113 //==> Buffer Packing/Unpacking 00114 00115 //========================================================= 00126 virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0; 00127 00128 //========================================================= 00138 virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0; 00139 00140 //========================================================= 00152 virtual int GetCnvt(CigiVersionID &CnvtVersion, 00153 CigiCnvtInfoType::Type &CnvtInfo); 00154 00155 00156 00157 //==> Accessing Member Variable Values functions 00158 00159 //+> EntityID 00160 00161 //========================================================= 00168 int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true) 00169 { 00170 EntityID = EntityIDIn; 00171 return(CIGI_SUCCESS); 00172 } 00173 00174 //========================================================= 00177 Cigi_uint16 GetEntityID(void) const { return(EntityID); } 00178 00179 00180 //+> Material 00181 00182 //========================================================= 00189 int SetMaterial(const Cigi_uint32 MaterialIn, bool bndchk=true) 00190 { 00191 Material = MaterialIn; 00192 return(CIGI_SUCCESS); 00193 } 00194 00195 //========================================================= 00198 Cigi_uint32 GetMaterial(void) const { return(Material); } 00199 00200 00201 //+> IsValidV1or2 00202 00203 //========================================================= 00210 int SetIsValidV1or2(const bool IsValidV1or2In, bool bndchk=true) 00211 { 00212 IsValidV1or2 = IsValidV1or2In; 00213 return(CIGI_SUCCESS); 00214 } 00215 00216 //========================================================= 00219 bool GetIsValidV1or2(void) const { return(IsValidV1or2); } 00220 00221 00222 00223 protected: 00224 00225 //==> Member variables 00226 00227 //========================================================= 00231 Cigi_uint16 EntityID; 00232 00233 //========================================================= 00237 Cigi_uint8 SegID; 00238 00239 //========================================================= 00246 CollTypeGrp CollType; 00247 00248 //========================================================= 00252 Cigi_uint16 CollEntityID; 00253 00254 //========================================================= 00258 Cigi_uint32 Material; 00259 00260 //========================================================= 00265 float IntersectDist; 00266 00267 //========================================================= 00272 float X; 00273 00274 //========================================================= 00279 float Y; 00280 00281 //========================================================= 00286 float Z; 00287 00288 //========================================================= 00293 bool IsValidV1or2; 00294 00295 00296 }; 00297 00298 #endif // #if !defined(_CIGI_BASE_COLL_DET_SEG_RESP_INCLUDED_)