Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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 ~TEveBoxGL() override {}
43
44 Bool_t SetModel(TObject* obj, const Option_t *opt = nullptr) override;
45 void SetBBox() override;
46
47 void Draw(TGLRnrCtx& rnrCtx) const override;
48 void DirectDraw(TGLRnrCtx& rnrCtx) const override;
49
50 Bool_t IgnoreSizeForOfInterest() const override { 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 ClassDefOverride(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:
77 ~TEveBoxProjectedGL() override {}
78
79 Bool_t SetModel(TObject* obj, const Option_t *opt = nullptr) override;
80 void SetBBox() override;
81
82 void Draw(TGLRnrCtx& rnrCtx) const override;
83 void DirectDraw(TGLRnrCtx& rnrCtx) const override;
84
85 Bool_t IgnoreSizeForOfInterest() const override { 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 ClassDefOverride(TEveBoxProjectedGL, 0); // GL renderer class for TEveBoxProjected.
92};
93
94#endif
bool Bool_t
Definition RtypesCore.h:63
float Float_t
Definition RtypesCore.h:57
constexpr Bool_t kTRUE
Definition RtypesCore.h:100
const char Option_t
Definition RtypesCore.h:66
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char mode
OpenGL renderer class for TEveBox.
Definition TEveBoxGL.h:28
TEveBoxGL & operator=(const TEveBoxGL &)
TEveBox * fM
Definition TEveBoxGL.h:34
ClassDefOverride(TEveBoxGL, 0)
TEveBoxGL(const TEveBoxGL &)
void RenderBoxAutoNorm(const Float_t p[8][3]) const
Render box, calculate normals on the fly from first three points.
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
void DirectDraw(TGLRnrCtx &rnrCtx) const override
Render with OpenGL, create display-list.
Bool_t SetModel(TObject *obj, const Option_t *opt=nullptr) override
Set model object.
Definition TEveBoxGL.cxx:39
Bool_t IgnoreSizeForOfInterest() const override
Return true if size of this shape should be ignored when determining if the object should be drawn.
Definition TEveBoxGL.h:50
~TEveBoxGL() override
Definition TEveBoxGL.h:42
void SetBBox() override
Set bounding box.
Definition TEveBoxGL.cxx:48
OpenGL renderer class for TEveBoxProjected.
Definition TEveBoxGL.h:65
ClassDefOverride(TEveBoxProjectedGL, 0)
void SetBBox() override
Set bounding box.
void DirectDraw(TGLRnrCtx &rnrCtx) const override
Render with OpenGL, create display-list.
TEveBoxProjectedGL & operator=(const TEveBoxProjectedGL &)
Bool_t IgnoreSizeForOfInterest() const override
Return true if size of this shape should be ignored when determining if the object should be drawn.
Definition TEveBoxGL.h:85
TEveBoxProjectedGL()
Constructor.
~TEveBoxProjectedGL() override
Definition TEveBoxGL.h:77
TEveBoxProjected * fM
Definition TEveBoxGL.h:71
TEveBoxProjectedGL(const TEveBoxProjectedGL &)
Bool_t SetModel(TObject *obj, const Option_t *opt=nullptr) override
Set model object.
void RenderPoints(Int_t mode) const
Render points with given GL mode.
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:55
Mother of all ROOT objects.
Definition TObject.h:41
th1 Draw()