Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TEveBoxGL.h
Go to the documentation of this file.
1 // @(#)root/eve:$Id$
2 // Author: Matevz Tadel, 2010
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_TEveBoxGL
13 #define ROOT_TEveBoxGL
14 
15 #include "TGLObject.h"
16 
17 class TGLViewer;
18 class TGLScene;
19 
20 class TEveBox;
21 class TEveBoxProjected;
22 
23 //------------------------------------------------------------------------------
24 // TEveBoxGL
25 //------------------------------------------------------------------------------
26 
27 class TEveBoxGL : public TGLObject
28 {
29 private:
30  TEveBoxGL(const TEveBoxGL&); // Not implemented
31  TEveBoxGL& operator=(const TEveBoxGL&); // Not implemented
32 
33 protected:
34  TEveBox *fM; // Model object.
35 
36  void RenderOutline (const Float_t p[8][3]) const;
37  void RenderBoxStdNorm (const Float_t p[8][3]) const;
38  void RenderBoxAutoNorm(const Float_t p[8][3]) const;
39 
40 public:
41  TEveBoxGL();
42  virtual ~TEveBoxGL() {}
43 
44  virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
45  virtual void SetBBox();
46 
47  virtual void Draw(TGLRnrCtx& rnrCtx) const;
48  virtual void DirectDraw(TGLRnrCtx& rnrCtx) const;
49 
50  virtual Bool_t IgnoreSizeForOfInterest() const { return kTRUE; }
51 
52  // To support two-level selection
53  // virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
54  // virtual void ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & rec);
55 
56  ClassDef(TEveBoxGL, 0); // GL renderer class for TEveBox.
57 };
58 
59 
60 //------------------------------------------------------------------------------
61 // TEveBoxProjectedGL
62 //------------------------------------------------------------------------------
63 
64 class TEveBoxProjectedGL : public TGLObject
65 {
66 private:
67  TEveBoxProjectedGL(const TEveBoxProjectedGL&); // Not implemented
68  TEveBoxProjectedGL& operator=(const TEveBoxProjectedGL&); // Not implemented
69 
70 protected:
71  TEveBoxProjected *fM; // Model object.
72 
73  void RenderPoints(Int_t mode) const;
74 
75 public:
76  TEveBoxProjectedGL();
77  virtual ~TEveBoxProjectedGL() {}
78 
79  virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
80  virtual void SetBBox();
81 
82  virtual void Draw(TGLRnrCtx& rnrCtx) const;
83  virtual void DirectDraw(TGLRnrCtx& rnrCtx) const;
84 
85  virtual Bool_t IgnoreSizeForOfInterest() const { return kTRUE; }
86 
87  // To support two-level selection
88  // virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
89  // virtual void ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & rec);
90 
91  ClassDef(TEveBoxProjectedGL, 0); // GL renderer class for TEveBoxProjected.
92 };
93 
94 #endif