00001
00055 #if !defined(_CIGI_BASE_VIEW_CTRL_INCLUDED_)
00056 #define _CIGI_BASE_VIEW_CTRL_INCLUDED_
00057
00058 #include "CigiBasePacket.h"
00059
00060
00061
00062
00063
00064 #define CIGI_VIEW_CTRL_PACKET_ID_V1 8
00065 #define CIGI_VIEW_CTRL_PACKET_SIZE_V1 32
00066
00067 #define CIGI_VIEW_CTRL_PACKET_ID_V2 8
00068 #define CIGI_VIEW_CTRL_PACKET_SIZE_V2 32
00069
00070 #define CIGI_VIEW_CTRL_PACKET_ID_V3 16
00071 #define CIGI_VIEW_CTRL_PACKET_SIZE_V3 32
00072
00073
00074 class CigiViewCtrlV1;
00075 class CigiViewCtrlV2;
00076 class CigiViewCtrlV3;
00077
00078
00079 class CIGI_SPEC CigiBaseViewCtrl : public CigiBasePacket
00080 {
00081
00082 friend class CigiViewCtrlV1;
00083 friend class CigiViewCtrlV2;
00084 friend class CigiViewCtrlV3;
00085
00086 public:
00087
00088
00089
00090
00093 CigiBaseViewCtrl();
00094
00095
00098 virtual ~CigiBaseViewCtrl();
00099
00100
00101
00102
00103
00114 virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0;
00115
00116
00126 virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0;
00127
00128
00140 virtual int GetCnvt(CigiVersionID &CnvtVersion,
00141 CigiCnvtInfoType::Type &CnvtInfo);
00142
00143
00144
00145
00146
00147
00148
00149
00157 int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true)
00158 {
00159 EntityID = EntityIDIn;
00160 return(CIGI_SUCCESS);
00161 }
00162
00163
00166 Cigi_uint16 GetEntityID(void) const { return(EntityID); }
00167
00168
00169
00170
00171
00179 int SetXOff(const float XOffIn, bool bndchk=true)
00180 {
00181 XOff = XOffIn;
00182 return(CIGI_SUCCESS);
00183 }
00184
00185
00188 float GetXOff(void) const { return(XOff); }
00189
00190
00191
00192
00193
00201 int SetYOff(const float YOffIn, bool bndchk=true)
00202 {
00203 YOff = YOffIn;
00204 return(CIGI_SUCCESS);
00205 }
00206
00207
00210 float GetYOff(void) const { return(YOff); }
00211
00212
00213
00214
00215
00223 int SetZOff(const float ZOffIn, bool bndchk=true)
00224 {
00225 ZOff = ZOffIn;
00226 return(CIGI_SUCCESS);
00227 }
00228
00229
00232 float GetZOff(void) const { return(ZOff); }
00233
00234
00235
00236
00237
00245 int SetRoll(const float RollIn, bool bndchk=true);
00246
00247
00250 float GetRoll(void) const { return(Roll); }
00251
00252
00253
00254
00255
00263 int SetPitch(const float PitchIn, bool bndchk=true);
00264
00265
00268 float GetPitch(void) const { return(Pitch); }
00269
00270
00271
00272
00273
00281 int SetYaw(const float YawIn, bool bndchk=true);
00282
00283
00286 float GetYaw(void) const { return(Yaw); }
00287
00288
00289
00290 protected:
00291
00292
00293
00294
00298 Cigi_uint16 EntityID;
00299
00300
00305 Cigi_uint16 ViewID;
00306
00307
00311 Cigi_uint8 GroupID;
00312
00313
00317 bool XOffEn;
00318
00319
00323 bool YOffEn;
00324
00325
00329 bool ZOffEn;
00330
00331
00335 bool RollEn;
00336
00337
00341 bool PitchEn;
00342
00343
00347 bool YawEn;
00348
00349
00354 float XOff;
00355
00356
00361 float YOff;
00362
00363
00368 float ZOff;
00369
00370
00374 float Roll;
00375
00376
00380 float Pitch;
00381
00382
00386 float Yaw;
00387
00388
00389 };
00390
00391 #endif // #if !defined(_CIGI_BASE_VIEW_CTRL_INCLUDED_)