Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGLVoxelPainter Class Reference

Paint TH3 histograms as "voxels" - colored boxes, transparent if transfer function was specified.

Definition at line 15 of file TGLVoxelPainter.h.

Public Member Functions

 TGLVoxelPainter (TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coord)
 Constructor.
 
void AddOption (const TString &stringOption)
 "z" draw palette or not.
 
char * GetPlotInfo (Int_t px, Int_t py)
 Show box info (i, j, k, binContent).
 
Bool_t InitGeometry ()
 Set ranges, find min and max bin content.
 
virtual TClassIsA () const
 
void Pan (Int_t px, Int_t py)
 User's moving mouse cursor, with middle mouse button pressed (for pad).
 
void ProcessEvent (Int_t event, Int_t px, Int_t py)
 Remove sections, switch on/off box cut.
 
void StartPan (Int_t px, Int_t py)
 User clicks right mouse button (in a pad).
 
virtual void Streamer (TBuffer &)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TGLPlotPainter
 TGLPlotPainter (TGL5DDataSet *data, TGLPlotCamera *camera, TGLPlotCoordinates *coord)
 TGLPlotPainter's ctor.
 
 TGLPlotPainter (TGLPlotCamera *camera)
 TGLPlotPainter's ctor.
 
 TGLPlotPainter (TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coord, Bool_t xoySelectable, Bool_t xozSelectable, Bool_t yozSelectable)
 TGLPlotPainter's ctor.
 
Bool_t CutAxisSelected () const
 
Bool_t GetDrawAxes ()
 
void InvalidateSelection ()
 Selection must be updated.
 
virtual void Paint ()
 Draw lego/surf/whatever you can.
 
virtual Bool_t PlotSelected (Int_t px, Int_t py)
 Read color buffer content to find selected object.
 
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.
 
void SetPadColor (const TColor *color)
 Used in a pad.
 
void SetPhysicalShapeColor (const Float_t *rgba)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TVirtualGLPainter
virtual ~TVirtualGLPainter ()
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TGLPlotPainter
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from TVirtualGLPainter
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 

Private Member Functions

 TGLVoxelPainter (const TGLVoxelPainter &)=delete
 
void DeInitGL () const
 Return back some gl state variables.
 
void DrawPalette () const
 Draw. Palette.
 
void DrawPaletteAxis () const
 Draw. Palette. Axis.
 
void DrawPlot () const
 Draw "voxels".
 
void DrawSectionXOY () const
 Noop.
 
void DrawSectionXOZ () const
 Noop.
 
void DrawSectionYOZ () const
 Noop.
 
void FindVoxelColor (Double_t binContent, Float_t *rgba) const
 Find box color.
 
Bool_t HasSections () const
 
void InitGL () const
 Initialize some gl state variables.
 
TGLVoxelPainteroperator= (const TGLVoxelPainter &)=delete
 
void PreparePalette () const
 Generate palette.
 
void SetVoxelColor (const Float_t *rgba) const
 Set box color.
 

Private Attributes

std::vector< Double_tfLevels
 
Rgl::Range_t fMinMaxVal
 
TGLLevelPalette fPalette
 
TString fPlotInfo
 
TF1fTransferFunc
 

Additional Inherited Members

- Public Types inherited from TGLPlotPainter
enum  ECutAxisID { kXAxis = 7 , kYAxis = 8 , kZAxis = 9 }
 
- Protected Types inherited from TGLPlotPainter
enum  ESelectionBase { kHighColorSelectionBase = 7 , kTrueColorSelectionBase = 10 }
 
- Protected Member Functions inherited from TGLPlotPainter
virtual void ClearBuffers () const
 
void DrawSections () const
 Draw sections (if any).
 
const TColorGetPadColor () const
 Get pad color.
 
void MoveSection (Int_t px, Int_t py)
 Create dynamic profile using selected plane.
 
void PrintPlot () const
 Generate PS using gl2ps.
 
void RestoreModelviewMatrix () const
 
void RestoreProjectionMatrix () const
 
void SaveModelviewMatrix () const
 
void SaveProjectionMatrix () const
 
- Protected Attributes inherited from TGLPlotPainter
TGLPlotBox fBackBox
 
TGLBoxCut fBoxCut
 
TGLPlotCamerafCamera
 
TGLPlotCoordinatesfCoord
 
Bool_t fDrawAxes
 
Bool_t fDrawPalette
 
Bool_t fHighColor
 
TH1fHist
 
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
 
TAxisfXAxis
 
Double_t fXOYSectionPos
 
Double_t fXOZSectionPos
 
TAxisfYAxis
 
Double_t fYOZSectionPos
 
TAxisfZAxis
 
std::vector< Double_tfZLevels
 

#include <TGLVoxelPainter.h>

Inheritance diagram for TGLVoxelPainter:
[legend]

Constructor & Destructor Documentation

◆ TGLVoxelPainter() [1/2]

TGLVoxelPainter::TGLVoxelPainter ( const TGLVoxelPainter )
privatedelete

◆ TGLVoxelPainter() [2/2]

TGLVoxelPainter::TGLVoxelPainter ( TH1 hist,
TGLPlotCamera cam,
TGLPlotCoordinates coord 
)

Constructor.

This plot always needs a palette.

Definition at line 28 of file TGLVoxelPainter.cxx.

Member Function Documentation

◆ AddOption()

void TGLVoxelPainter::AddOption ( const TString stringOption)
virtual

"z" draw palette or not.

Implements TGLPlotPainter.

Definition at line 169 of file TGLVoxelPainter.cxx.

◆ Class()

static TClass * TGLVoxelPainter::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TGLVoxelPainter::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t TGLVoxelPainter::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 61 of file TGLVoxelPainter.h.

◆ DeclFileName()

static const char * TGLVoxelPainter::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 61 of file TGLVoxelPainter.h.

◆ DeInitGL()

void TGLVoxelPainter::DeInitGL ( ) const
privatevirtual

Return back some gl state variables.

Implements TGLPlotPainter.

Definition at line 215 of file TGLVoxelPainter.cxx.

◆ DrawPalette()

void TGLVoxelPainter::DrawPalette ( ) const
private

Draw. Palette.

Definition at line 354 of file TGLVoxelPainter.cxx.

◆ DrawPaletteAxis()

void TGLVoxelPainter::DrawPaletteAxis ( ) const
privatevirtual

Draw. Palette. Axis.

Reimplemented from TGLPlotPainter.

Definition at line 373 of file TGLVoxelPainter.cxx.

◆ DrawPlot()

void TGLVoxelPainter::DrawPlot ( ) const
privatevirtual

Draw "voxels".

Implements TGLPlotPainter.

Definition at line 227 of file TGLVoxelPainter.cxx.

◆ DrawSectionXOY()

void TGLVoxelPainter::DrawSectionXOY ( ) const
privatevirtual

Noop.

Implements TGLPlotPainter.

Definition at line 347 of file TGLVoxelPainter.cxx.

◆ DrawSectionXOZ()

void TGLVoxelPainter::DrawSectionXOZ ( ) const
privatevirtual

Noop.

Implements TGLPlotPainter.

Definition at line 332 of file TGLVoxelPainter.cxx.

◆ DrawSectionYOZ()

void TGLVoxelPainter::DrawSectionYOZ ( ) const
privatevirtual

Noop.

Implements TGLPlotPainter.

Definition at line 339 of file TGLVoxelPainter.cxx.

◆ FindVoxelColor()

void TGLVoxelPainter::FindVoxelColor ( Double_t  binContent,
Float_t rgba 
) const
private

Find box color.

Definition at line 425 of file TGLVoxelPainter.cxx.

◆ GetPlotInfo()

char * TGLVoxelPainter::GetPlotInfo ( Int_t  px,
Int_t  py 
)
virtual

Show box info (i, j, k, binContent).

Implements TVirtualGLPainter.

Definition at line 39 of file TGLVoxelPainter.cxx.

◆ HasSections()

Bool_t TGLVoxelPainter::HasSections ( ) const
private

◆ InitGeometry()

Bool_t TGLVoxelPainter::InitGeometry ( )
virtual

Set ranges, find min and max bin content.

Implements TGLPlotPainter.

Definition at line 68 of file TGLVoxelPainter.cxx.

◆ InitGL()

void TGLVoxelPainter::InitGL ( ) const
privatevirtual

Initialize some gl state variables.

Implements TGLPlotPainter.

Definition at line 200 of file TGLVoxelPainter.cxx.

◆ IsA()

virtual TClass * TGLVoxelPainter::IsA ( ) const
inlinevirtual
Returns
TClass describing current object

Reimplemented from TGLPlotPainter.

Definition at line 61 of file TGLVoxelPainter.h.

◆ operator=()

TGLVoxelPainter & TGLVoxelPainter::operator= ( const TGLVoxelPainter )
privatedelete

◆ Pan()

void TGLVoxelPainter::Pan ( Int_t  px,
Int_t  py 
)
virtual

User's moving mouse cursor, with middle mouse button pressed (for pad).

Calculate 3d shift related to 2d mouse movement.

Implements TVirtualGLPainter.

Definition at line 123 of file TGLVoxelPainter.cxx.

◆ PreparePalette()

void TGLVoxelPainter::PreparePalette ( ) const
private

Generate palette.

Definition at line 384 of file TGLVoxelPainter.cxx.

◆ ProcessEvent()

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

Remove sections, switch on/off box cut.

Implements TGLPlotPainter.

Definition at line 178 of file TGLVoxelPainter.cxx.

◆ SetVoxelColor()

void TGLVoxelPainter::SetVoxelColor ( const Float_t rgba) const
private

Set box color.

Definition at line 444 of file TGLVoxelPainter.cxx.

◆ StartPan()

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

User clicks right mouse button (in a pad).

Implements TGLPlotPainter.

Definition at line 110 of file TGLVoxelPainter.cxx.

◆ Streamer()

virtual void TGLVoxelPainter::Streamer ( TBuffer )
virtual

Reimplemented from TGLPlotPainter.

◆ StreamerNVirtual()

void TGLVoxelPainter::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 61 of file TGLVoxelPainter.h.

Member Data Documentation

◆ fLevels

std::vector<Double_t> TGLVoxelPainter::fLevels
mutableprivate

Definition at line 25 of file TGLVoxelPainter.h.

◆ fMinMaxVal

Rgl::Range_t TGLVoxelPainter::fMinMaxVal
private

Definition at line 19 of file TGLVoxelPainter.h.

◆ fPalette

TGLLevelPalette TGLVoxelPainter::fPalette
mutableprivate

Definition at line 24 of file TGLVoxelPainter.h.

◆ fPlotInfo

TString TGLVoxelPainter::fPlotInfo
private

Definition at line 18 of file TGLVoxelPainter.h.

◆ fTransferFunc

TF1* TGLVoxelPainter::fTransferFunc
private

Definition at line 59 of file TGLVoxelPainter.h.

Libraries for TGLVoxelPainter:

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