Logo ROOT   6.08/07
Reference Guide
TEveBoxSetGL.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_TEveBoxSetGL
13 #define ROOT_TEveBoxSetGL
14 
15 #include "TEveDigitSetGL.h"
16 #include "TEveBoxSet.h"
17 
19 {
20  TEveBoxSetGL(const TEveBoxSetGL&); // Not implemented
21  TEveBoxSetGL& operator=(const TEveBoxSetGL&); // Not implemented
22 
23 protected:
24  TEveBoxSet *fM; // Model object.
25 
26  mutable UInt_t fBoxDL; // Display-list id for a box atom.
27 
28  Int_t PrimitiveType() const;
29  void MakeOriginBox(Float_t p[8][3], Float_t dx, Float_t dy, Float_t dz) const;
30  void RenderBoxStdNorm(const Float_t p[8][3]) const;
31  void RenderBoxAutoNorm(const Float_t p[8][3]) const;
32  void MakeDisplayList() const;
33 
34  void RenderBoxes(TGLRnrCtx& rnrCtx) const;
35 
36 public:
37  TEveBoxSetGL();
38  virtual ~TEveBoxSetGL();
39 
40  virtual Bool_t ShouldDLCache(const TGLRnrCtx& rnrCtx) const;
41  virtual void DLCacheDrop();
42  virtual void DLCachePurge();
43 
44  virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
45  virtual void DirectDraw(TGLRnrCtx& rnrCtx) const;
46 
47  virtual void Render(TGLRnrCtx& rnrCtx);
48 
49  ClassDef(TEveBoxSetGL, 0); // GL-renderer for TEveBoxSet class.
50 };
51 
52 #endif
void MakeDisplayList() const
Create a display-list for rendering a single box, based on the current box-type.
A GL rendering class for TEveBoxSet.
Definition: TEveBoxSetGL.h:18
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
Definition: TGLRnrCtx.h:40
Int_t PrimitiveType() const
Return GL primitive used to render the boxes, based on the render-mode specified in the model object...
float Float_t
Definition: RtypesCore.h:53
TEveBoxSetGL()
Default constructor.
TEveBoxSetGL & operator=(const TEveBoxSetGL &)
const char Option_t
Definition: RtypesCore.h:62
Collection of 3D primitives (fixed-size boxes, boxes of different sizes, or arbitrary sexto-epipeds...
Definition: TEveBoxSet.h:21
virtual void DLCacheDrop()
Called when display lists have been destroyed externally and the internal display-list data needs to ...
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
virtual Bool_t ShouldDLCache(const TGLRnrCtx &rnrCtx) const
Determines if display-list will be used for rendering.
void RenderBoxAutoNorm(const Float_t p[8][3]) const
Render box, calculate normals on the fly from first three points.
virtual Bool_t SetModel(TObject *obj, const Option_t *opt=0)
Set model object.
virtual void DirectDraw(TGLRnrCtx &rnrCtx) const
Actual rendering code.
#define ClassDef(name, id)
Definition: Rtypes.h:254
UInt_t fBoxDL
Definition: TEveBoxSetGL.h:26
TEveBoxSet * fM
Definition: TEveBoxSetGL.h:24
OpenGL renderer class for TEveDigitSet.
virtual ~TEveBoxSetGL()
Destructor.
void RenderBoxes(TGLRnrCtx &rnrCtx) const
GL rendering for all box-types.
void MakeOriginBox(Float_t p[8][3], Float_t dx, Float_t dy, Float_t dz) const
Fill array p to represent a box (0,0,0) - (dx,dy,dz).
void RenderBoxStdNorm(const Float_t p[8][3]) const
Render a box specified by points in array p with standard axis-aligned normals.
unsigned int UInt_t
Definition: RtypesCore.h:42
Mother of all ROOT objects.
Definition: TObject.h:37
virtual void DLCachePurge()
Called when display-lists need to be returned to the system.
virtual void Render(TGLRnrCtx &rnrCtx)
Interface for direct rendering from classes that include TEveBoxSet as a member.