Logo ROOT  
Reference Guide
TGL5DPainter Class Reference

TGL5DPainter implements "gl5d" option for TTree::Draw.

Data (4D) is visualized as a set of iso-surfaces. 5D.

Definition at line 32 of file TGL5DPainter.h.


struct  Surf_t

Public Types

typedef SurfList_t::const_iterator ConstSurfIter_t
enum  EDefaults { kNContours = 4, kNLowPts = 50 }
typedef Rgl::Mc::TIsoMesh< Float_tMesh_t
typedef SurfList_t::iterator SurfIter_t
typedef std::list< Surf_tSurfList_t
- Public Types inherited from TGLPlotPainter
enum  ECutAxisID { kXAxis = 7, kYAxis = 8, kZAxis = 9 }

Public Member Functions

 TGL5DPainter (TGL5DDataSet *data, TGLPlotCamera *camera, TGLPlotCoordinates *coord)
 Constructor. More...
void AddOption (const TString &option)
 No additional options for TGL5DPainter. More...
void AddSurface (Double_t v4)
 Add new surface. Simplified version for ged. More...
SurfIter_t AddSurface (Double_t v4, Color_t ci, Double_t isoVal=1., Double_t sigma=1., Double_t range=1e-3, Int_t lowNumOfPoints=kNLowPts)
 Try to add new iso-surface. More...
Double_t GetAlpha () const
Int_t GetNContours () const
char * GetPlotInfo (Int_t px, Int_t py)
 Return info for plot part under cursor. More...
Bool_t InitGeometry ()
 Create mesh. More...
Bool_t IsBoxCutShown () const
void Pan (Int_t px, Int_t py)
 Mouse events handler. More...
void ProcessEvent (Int_t event, Int_t px, Int_t py)
void RemoveSurface (SurfIter_t surf)
 Remove iso-surface. More...
void ResetGeometryRanges ()
 No need to create or delete meshes, number of meshes (iso-levels) are the same, but meshes must be rebuilt in new ranges. More...
void SetAlpha (Double_t newAlpha)
 Set selection range parameter. More...
void SetNContours (Int_t num)
 Set the number of predefined contours. More...
void ShowBoxCut (Bool_t show)
void StartPan (Int_t px, Int_t py)
 User clicks right mouse button (in a pad). More...
SurfIter_t SurfacesBegin ()
 std::list::begin. More...
SurfIter_t SurfacesEnd ()
 std::list::end. More...
- Public Member Functions inherited from TGLPlotPainter
 TGLPlotPainter (TGL5DDataSet *data, TGLPlotCamera *camera, TGLPlotCoordinates *coord)
 TGLPlotPainter's ctor. More...
 TGLPlotPainter (TGLPlotCamera *camera)
 TGLPlotPainter's ctor. More...
 TGLPlotPainter (TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coord, Bool_t xoySelectable, Bool_t xozSelectable, Bool_t yozSelectable)
 TGLPlotPainter's ctor. More...
Bool_t CutAxisSelected () const
Bool_t GetDrawAxes ()
void InvalidateSelection ()
 Selection must be updated. More...
virtual void Paint ()
 Draw lego/surf/whatever you can. More...
virtual Bool_t PlotSelected (Int_t px, Int_t py)
 Read color buffer content to find selected object. More...
const TGLPlotBoxRefBackBox () const
void SetDrawAxes (Bool_t s)
void SetDrawBackBox (Bool_t b)
void SetDrawFrontBox (Bool_t b)
virtual void SetFrameColor (const TColor *frameColor)
 Set plot's back box color. More...
void SetPadColor (const TColor *color)
 Used in a pad. More...
void SetPhysicalShapeColor (const Float_t *rgba)
- Public Member Functions inherited from TVirtualGLPainter
virtual ~TVirtualGLPainter ()

Private Types

typedef std::vector< Double_t >::size_type size_type

Private Member Functions

 TGL5DPainter (const TGL5DPainter &)
void DeInitGL () const
 Return some gl states to original values. More...
void DrawCloud () const
 Draw full cloud of points. More...
void DrawMesh (ConstSurfIter_t surf) const
 Draw one iso-surface. More...
void DrawPlot () const
 Draw a set of meshes. More...
void DrawSectionXOY () const
void DrawSectionXOZ () const
void DrawSectionYOZ () const
void DrawSubCloud (Double_t v4, Double_t range, Color_t ci) const
 Draw cloud for selected iso-surface. More...
void InitGL () const
 Initialize OpenGL state variables. More...
TGL5DPainteroperator= (const TGL5DPainter &)
void SetSurfaceColor (ConstSurfIter_t surf) const
 Set the color for iso-surface. More...

Private Attributes

Double_t fAlpha
const Surf_t fDummy
Bool_t fInit
SurfList_t fIsos
Rgl::Mc::TMeshBuilder< TKDEFGT, Float_tfMeshBuilder
Int_t fNContours
Bool_t fShowSlider
Rgl::Range_t fV5PredictedRange
Rgl::Range_t fV5SliderRange

Additional Inherited Members

- Protected Types inherited from TGLPlotPainter
enum  ESelectionBase { kHighColorSelectionBase = 7, kTrueColorSelectionBase = 10 }
- Protected Member Functions inherited from TGLPlotPainter
virtual void ClearBuffers () const
virtual void DrawPaletteAxis () const
 Draw. Palette. Axis. More...
void DrawSections () const
 Draw sections (if any). More...
const TColorGetPadColor () const
 Get pad color. More...
void MoveSection (Int_t px, Int_t py)
 Create dynamic profile using selected plane. More...
void PrintPlot () const
 Generate PS using gl2ps. More...
void RestoreModelviewMatrix () const
void RestoreProjectionMatrix () const
void SaveModelviewMatrix () const
void SaveProjectionMatrix () const
- Protected Attributes inherited from TGLPlotPainter
TGLPlotBox fBackBox
TGLBoxCut fBoxCut
Bool_t fDrawAxes
Bool_t fDrawPalette
Bool_t fHighColor
TPoint fMousePosition
Double_t fPadPhi
Double_t fPadTheta
const Float_tfPhysicalShapeColor
Int_t fSelectedPart
TGLSelectionBuffer fSelection
Int_t fSelectionBase
Bool_t fSelectionPass
Bool_t fUpdateSelection
Double_t fXOYSectionPos
Double_t fXOZSectionPos
Double_t fYOZSectionPos
std::vector< Double_tfZLevels

#include <TGL5DPainter.h>

Inheritance diagram for TGL5DPainter:

Member Typedef Documentation

◆ ConstSurfIter_t

typedef SurfList_t::const_iterator TGL5DPainter::ConstSurfIter_t

Definition at line 62 of file TGL5DPainter.h.

◆ Mesh_t

Definition at line 39 of file TGL5DPainter.h.

◆ size_type

typedef std::vector<Double_t>::size_type TGL5DPainter::size_type

Definition at line 74 of file TGL5DPainter.h.

◆ SurfIter_t

typedef SurfList_t::iterator TGL5DPainter::SurfIter_t

Definition at line 61 of file TGL5DPainter.h.

◆ SurfList_t

typedef std::list<Surf_t> TGL5DPainter::SurfList_t

Definition at line 60 of file TGL5DPainter.h.

Member Enumeration Documentation

◆ EDefaults


Definition at line 34 of file TGL5DPainter.h.

Constructor & Destructor Documentation

◆ TGL5DPainter() [1/2]

TGL5DPainter::TGL5DPainter ( TGL5DDataSet data,
TGLPlotCamera camera,
TGLPlotCoordinates coord 


Definition at line 35 of file TGL5DPainter.cxx.

◆ TGL5DPainter() [2/2]

TGL5DPainter::TGL5DPainter ( const TGL5DPainter )

Member Function Documentation

◆ AddOption()

void TGL5DPainter::AddOption ( const TString option)

No additional options for TGL5DPainter.

Implements TGLPlotPainter.

Definition at line 240 of file TGL5DPainter.cxx.

◆ AddSurface() [1/2]

void TGL5DPainter::AddSurface ( Double_t  v4)

Add new surface. Simplified version for ged.

Definition at line 101 of file TGL5DPainter.cxx.

◆ AddSurface() [2/2]

TGL5DPainter::SurfIter_t TGL5DPainter::AddSurface ( Double_t  v4,
Color_t  ci,
Double_t  iso = 1.,
Double_t  sigma = 1.,
Double_t  range = 1e-3,
Int_t  lownps = kNLowPts 

Try to add new iso-surface.

If something goes wrong, return iterator to the end of fIsos.

Definition at line 53 of file TGL5DPainter.cxx.

◆ DeInitGL()

void TGL5DPainter::DeInitGL ( ) const

Return some gl states to original values.

Implements TGLPlotPainter.

Definition at line 368 of file TGL5DPainter.cxx.

◆ DrawCloud()

void TGL5DPainter::DrawCloud ( ) const

Draw full cloud of points.

Definition at line 464 of file TGL5DPainter.cxx.

◆ DrawMesh()

void TGL5DPainter::DrawMesh ( ConstSurfIter_t  surf) const

Draw one iso-surface.

Definition at line 517 of file TGL5DPainter.cxx.

◆ DrawPlot()

void TGL5DPainter::DrawPlot ( ) const

Draw a set of meshes.

Implements TGLPlotPainter.

Definition at line 380 of file TGL5DPainter.cxx.

◆ DrawSectionXOY()

void TGL5DPainter::DrawSectionXOY ( ) const

Implements TGLPlotPainter.

Definition at line 126 of file TGL5DPainter.h.

◆ DrawSectionXOZ()

void TGL5DPainter::DrawSectionXOZ ( ) const

Implements TGLPlotPainter.

Definition at line 124 of file TGL5DPainter.h.

◆ DrawSectionYOZ()

void TGL5DPainter::DrawSectionYOZ ( ) const

Implements TGLPlotPainter.

Definition at line 125 of file TGL5DPainter.h.

◆ DrawSubCloud()

void TGL5DPainter::DrawSubCloud ( Double_t  v4,
Double_t  range,
Color_t  ci 
) const

Draw cloud for selected iso-surface.

Definition at line 489 of file TGL5DPainter.cxx.

◆ GetAlpha()

Double_t TGL5DPainter::GetAlpha ( ) const

Definition at line 106 of file TGL5DPainter.h.

◆ GetNContours()

Int_t TGL5DPainter::GetNContours ( ) const

Definition at line 109 of file TGL5DPainter.h.

◆ GetPlotInfo()

char * TGL5DPainter::GetPlotInfo ( Int_t  px,
Int_t  py 

Return info for plot part under cursor.

Implements TVirtualGLPainter.

Definition at line 130 of file TGL5DPainter.cxx.

◆ InitGeometry()

Bool_t TGL5DPainter::InitGeometry ( )

Create mesh.

InitGeometry creates surfaces for auto-iso levels. Called the first time and each time number of auto-levels is reset via the editor.

Implements TGLPlotPainter.

Definition at line 142 of file TGL5DPainter.cxx.

◆ InitGL()

void TGL5DPainter::InitGL ( ) const

Initialize OpenGL state variables.

Implements TGLPlotPainter.

Definition at line 356 of file TGL5DPainter.cxx.

◆ IsBoxCutShown()

Bool_t TGL5DPainter::IsBoxCutShown ( ) const

Definition at line 103 of file TGL5DPainter.h.

◆ operator=()

TGL5DPainter& TGL5DPainter::operator= ( const TGL5DPainter )

◆ Pan()

void TGL5DPainter::Pan ( Int_t  px,
Int_t  py 

Mouse events handler.

Implements TVirtualGLPainter.

Definition at line 201 of file TGL5DPainter.cxx.

◆ ProcessEvent()

void TGL5DPainter::ProcessEvent ( Int_t  event,
Int_t  px,
Int_t  py 

Implements TGLPlotPainter.

Definition at line 246 of file TGL5DPainter.cxx.

◆ RemoveSurface()

void TGL5DPainter::RemoveSurface ( SurfIter_t  surf)

Remove iso-surface.

Definition at line 117 of file TGL5DPainter.cxx.

◆ ResetGeometryRanges()

void TGL5DPainter::ResetGeometryRanges ( )

No need to create or delete meshes, number of meshes (iso-levels) are the same, but meshes must be rebuilt in new ranges.

Only in cartesian.

Definition at line 305 of file TGL5DPainter.cxx.

◆ SetAlpha()

void TGL5DPainter::SetAlpha ( Double_t  newAlpha)

Set selection range parameter.

Definition at line 271 of file TGL5DPainter.cxx.

◆ SetNContours()

void TGL5DPainter::SetNContours ( Int_t  num)

Set the number of predefined contours.

Definition at line 286 of file TGL5DPainter.cxx.

◆ SetSurfaceColor()

void TGL5DPainter::SetSurfaceColor ( ConstSurfIter_t  surf) const

Set the color for iso-surface.

Definition at line 449 of file TGL5DPainter.cxx.

◆ ShowBoxCut()

void TGL5DPainter::ShowBoxCut ( Bool_t  show)

Definition at line 102 of file TGL5DPainter.h.

◆ StartPan()

void TGL5DPainter::StartPan ( Int_t  px,
Int_t  py 

User clicks right mouse button (in a pad).

Implements TGLPlotPainter.

Definition at line 190 of file TGL5DPainter.cxx.

◆ SurfacesBegin()

TGL5DPainter::SurfIter_t TGL5DPainter::SurfacesBegin ( )


Definition at line 340 of file TGL5DPainter.cxx.

◆ SurfacesEnd()

TGL5DPainter::SurfIter_t TGL5DPainter::SurfacesEnd ( )


Definition at line 348 of file TGL5DPainter.cxx.

Member Data Documentation

◆ fAlpha

Double_t TGL5DPainter::fAlpha

Definition at line 80 of file TGL5DPainter.h.

◆ fData

TGL5DDataSet* TGL5DPainter::fData

Definition at line 72 of file TGL5DPainter.h.

◆ fDummy

const Surf_t TGL5DPainter::fDummy

Definition at line 68 of file TGL5DPainter.h.

◆ fInit

Bool_t TGL5DPainter::fInit

Definition at line 69 of file TGL5DPainter.h.

◆ fIsos

SurfList_t TGL5DPainter::fIsos

Definition at line 71 of file TGL5DPainter.h.

◆ fKDE


Definition at line 65 of file TGL5DPainter.h.

◆ fMeshBuilder

Rgl::Mc::TMeshBuilder<TKDEFGT, Float_t> TGL5DPainter::fMeshBuilder

Definition at line 66 of file TGL5DPainter.h.

◆ fNContours

Int_t TGL5DPainter::fNContours

Definition at line 81 of file TGL5DPainter.h.

◆ fShowSlider

Bool_t TGL5DPainter::fShowSlider

Definition at line 78 of file TGL5DPainter.h.

◆ fV5PredictedRange

Rgl::Range_t TGL5DPainter::fV5PredictedRange

Definition at line 76 of file TGL5DPainter.h.

◆ fV5SliderRange

Rgl::Range_t TGL5DPainter::fV5SliderRange

Definition at line 77 of file TGL5DPainter.h.

The documentation for this class was generated from the following files: