Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TEveFrameBox.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/eve:$Id$
0002 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TEveFrameBox
0013 #define ROOT_TEveFrameBox
0014 
0015 #include "TEveUtil.h"
0016 #include "TObject.h"
0017 
0018 class TEveFrameBox : public TObject, public TEveRefBackPtr
0019 {
0020    friend class TEveFrameBoxGL;
0021 
0022 public:
0023    enum EFrameType_e  { kFT_None, kFT_Quad, kFT_Box };
0024 
0025 private:
0026    TEveFrameBox(const TEveFrameBox&);            // Not implemented
0027    TEveFrameBox& operator=(const TEveFrameBox&); // Not implemented
0028 
0029 protected:
0030    EFrameType_e fFrameType;
0031    Int_t        fFrameSize;
0032    Float_t     *fFramePoints;  //[fFrameSize]
0033 
0034    Float_t      fFrameWidth;
0035    Color_t      fFrameColor;
0036    Color_t      fBackColor;
0037    UChar_t      fFrameRGBA[4];
0038    UChar_t      fBackRGBA[4];
0039    Bool_t       fFrameFill;
0040    Bool_t       fDrawBack;
0041 
0042 public:
0043    TEveFrameBox();
0044    ~TEveFrameBox() override;
0045 
0046    void SetAAQuadXY(Float_t x, Float_t y, Float_t z, Float_t dx, Float_t dy);
0047    void SetAAQuadXZ(Float_t x, Float_t y, Float_t z, Float_t dx, Float_t dz);
0048 
0049    void SetQuadByPoints(const Float_t* pointArr, Int_t nPoints);
0050 
0051    void SetAABox(Float_t x,  Float_t y,  Float_t z,
0052                  Float_t dx, Float_t dy, Float_t dz);
0053 
0054    void SetAABoxCenterHalfSize(Float_t x,  Float_t y,  Float_t z,
0055                                Float_t dx, Float_t dy, Float_t dz);
0056 
0057    // ----------------------------------------------------------------
0058 
0059    EFrameType_e GetFrameType()   const { return fFrameType; }
0060    Int_t        GetFrameSize()   const { return fFrameSize; }
0061    Float_t*     GetFramePoints() const { return fFramePoints; }
0062 
0063    Float_t GetFrameWidth() const    { return fFrameWidth; }
0064    void    SetFrameWidth(Float_t f) { fFrameWidth = f;    }
0065 
0066    Color_t  GetFrameColor() const { return fFrameColor; }
0067    Color_t* PtrFrameColor() { return &fFrameColor; }
0068    UChar_t* GetFrameRGBA()  { return fFrameRGBA;  }
0069 
0070    void SetFrameColor(Color_t ci);
0071    void SetFrameColorPixel(Pixel_t pix);
0072    void SetFrameColorRGBA(UChar_t r, UChar_t g, UChar_t b, UChar_t a=255);
0073 
0074    Color_t  GetBackColor() const { return fBackColor; }
0075    Color_t* PtrBackColor() { return &fBackColor; }
0076    UChar_t* GetBackRGBA()  { return fBackRGBA;  }
0077 
0078    void SetBackColor(Color_t ci);
0079    void SetBackColorPixel(Pixel_t pix);
0080    void SetBackColorRGBA(UChar_t r, UChar_t g, UChar_t b, UChar_t a=255);
0081 
0082    Bool_t GetFrameFill() const   { return fFrameFill; }
0083    void   SetFrameFill(Bool_t f) { fFrameFill = f;    }
0084 
0085    Bool_t GetDrawBack() const   { return fDrawBack; }
0086    void   SetDrawBack(Bool_t f) { fDrawBack = f;    }
0087 
0088    void OnZeroRefCount() override { delete this; }
0089 
0090    ClassDefOverride(TEveFrameBox, 0); // Description of a 2D or 3D frame that can be used to visually group a set of objects.
0091 };
0092 
0093 #endif