Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TEveFrameBox.h
Go to the documentation of this file.
1 // @(#)root/eve:$Id$
2 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TEveFrameBox
13 #define ROOT_TEveFrameBox
14 
15 #include "TEveUtil.h"
16 #include "TObject.h"
17 
18 class TEveFrameBox : public TObject, public TEveRefBackPtr
19 {
20  friend class TEveFrameBoxGL;
21 
22 public:
23  enum EFrameType_e { kFT_None, kFT_Quad, kFT_Box };
24 
25 private:
26  TEveFrameBox(const TEveFrameBox&); // Not implemented
27  TEveFrameBox& operator=(const TEveFrameBox&); // Not implemented
28 
29 protected:
30  EFrameType_e fFrameType;
31  Int_t fFrameSize;
32  Float_t *fFramePoints; //[fFrameSize]
33 
34  Float_t fFrameWidth;
35  Color_t fFrameColor;
36  Color_t fBackColor;
37  UChar_t fFrameRGBA[4];
38  UChar_t fBackRGBA[4];
39  Bool_t fFrameFill;
40  Bool_t fDrawBack;
41 
42 public:
43  TEveFrameBox();
44  virtual ~TEveFrameBox();
45 
46  void SetAAQuadXY(Float_t x, Float_t y, Float_t z, Float_t dx, Float_t dy);
47  void SetAAQuadXZ(Float_t x, Float_t y, Float_t z, Float_t dx, Float_t dz);
48 
49  void SetQuadByPoints(const Float_t* pointArr, Int_t nPoints);
50 
51  void SetAABox(Float_t x, Float_t y, Float_t z,
52  Float_t dx, Float_t dy, Float_t dz);
53 
54  void SetAABoxCenterHalfSize(Float_t x, Float_t y, Float_t z,
55  Float_t dx, Float_t dy, Float_t dz);
56 
57  // ----------------------------------------------------------------
58 
59  EFrameType_e GetFrameType() const { return fFrameType; }
60  Int_t GetFrameSize() const { return fFrameSize; }
61  Float_t* GetFramePoints() const { return fFramePoints; }
62 
63  Float_t GetFrameWidth() const { return fFrameWidth; }
64  void SetFrameWidth(Float_t f) { fFrameWidth = f; }
65 
66  Color_t GetFrameColor() const { return fFrameColor; }
67  Color_t* PtrFrameColor() { return &fFrameColor; }
68  UChar_t* GetFrameRGBA() { return fFrameRGBA; }
69 
70  void SetFrameColor(Color_t ci);
71  void SetFrameColorPixel(Pixel_t pix);
72  void SetFrameColorRGBA(UChar_t r, UChar_t g, UChar_t b, UChar_t a=255);
73 
74  Color_t GetBackColor() const { return fBackColor; }
75  Color_t* PtrBackColor() { return &fBackColor; }
76  UChar_t* GetBackRGBA() { return fBackRGBA; }
77 
78  void SetBackColor(Color_t ci);
79  void SetBackColorPixel(Pixel_t pix);
80  void SetBackColorRGBA(UChar_t r, UChar_t g, UChar_t b, UChar_t a=255);
81 
82  Bool_t GetFrameFill() const { return fFrameFill; }
83  void SetFrameFill(Bool_t f) { fFrameFill = f; }
84 
85  Bool_t GetDrawBack() const { return fDrawBack; }
86  void SetDrawBack(Bool_t f) { fDrawBack = f; }
87 
88  ClassDef(TEveFrameBox, 0); // Description of a 2D or 3D frame that can be used to visually group a set of objects.
89 };
90 
91 #endif