CigiBaseArtPartCtrl.h

Go to the documentation of this file.
00001 
00055 #if !defined(_CIGI_BASE_ART_PART_CTRL_INCLUDED_)
00056 #define _CIGI_BASE_ART_PART_CTRL_INCLUDED_
00057 
00058 #include "CigiBasePacket.h"
00059 
00060 
00061 // ====================================================================
00062 // preprocessor definitions
00063 // ====================================================================
00064 
00065 #define CIGI_ART_PART_CTRL_PACKET_ID_V1 4
00066 #define CIGI_ART_PART_CTRL_PACKET_SIZE_V1 20
00067 
00068 #define CIGI_ART_PART_CTRL_PACKET_ID_V2 4
00069 #define CIGI_ART_PART_CTRL_PACKET_SIZE_V2 32
00070 
00071 #define CIGI_ART_PART_CTRL_PACKET_ID_V3 6
00072 #define CIGI_ART_PART_CTRL_PACKET_SIZE_V3 32
00073 
00074 
00075 class CigiArtPartCtrlV1;
00076 class CigiArtPartCtrlV2;
00077 class CigiArtPartCtrlV3;
00078 
00079 
00080 class CIGI_SPEC CigiBaseArtPartCtrl : public CigiBasePacket
00081 {
00082 
00083 friend class CigiArtPartCtrlV1;
00084 friend class CigiArtPartCtrlV2;
00085 friend class CigiArtPartCtrlV3;
00086 
00087 public:
00088 
00089    //==> Management
00090 
00091    //=========================================================
00094    CigiBaseArtPartCtrl();
00095 
00096    //=========================================================
00099    virtual ~CigiBaseArtPartCtrl();
00100 
00101 
00102    //==> Buffer Packing/Unpacking
00103 
00104    //=========================================================
00115    virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0;
00116 
00117    //=========================================================
00127    virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0;
00128 
00129    //=========================================================
00141         virtual int GetCnvt(CigiVersionID &CnvtVersion,
00142                        CigiCnvtInfoType::Type &CnvtInfo);
00143 
00144 
00145 
00146    //==> Accessing Member Variable Values functions
00147 
00148    //+> EntityID
00149 
00150    //=========================================================
00158    int SetEntityID(const Cigi_uint16 EntityIDIn, bool bndchk=true)
00159    {
00160       EntityID = EntityIDIn;
00161       return(CIGI_SUCCESS);
00162    }
00163 
00164    //=========================================================
00167    Cigi_uint16 GetEntityID(void) const { return(EntityID); }
00168 
00169 
00170    //+> ArtPartEn
00171 
00172    //=========================================================
00179    int SetArtPartEn(const bool ArtPartEnIn, bool bndchk=true)
00180    {
00181       ArtPartEn = ArtPartEnIn;
00182       return(CIGI_SUCCESS);
00183    }
00184 
00185    //=========================================================
00188    bool GetArtPartEn(void) const { return(ArtPartEn); }
00189 
00190 
00191    //+> XOffEn
00192 
00193    //=========================================================
00200    int SetXOffEn(const bool XOffEnIn, bool bndchk=true)
00201    {
00202       XOffEn = XOffEnIn;
00203       return(CIGI_SUCCESS);
00204    }
00205 
00206    //=========================================================
00209    bool GetXOffEn(void) const { return(XOffEn); }
00210 
00211 
00212    //+> YOffEn
00213 
00214    //=========================================================
00221    int SetYOffEn(const bool YOffEnIn, bool bndchk=true)
00222    {
00223       YOffEn = YOffEnIn;
00224       return(CIGI_SUCCESS);
00225    }
00226 
00227    //=========================================================
00230    bool GetYOffEn(void) const { return(YOffEn); }
00231 
00232 
00233    //+> ZOffEn
00234 
00235    //=========================================================
00242    int SetZOffEn(const bool ZOffEnIn, bool bndchk=true)
00243    {
00244       ZOffEn = ZOffEnIn;
00245       return(CIGI_SUCCESS);
00246    }
00247 
00248    //=========================================================
00251    bool GetZOffEn(void) const { return(ZOffEn); }
00252 
00253 
00254    //+> RollEn
00255 
00256    //=========================================================
00263    int SetRollEn(const bool RollEnIn, bool bndchk=true)
00264    {
00265       RollEn = RollEnIn;
00266       return(CIGI_SUCCESS);
00267    }
00268 
00269    //=========================================================
00272    bool GetRollEn(void) const { return(RollEn); }
00273 
00274 
00275    //+> PitchEn
00276 
00277    //=========================================================
00284    int SetPitchEn(const bool PitchEnIn, bool bndchk=true)
00285    {
00286       PitchEn = PitchEnIn;
00287       return(CIGI_SUCCESS);
00288    }
00289 
00290    //=========================================================
00293    bool GetPitchEn(void) const { return(PitchEn); }
00294 
00295 
00296    //+> YawEn
00297 
00298    //=========================================================
00305    int SetYawEn(const bool YawEnIn, bool bndchk=true)
00306    {
00307       YawEn = YawEnIn;
00308       return(CIGI_SUCCESS);
00309    }
00310 
00311    //=========================================================
00314    bool GetYawEn(void) const { return(YawEn); }
00315 
00316 
00317    //+> XOff
00318 
00319    //=========================================================
00327    int SetXOff(const float XOffIn, bool bndchk=true)
00328    {
00329       XOff = XOffIn;
00330       return(CIGI_SUCCESS);
00331    }
00332 
00333    //=========================================================
00336    float GetXOff(void) const { return(XOff); }
00337 
00338 
00339    //+> YOff
00340 
00341    //=========================================================
00349    int SetYOff(const float YOffIn, bool bndchk=true)
00350    {
00351       YOff = YOffIn;
00352       return(CIGI_SUCCESS);
00353    }
00354 
00355    //=========================================================
00358    float GetYOff(void) const { return(YOff); }
00359 
00360 
00361    //+> ZOff
00362 
00363    //=========================================================
00371    int SetZOff(const float ZOffIn, bool bndchk=true)
00372    {
00373       ZOff = ZOffIn;
00374       return(CIGI_SUCCESS);
00375    }
00376 
00377    //=========================================================
00380    float GetZOff(void) const { return(ZOff); }
00381 
00382 
00383    //+> Roll
00384 
00385    //=========================================================
00393    int SetRoll(const float RollIn, bool bndchk=true);
00394 
00395    //=========================================================
00398    float GetRoll(void) const { return(Roll); }
00399 
00400 
00401    //+> Pitch
00402 
00403    //=========================================================
00411    int SetPitch(const float PitchIn, bool bndchk=true);
00412 
00413    //=========================================================
00416    float GetPitch(void) const { return(Pitch); }
00417 
00418 
00419    //+> Yaw
00420 
00421    //=========================================================
00429    int SetYaw(const float YawIn, bool bndchk=true);
00430 
00431    //=========================================================
00434    float GetYaw(void) const { return(Yaw); }
00435 
00436 
00437 
00438 protected:
00439 
00440    //==> Member variables
00441 
00442    //=========================================================
00446    Cigi_uint16 EntityID;
00447 
00448    //=========================================================
00452    Cigi_int8 ArtPartIDV1;
00453 
00454    //=========================================================
00458    Cigi_uint8 ArtPartIDV3;
00459 
00460    //=========================================================
00466    bool ArtPartEn;
00467 
00468    //=========================================================
00474    bool XOffEn;
00475 
00476    //=========================================================
00482    bool YOffEn;
00483 
00484    //=========================================================
00490    bool ZOffEn;
00491 
00492    //=========================================================
00498    bool RollEn;
00499 
00500    //=========================================================
00506    bool PitchEn;
00507 
00508    //=========================================================
00514    bool YawEn;
00515 
00516    //=========================================================
00521    float XOff;
00522 
00523    //=========================================================
00528    float YOff;
00529 
00530    //=========================================================
00535    float ZOff;
00536 
00537    //=========================================================
00543    float Roll;
00544 
00545    //=========================================================
00551    float Pitch;
00552 
00553    //=========================================================
00559    float Yaw;
00560 
00561 
00562 };
00563 
00564 #endif // #if !defined(_CIGI_BASE_ART_PART_CTRL_INCLUDED_)

Generated on Wed Apr 29 08:59:55 2009 for CCL by  doxygen 1.4.7