Logo ROOT  
Reference Guide
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
17class TGLViewer;
18class TGLScene;
19
20class TEveBox;
22
23//------------------------------------------------------------------------------
24// TEveBoxGL
25//------------------------------------------------------------------------------
26
27class TEveBoxGL : public TGLObject
28{
29private:
30 TEveBoxGL(const TEveBoxGL&); // Not implemented
31 TEveBoxGL& operator=(const TEveBoxGL&); // Not implemented
32
33protected:
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
40public:
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
65{
66private:
67 TEveBoxProjectedGL(const TEveBoxProjectedGL&); // Not implemented
68 TEveBoxProjectedGL& operator=(const TEveBoxProjectedGL&); // Not implemented
69
70protected:
71 TEveBoxProjected *fM; // Model object.
72
73 void RenderPoints(Int_t mode) const;
74
75public:
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
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
float Float_t
Definition: RtypesCore.h:53
const Bool_t kTRUE
Definition: RtypesCore.h:87
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:326
OpenGL renderer class for TEveBox.
Definition: TEveBoxGL.h:28
TEveBoxGL & operator=(const TEveBoxGL &)
TEveBox * fM
Definition: TEveBoxGL.h:34
virtual void DirectDraw(TGLRnrCtx &rnrCtx) const
Render with OpenGL, create display-list.
Definition: TEveBoxGL.cxx:203
virtual Bool_t SetModel(TObject *obj, const Option_t *opt=0)
Set model object.
Definition: TEveBoxGL.cxx:39
virtual void SetBBox()
Set bounding box.
Definition: TEveBoxGL.cxx:48
virtual ~TEveBoxGL()
Definition: TEveBoxGL.h:42
TEveBoxGL(const TEveBoxGL &)
void RenderBoxAutoNorm(const Float_t p[8][3]) const
Render box, calculate normals on the fly from first three points.
Definition: TEveBoxGL.cxx:133
virtual Bool_t IgnoreSizeForOfInterest() const
Return true if size of this shape should be ignored when determining if the object should be drawn.
Definition: TEveBoxGL.h:50
void RenderOutline(const Float_t p[8][3]) const
Render box with without normals.
Definition: TEveBoxGL.cxx:78
TEveBoxGL()
Constructor.
Definition: TEveBoxGL.cxx:30
void RenderBoxStdNorm(const Float_t p[8][3]) const
Render box with standard axis-aligned normals.
Definition: TEveBoxGL.cxx:98
virtual void Draw(TGLRnrCtx &rnrCtx) const
Render with OpenGL.
Definition: TEveBoxGL.cxx:176
OpenGL renderer class for TEveBoxProjected.
Definition: TEveBoxGL.h:65
TEveBoxProjectedGL & operator=(const TEveBoxProjectedGL &)
virtual Bool_t IgnoreSizeForOfInterest() const
Return true if size of this shape should be ignored when determining if the object should be drawn.
Definition: TEveBoxGL.h:85
TEveBoxProjectedGL()
Constructor.
Definition: TEveBoxGL.cxx:237
virtual ~TEveBoxProjectedGL()
Definition: TEveBoxGL.h:77
virtual void DirectDraw(TGLRnrCtx &rnrCtx) const
Render with OpenGL, create display-list.
Definition: TEveBoxGL.cxx:330
virtual void Draw(TGLRnrCtx &rnrCtx) const
Render with OpenGL.
Definition: TEveBoxGL.cxx:288
TEveBoxProjected * fM
Definition: TEveBoxGL.h:71
virtual void SetBBox()
Set bounding box.
Definition: TEveBoxGL.cxx:255
virtual Bool_t SetModel(TObject *obj, const Option_t *opt=0)
Set model object.
Definition: TEveBoxGL.cxx:246
TEveBoxProjectedGL(const TEveBoxProjectedGL &)
void RenderPoints(Int_t mode) const
Render points with given GL mode.
Definition: TEveBoxGL.cxx:264
Projection of TEveBox.
Definition: TEveBox.h:58
3D box with arbitrary vertices (cuboid).
Definition: TEveBox.h:22
Base-class for direct OpenGL renderers.
Definition: TGLObject.h:22
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
Definition: TGLRnrCtx.h:41
TGLScene provides management and rendering of ROOT's default 3D /object representation as logical and...
Definition: TGLScene.h:29
Base GL viewer object - used by both standalone and embedded (in pad) GL.
Definition: TGLViewer.h:57
Mother of all ROOT objects.
Definition: TObject.h:37