CigiBaseViewDef.h

Go to the documentation of this file.
00001 
00055 #if !defined(_CIGI_BASE_VIEWDEF_INCLUDED_)
00056 #define _CIGI_BASE_VIEWDEF_INCLUDED_
00057 
00058 #include "CigiBasePacket.h"
00059 
00060 // ====================================================================
00061 // preprocessor definitions
00062 // ====================================================================
00063 
00064 #define CIGI_VIEW_DEF_PACKET_ID_V1 23
00065 #define CIGI_VIEW_DEF_PACKET_SIZE_V1 32
00066 
00067 #define CIGI_VIEW_DEF_PACKET_ID_V2 23
00068 #define CIGI_VIEW_DEF_PACKET_SIZE_V2 32
00069 
00070 #define CIGI_VIEW_DEF_PACKET_ID_V3 21
00071 #define CIGI_VIEW_DEF_PACKET_SIZE_V3 32
00072 
00073 
00074 class CigiViewDefV1;
00075 class CigiViewDefV2;
00076 class CigiViewDefV3;
00077 
00078 
00079 class CIGI_SPEC CigiBaseViewDef : public CigiBasePacket
00080 {
00081 
00082 friend class CigiViewDefV1;
00083 friend class CigiViewDefV2;
00084 friend class CigiViewDefV3;
00085 
00086 public:
00087 
00088    //=========================================================
00091    enum MirrorModeGrp
00092    {
00093       MirrorNone=0,
00094       Horizontal=1,
00095       Vertical=2,
00096       Horiz_Vert=3
00097    };
00098 
00099    //=========================================================
00102    enum PixelReplicateModeGrp
00103    {
00104       ReplicateNone=0,
00105       Replicate1x2=1,
00106       Replicate2x1=2,
00107       Replicate2x2=3,
00108       ReplicateDefA=4,
00109       ReplicateDefB=5,
00110       ReplicateDefC=6,
00111       ReplicateDefD=7
00112    };
00113 
00114    //=========================================================
00117    enum ProjectionTypeGrp
00118    {
00119       Perspective=0,
00120       Orthographic=1
00121    };
00122 
00123 
00124 
00125 
00126    //==> Management
00127 
00128    //=========================================================
00131    CigiBaseViewDef();
00132 
00133    //=========================================================
00136    virtual ~CigiBaseViewDef();
00137 
00138 
00139    //==> Buffer Packing/Unpacking
00140 
00141    //=========================================================
00152    virtual int Pack(CigiBasePacket * Base, Cigi_uint8 * Buff, void *Spec) const=0;
00153 
00154    //=========================================================
00164    virtual int Unpack(Cigi_uint8 * Buff, bool Swap, void *Spec) =0;
00165 
00166    //=========================================================
00178         virtual int GetCnvt(CigiVersionID &CnvtVersion,
00179                        CigiCnvtInfoType::Type &CnvtInfo);
00180 
00181 
00182 
00183    //==> Accessing Member Variable Values functions
00184 
00185    //+> MirrorMode
00186 
00187    //=========================================================
00198    int SetMirrorMode(const MirrorModeGrp MirrorModeIn, bool bndchk=true);
00199 
00200    //=========================================================
00203    MirrorModeGrp GetMirrorMode(void) const { return(MirrorMode); }
00204 
00205 
00206    //+> PixelReplicateMode
00207 
00208    //=========================================================
00224    int SetPixelReplicateMode(const PixelReplicateModeGrp PixelReplicateModeIn, bool bndchk=true);
00225 
00226    //=========================================================
00229    PixelReplicateModeGrp GetPixelReplicateMode(void) const { return(PixelReplicateMode); }
00230 
00231 
00232    //+> ViewType
00233 
00234    //=========================================================
00241    int SetViewType(const Cigi_uint8 ViewTypeIn, bool bndchk=true);
00242 
00243    //=========================================================
00246    Cigi_uint8 GetViewType(void) const { return(ViewType); }
00247 
00248 
00249    //+> FOVNear
00250 
00251    //=========================================================
00258    int SetFOVNear(const float FOVNearIn, bool bndchk=true)
00259    {
00260       FOVNear = FOVNearIn;
00261       return(CIGI_SUCCESS);
00262    }
00263 
00264    //=========================================================
00267    float GetFOVNear(void) const { return(FOVNear); }
00268 
00269 
00270    //+> FOVFar
00271 
00272    //=========================================================
00279    int SetFOVFar(const float FOVFarIn, bool bndchk=true)
00280    {
00281       FOVFar = FOVFarIn;
00282       return(CIGI_SUCCESS);
00283    }
00284 
00285    //=========================================================
00288    float GetFOVFar(void) const { return(FOVFar); }
00289 
00290 
00291    //+> FOVLeft
00292 
00293    //=========================================================
00300    int SetFOVLeft(const float FOVLeftIn, bool bndchk=true)
00301    {
00302       FOVLeft = FOVLeftIn;
00303       return(CIGI_SUCCESS);
00304    }
00305 
00306    //=========================================================
00309    float GetFOVLeft(void) const { return(FOVLeft); }
00310 
00311 
00312    //+> FOVRight
00313 
00314    //=========================================================
00321    int SetFOVRight(const float FOVRightIn, bool bndchk=true)
00322    {
00323       FOVRight = FOVRightIn;
00324       return(CIGI_SUCCESS);
00325    }
00326 
00327    //=========================================================
00330    float GetFOVRight(void) const { return(FOVRight); }
00331 
00332 
00333    //+> FOVTop
00334 
00335    //=========================================================
00342    int SetFOVTop(const float FOVTopIn, bool bndchk=true)
00343    {
00344       FOVTop = FOVTopIn;
00345       return(CIGI_SUCCESS);
00346    }
00347 
00348    //=========================================================
00351    float GetFOVTop(void) const { return(FOVTop); }
00352 
00353 
00354    //+> FOVBottom
00355 
00356    //=========================================================
00363    int SetFOVBottom(const float FOVBottomIn, bool bndchk=true)
00364    {
00365       FOVBottom = FOVBottomIn;
00366       return(CIGI_SUCCESS);
00367    }
00368 
00369    //=========================================================
00372    float GetFOVBottom(void) const { return(FOVBottom); }
00373 
00374 
00375 
00376 protected:
00377 
00378    //==> Member variables
00379 
00380    //=========================================================
00384    Cigi_uint16 ViewID;
00385 
00386    //=========================================================
00390    Cigi_uint8 GroupID;
00391 
00392    //=========================================================
00397    bool FOVNearEn;
00398 
00399    //=========================================================
00404    bool FOVFarEn;
00405 
00406    //=========================================================
00411    bool FOVLeftEn;
00412 
00413    //=========================================================
00418    bool FOVRightEn;
00419 
00420    //=========================================================
00425    bool FOVTopEn;
00426 
00427    //=========================================================
00432    bool FOVBottomEn;
00433 
00434    //=========================================================
00445    MirrorModeGrp MirrorMode;
00446 
00447    //=========================================================
00460    PixelReplicateModeGrp PixelReplicateMode;
00461 
00462    //=========================================================
00469    ProjectionTypeGrp ProjectionType;
00470 
00471    //=========================================================
00477    bool Reorder;
00478 
00479    //=========================================================
00484    Cigi_uint8 ViewType;
00485 
00486    //=========================================================
00490    bool TrackerAssigned;
00491 
00492    //=========================================================
00496    float FOVNear;
00497 
00498    //=========================================================
00502    float FOVFar;
00503 
00504    //=========================================================
00508    float FOVLeft;
00509 
00510    //=========================================================
00514    float FOVRight;
00515 
00516    //=========================================================
00520    float FOVTop;
00521 
00522    //=========================================================
00526    float FOVBottom;
00527 
00528 };
00529 
00530 #endif // #if !defined(_CIGI_BASE_VIEWDEF_INCLUDED_)

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