ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
TGL5DPainter Class Reference

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

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

Definition at line 42 of file TGL5DPainter.h.

Classes

struct  Surf_t
 

Public Types

enum  EDefaults { kNContours = 4, kNLowPts = 50 }
 
typedef Rgl::Mc::TIsoMesh
< Float_t
Mesh_t
 
typedef std::list< Surf_tSurfList_t
 
typedef SurfList_t::iterator SurfIter_t
 
typedef SurfList_t::const_iterator ConstSurfIter_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...
 
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...
 
void AddSurface (Double_t v4)
 Add new surface. Simplified version for ged. More...
 
void RemoveSurface (SurfIter_t surf)
 Remove iso-surface. More...
 
char * GetPlotInfo (Int_t px, Int_t py)
 Return info for plot part under cursor. More...
 
Bool_t InitGeometry ()
 Create mesh. More...
 
void StartPan (Int_t px, Int_t py)
 User clicks right mouse button (in a pad). More...
 
void Pan (Int_t px, Int_t py)
 Mouse events handler. More...
 
void AddOption (const TString &option)
 No additional options for TGL5DPainter. More...
 
void ProcessEvent (Int_t event, Int_t px, Int_t py)
 
void ShowBoxCut (Bool_t show)
 
Bool_t IsBoxCutShown () const
 
void SetAlpha (Double_t newAlpha)
 Set selection range parameter. More...
 
Double_t GetAlpha () const
 
void SetNContours (Int_t num)
 Set the number of predefined contours. More...
 
Int_t GetNContours () const
 
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...
 
SurfIter_t SurfacesBegin ()
 std::list::begin. More...
 
SurfIter_t SurfacesEnd ()
 std::list::end. More...
 
- Public Member Functions inherited from TGLPlotPainter
 TGLPlotPainter (TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coord, Bool_t xoySelectable, Bool_t xozSelectable, Bool_t yozSelectable)
 
 TGLPlotPainter (TGL5DDataSet *data, TGLPlotCamera *camera, TGLPlotCoordinates *coord)
 TGLPlotPainter's ctor. More...
 
 TGLPlotPainter (TGLPlotCamera *camera)
 TGLPlotPainter's ctor. More...
 
const TGLPlotBoxRefBackBox () const
 
void SetPhysicalShapeColor (const Float_t *rgba)
 
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...
 
void SetPadColor (const TColor *color)
 Used in a pad. More...
 
virtual void SetFrameColor (const TColor *frameColor)
 Set plot's back box color. More...
 
void InvalidateSelection ()
 Selection must be updated. More...
 
Bool_t CutAxisSelected () const
 
void SetDrawFrontBox (Bool_t b)
 
void SetDrawBackBox (Bool_t b)
 
void SetDrawAxes (Bool_t s)
 
Bool_t GetDrawAxes ()
 
- Public Member Functions inherited from TVirtualGLPainter
virtual ~TVirtualGLPainter ()
 
 ClassDef (TVirtualGLPainter, 0)
 

Private Types

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

Private Member Functions

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

Private Attributes

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

Additional Inherited Members

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

#include <TGL5DPainter.h>

Inheritance diagram for TGL5DPainter:
[legend]

Member Typedef Documentation

typedef SurfList_t::const_iterator TGL5DPainter::ConstSurfIter_t

Definition at line 72 of file TGL5DPainter.h.

Definition at line 49 of file TGL5DPainter.h.

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

Definition at line 84 of file TGL5DPainter.h.

typedef SurfList_t::iterator TGL5DPainter::SurfIter_t

Definition at line 71 of file TGL5DPainter.h.

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

Definition at line 70 of file TGL5DPainter.h.

Member Enumeration Documentation

Enumerator
kNContours 
kNLowPts 

Definition at line 44 of file TGL5DPainter.h.

Constructor & Destructor Documentation

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

Constructor.

Definition at line 36 of file TGL5DPainter.cxx.

TGL5DPainter::TGL5DPainter ( const TGL5DPainter )
private

Member Function Documentation

void TGL5DPainter::AddOption ( const TString option)
virtual

No additional options for TGL5DPainter.

Implements TGLPlotPainter.

Definition at line 241 of file TGL5DPainter.cxx.

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 54 of file TGL5DPainter.cxx.

Referenced by TGL5DDataSetEditor::AddNewSurface(), AddSurface(), and InitGeometry().

void TGL5DPainter::AddSurface ( Double_t  v4)

Add new surface. Simplified version for ged.

Definition at line 102 of file TGL5DPainter.cxx.

void TGL5DPainter::DeInitGL ( ) const
privatevirtual

Return some gl states to original values.

Implements TGLPlotPainter.

Definition at line 369 of file TGL5DPainter.cxx.

void TGL5DPainter::DrawCloud ( ) const
private

Draw full cloud of points.

Definition at line 465 of file TGL5DPainter.cxx.

Referenced by DrawPlot().

void TGL5DPainter::DrawMesh ( ConstSurfIter_t  surf) const
private

Draw one iso-surface.

Definition at line 518 of file TGL5DPainter.cxx.

Referenced by DrawPlot().

void TGL5DPainter::DrawPlot ( ) const
privatevirtual

Draw a set of meshes.

Implements TGLPlotPainter.

Definition at line 381 of file TGL5DPainter.cxx.

void TGL5DPainter::DrawSectionXOY ( ) const
inlineprivatevirtual

Implements TGLPlotPainter.

Definition at line 136 of file TGL5DPainter.h.

void TGL5DPainter::DrawSectionXOZ ( ) const
inlineprivatevirtual

Implements TGLPlotPainter.

Definition at line 134 of file TGL5DPainter.h.

void TGL5DPainter::DrawSectionYOZ ( ) const
inlineprivatevirtual

Implements TGLPlotPainter.

Definition at line 135 of file TGL5DPainter.h.

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

Draw cloud for selected iso-surface.

Definition at line 490 of file TGL5DPainter.cxx.

Double_t TGL5DPainter::GetAlpha ( ) const
inline
Int_t TGL5DPainter::GetNContours ( ) const
inline
char * TGL5DPainter::GetPlotInfo ( Int_t  px,
Int_t  py 
)
virtual

Return info for plot part under cursor.

Implements TVirtualGLPainter.

Definition at line 131 of file TGL5DPainter.cxx.

Bool_t TGL5DPainter::InitGeometry ( )
virtual

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 143 of file TGL5DPainter.cxx.

Referenced by SetAlpha(), and SetNContours().

void TGL5DPainter::InitGL ( ) const
privatevirtual

Initialize OpenGL state variables.

Implements TGLPlotPainter.

Definition at line 357 of file TGL5DPainter.cxx.

Bool_t TGL5DPainter::IsBoxCutShown ( ) const
inline

Definition at line 113 of file TGL5DPainter.h.

Referenced by TGL5DDataSetEditor::SetStyleTabWidgets().

TGL5DPainter& TGL5DPainter::operator= ( const TGL5DPainter )
private
void TGL5DPainter::Pan ( Int_t  px,
Int_t  py 
)
virtual

Mouse events handler.

Implements TVirtualGLPainter.

Definition at line 202 of file TGL5DPainter.cxx.

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

Implements TGLPlotPainter.

Definition at line 247 of file TGL5DPainter.cxx.

void TGL5DPainter::RemoveSurface ( SurfIter_t  surf)

Remove iso-surface.

Definition at line 118 of file TGL5DPainter.cxx.

Referenced by TGL5DDataSetEditor::RemoveSurface().

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 306 of file TGL5DPainter.cxx.

Referenced by TGL5DDataSetEditor::ApplyGridParameters().

void TGL5DPainter::SetAlpha ( Double_t  newAlpha)

Set selection range parameter.

Definition at line 272 of file TGL5DPainter.cxx.

Referenced by TGL5DDataSetEditor::ApplyAlpha().

void TGL5DPainter::SetNContours ( Int_t  num)

Set the number of predefined contours.

Definition at line 287 of file TGL5DPainter.cxx.

Referenced by TGL5DDataSetEditor::ApplyPlanes().

void TGL5DPainter::SetSurfaceColor ( ConstSurfIter_t  surf) const
private

Set the color for iso-surface.

Definition at line 450 of file TGL5DPainter.cxx.

Referenced by DrawPlot().

void TGL5DPainter::ShowBoxCut ( Bool_t  show)
inline

Definition at line 112 of file TGL5DPainter.h.

Referenced by TGL5DDataSetEditor::BoxCutToggled().

void TGL5DPainter::StartPan ( Int_t  px,
Int_t  py 
)
virtual

User clicks right mouse button (in a pad).

Implements TGLPlotPainter.

Definition at line 191 of file TGL5DPainter.cxx.

TGL5DPainter::SurfIter_t TGL5DPainter::SurfacesBegin ( )

std::list::begin.

Definition at line 341 of file TGL5DPainter.cxx.

Referenced by TGL5DDataSetEditor::SetIsoTabWidgets().

TGL5DPainter::SurfIter_t TGL5DPainter::SurfacesEnd ( )

std::list::end.

Definition at line 349 of file TGL5DPainter.cxx.

Referenced by TGL5DDataSetEditor::SetIsoTabWidgets().

Member Data Documentation

Double_t TGL5DPainter::fAlpha
private

Definition at line 90 of file TGL5DPainter.h.

Referenced by AddSurface(), GetAlpha(), InitGeometry(), and SetAlpha().

TGL5DDataSet* TGL5DPainter::fData
private
const Surf_t TGL5DPainter::fDummy
private

Definition at line 78 of file TGL5DPainter.h.

Referenced by AddSurface().

Bool_t TGL5DPainter::fInit
private

Definition at line 79 of file TGL5DPainter.h.

Referenced by InitGeometry(), SetAlpha(), and SetNContours().

SurfList_t TGL5DPainter::fIsos
private
TKDEFGT TGL5DPainter::fKDE
private

Definition at line 75 of file TGL5DPainter.h.

Referenced by AddSurface(), and ResetGeometryRanges().

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

Definition at line 76 of file TGL5DPainter.h.

Referenced by AddSurface(), and ResetGeometryRanges().

Int_t TGL5DPainter::fNContours
private

Definition at line 91 of file TGL5DPainter.h.

Referenced by AddSurface(), GetNContours(), InitGeometry(), SetNContours(), and TGL5DPainter().

Bool_t TGL5DPainter::fShowSlider
private

Definition at line 88 of file TGL5DPainter.h.

Rgl::Range_t TGL5DPainter::fV5PredictedRange
private

Definition at line 86 of file TGL5DPainter.h.

Rgl::Range_t TGL5DPainter::fV5SliderRange
private

Definition at line 87 of file TGL5DPainter.h.

Collaboration diagram for TGL5DPainter:
[legend]

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