TEveFrameBox.h

Go to the documentation of this file.
00001 // @(#)root/eve:$Id: TEveFrameBox.h 25245 2008-08-25 21:44:09Z matevz $
00002 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TEveFrameBox
00013 #define ROOT_TEveFrameBox
00014 
00015 #include "TEveUtil.h"
00016 #include "TObject.h"
00017 
00018 class TEveFrameBox : public TObject, public TEveRefBackPtr
00019 {
00020    friend class TEveFrameBoxGL;
00021 
00022 public:
00023    enum EFrameType_e  { kFT_None, kFT_Quad, kFT_Box };
00024 
00025 private:
00026    TEveFrameBox(const TEveFrameBox&);            // Not implemented
00027    TEveFrameBox& operator=(const TEveFrameBox&); // Not implemented
00028 
00029 protected:
00030    EFrameType_e fFrameType;
00031    Int_t        fFrameSize;
00032    Float_t     *fFramePoints;  //[fFrameSize]
00033 
00034    Float_t      fFrameWidth;
00035    Color_t      fFrameColor;
00036    Color_t      fBackColor;
00037    UChar_t      fFrameRGBA[4];
00038    UChar_t      fBackRGBA[4];
00039    Bool_t       fFrameFill;
00040    Bool_t       fDrawBack;
00041 
00042 public:
00043    TEveFrameBox();
00044    virtual ~TEveFrameBox();
00045 
00046    void SetAAQuadXY(Float_t x, Float_t y, Float_t z, Float_t dx, Float_t dy);
00047    void SetAAQuadXZ(Float_t x, Float_t y, Float_t z, Float_t dx, Float_t dz);
00048 
00049    void SetQuadByPoints(const Float_t* pointArr, Int_t nPoints);
00050 
00051    void SetAABox(Float_t x,  Float_t y,  Float_t z,
00052                  Float_t dx, Float_t dy, Float_t dz);
00053 
00054    void SetAABoxCenterHalfSize(Float_t x,  Float_t y,  Float_t z,
00055                                Float_t dx, Float_t dy, Float_t dz);
00056 
00057    // ----------------------------------------------------------------
00058 
00059    EFrameType_e GetFrameType()   const { return fFrameType; }
00060    Int_t        GetFrameSize()   const { return fFrameSize; }
00061    Float_t*     GetFramePoints() const { return fFramePoints; }
00062 
00063    Float_t GetFrameWidth() const    { return fFrameWidth; }
00064    void    SetFrameWidth(Float_t f) { fFrameWidth = f;    }
00065 
00066    Color_t  GetFrameColor() const { return fFrameColor; }
00067    Color_t* PtrFrameColor() { return &fFrameColor; }
00068    UChar_t* GetFrameRGBA()  { return fFrameRGBA;  }
00069 
00070    void SetFrameColor(Color_t ci);
00071    void SetFrameColorPixel(Pixel_t pix);
00072    void SetFrameColorRGBA(UChar_t r, UChar_t g, UChar_t b, UChar_t a=255);
00073 
00074    Color_t  GetBackColor() const { return fBackColor; }
00075    Color_t* PtrBackColor() { return &fBackColor; }
00076    UChar_t* GetBackRGBA()  { return fBackRGBA;  }
00077 
00078    void SetBackColor(Color_t ci);
00079    void SetBackColorPixel(Pixel_t pix);
00080    void SetBackColorRGBA(UChar_t r, UChar_t g, UChar_t b, UChar_t a=255);
00081 
00082    Bool_t GetFrameFill() const   { return fFrameFill; }
00083    void   SetFrameFill(Bool_t f) { fFrameFill = f;    }
00084 
00085    Bool_t GetDrawBack() const   { return fDrawBack; }
00086    void   SetDrawBack(Bool_t f) { fDrawBack = f;    }
00087 
00088    ClassDef(TEveFrameBox, 1); // Description of a 2D or 3D frame that can be used to visually group a set of objects.
00089 };
00090 
00091 #endif

Generated on Tue Jul 5 14:14:55 2011 for ROOT_528-00b_version by  doxygen 1.5.1