library: libRGL
#include "TGLHistPainter.h"

TGLHistPainter


class description - source file - inheritance tree (.pdf)

class TGLHistPainter : public TVirtualHistPainter, public TVirtualGLPainter

Inheritance Chart:
TObject
<-
TVirtualHistPainter
TVirtualGLPainter
<-
TGLHistPainter
    private:
TGLHistPainter(const TGLHistPainter&) void AdjustScales() void ClearBuffer() const void DrawAxes(Int_t frontPoint) const void DrawBackPlane(Int_t plane) const static void DrawBoxFront(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t frontPoint) void DrawBoxFrontTextured(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t frontPoint) const static void DrawFace(const TGLVertex3& v1, const TGLVertex3& v2, const TGLVertex3& v3, const TGLVector3& norm1, const TGLVector3& norm2, const TGLVector3& norm3) static void DrawFaceTextured(const TGLVertex3& v1, const TGLVertex3& v2, const TGLVertex3& v3, const TGLVector3& norm1, const TGLVector3& norm2, const TGLVector3& norm3, Double_t zMin, Double_t zMax) static void DrawFlatFace(const TGLVertex3& v1, const TGLVertex3& v2, const TGLVertex3& v3, const TGLVector3& normal) void DrawFrame(Int_t frontPoint) const void DrawGrid(Int_t plane) const void DrawLegoProfileX(Int_t plane) const void DrawLegoProfileY(Int_t plane) const void DrawProfile(Int_t plane) const static void DrawQuadOutline(const TGLVertex3& v1, const TGLVertex3& v2, const TGLVertex3& v3, const TGLVertex3& v4) void DrawSurfaceProfileX(Int_t plane) const void DrawSurfaceProfileY(Int_t plane) const void DrawZeroPlane() const void FillVertices() Int_t FrontPoint() const TGLHistPainter::PD_t GetMaxColumnContent(Int_t column) const TGLHistPainter::PD_t GetMaxRowContent(Int_t row) const static TGLHistPainter::EGLPaintOption GetPaintOption(const TString& option) void InitDefaultPainter() void InitGL() const Bool_t InitPainter() void InitTexture() TGLHistPainter& operator=(const TGLHistPainter&) void PaintLego() const void PaintLego2() const void PaintSurface() const void PaintSurface1() const void PaintSurface4() const Bool_t Select(Int_t x, Int_t y) const void SelectAxes(Int_t front, Int_t x, Int_t y) const void SetAverageNormals() static Bool_t SetAxisRange(const TAxis* axis, Bool_t log, Int_t& first, Int_t& last, Double_t& min, Double_t& max) void SetCamera() const void SetGLParameters() void SetNormals() Bool_t SetSizes() void SetTransformation() const void SetZLevels() public:
TGLHistPainter(TH1* hist) ~TGLHistPainter() static TClass* Class() virtual Int_t DistancetoPrimitive(Int_t px, Int_t py) virtual void DrawPanel() virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py) virtual void FitPanel() virtual TList* GetContourList(Double_t contour) const virtual char* GetObjectInfo(Int_t px, Int_t py) const virtual TList* GetStack() const virtual TClass* IsA() const virtual Bool_t IsInside(Int_t x, Int_t y) virtual Bool_t IsInside(Double_t x, Double_t y) virtual Int_t MakeCuts(char* cutsOpt) virtual void Paint(Option_t* option) virtual void Paint() virtual void PaintStat(Int_t dostat, TF1* fit) virtual void ProcessMessage(const char* mess, const TObject* obj) virtual void SetHistogram(TH1* hist) virtual void SetStack(TList* stack) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)

Data Members

    private:
TVirtualHistPainter* fDefaultPainter TH1* fHist TGLHistPainter::EGLPaintOption fLastOption TAxis* fAxisX TAxis* fAxisY TAxis* fAxisZ Double_t fMinX Double_t fMaxX Double_t fScaleX Double_t fMinXScaled Double_t fMaxXScaled Double_t fMinY Double_t fMaxY Double_t fScaleY Double_t fMinYScaled Double_t fMaxYScaled Double_t fMinZ Double_t fMaxZ Double_t fScaleZ Double_t fMinZScaled Double_t fMaxZScaled Double_t fFactor TArcBall fRotation Double_t fFrustum[4] Double_t fCenter[3] Double_t fShift Int_t fViewport[4] Int_t fFirstBinX Int_t fLastBinX Int_t fFirstBinY Int_t fLastBinY Bool_t fLogX Bool_t fLogY Bool_t fLogZ vector<Double_t> fX vector<Double_t> fY Root_GL::T2DArray<TGLVertex3> fMesh Root_GL::T2DArray<pair<TGLVector3,TGLVector3> > fFaceNormals Root_GL::T2DArray<TGLVector3> fAverageNormals vector<Double_t> fZLevels Int_t fGLDevice TGLVertex3 f2DAxes[8] Bool_t f2DPass UInt_t fTextureName UChar_t fTexture[64] public:
static const enum TGLHistPainter:: kTexLength static const TGLHistPainter::EGLPaintOption kLego static const TGLHistPainter::EGLPaintOption kLego2 static const TGLHistPainter::EGLPaintOption kSurface static const TGLHistPainter::EGLPaintOption kSurface1 static const TGLHistPainter::EGLPaintOption kSurface2 static const TGLHistPainter::EGLPaintOption kSurface4 static const TGLHistPainter::EGLPaintOption kUnsupported

Class Description


~TGLHistPainter()

Int_t DistancetoPrimitive(Int_t px, Int_t py)
If fLastOption != kUnsupported, try to select hist or axis.
if not - gPad is selected (there are problems with TF2)

void DrawPanel()
FIX

void ExecuteEvent(Int_t event, Int_t px, Int_t py)
If FLastOption == kUnsupported, delegate call.
If not, try to process itself

void FitPanel()
FIX

TList* GetContourList(Double_t contour)const
FIX

char* GetObjectInfo(Int_t px, Int_t py)const
FIX

TList* GetStack()const
FIX

Bool_t IsInside(Int_t x, Int_t y)
FIX

Bool_t IsInside(Double_t x, Double_t y)
FIX

void PaintStat(Int_t dostat, TF1 *fit)
FIX

void ProcessMessage(const char *mess, const TObject *obj)
FIX

void SetHistogram(TH1 *hist)
FIX

void SetStack(TList *stack)
FIX

Int_t MakeCuts(char *cutsOpt)
FIX

void InitDefaultPainter()
FIX

void Paint(Option_t *o)
Final-overrider for TOvject's Paint, checks, if
painter can draw itself or should pass to default painter

void Paint()
Paint method, which is indirectly called by gGLManager
at this moment, MakeCurrent must be done already for fGLDevice

Bool_t InitPainter()
It's clear :)

Bool_t SetSizes()
Having TH1 pointer, setup min/max sizes and scales

Bool_t SetAxisRange(const TAxis *axis, Bool_t log, Int_t &first, Int_t &last, Double_t &min, Double_t &max)
Sets-up parameters for X or Y axis

void AdjustScales()
Finds the maximum dimension and adjust scale coefficients

void FillVertices()
Calculates table of X and Y for lego (Z is obtained during drawing) or
calculate mesh of triangles with vertices in the centres of bins

void SetNormals()
Calculates normals for triangles in surface.
"flat" normals == 1 normal per triangle
we have : four points (cell contents of four neighbouring hist bins)
but only three points are shurely in one plane, so build 2 triangles and their normals

void SetAverageNormals()
Calculate averaged normals.
"averaged" normals == normal per vertex
This normal is average of
neighbouring triangles normals

void InitGL()const
Simple gl initialization

void PaintLego()const
Draws lego and "profiles" on the back planes

void PaintLego2()const
Draws lego2 and "profiles" on the back planes

void PaintSurface()const
Draws surface as a set of triangles, each triangle has one normal

void PaintSurface4()const
Draws surface with "averaged" normals
If you have nearly smooth surface, it will be smooth :)

void PaintSurface1()const
Paints surf1/surf2 options

void SetGLParameters()
Sets viewport, bounds for arcball
Calculates arguments for glOrtho
Claculates center of scene and shift

void DrawBoxFront(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t fp)
Draws lego's bar as 3d box

void DrawBoxFrontTextured(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Double_t zmin, Double_t zmax, Int_t fp)const
Draws lego's bar as 3d box

void DrawFlatFace(const TGLVertex3 &v1, const TGLVertex3 &v2, const TGLVertex3 &v3, const TGLVector3 &norm)
Draws triangle flat face, one normal per face

void DrawFace(const TGLVertex3 &v1, const TGLVertex3 &v2, const TGLVertex3 &v3, const TGLVector3 &norm1, const TGLVector3 &norm2, const TGLVector3 &norm3)
Draws triangle face, each vertex has its own averaged normal

void DrawFaceTextured(const TGLVertex3 &v1, const TGLVertex3 &v2, const TGLVertex3 &v3, const TGLVector3 &norm1, const TGLVector3 &norm2, const TGLVector3 &norm3, Double_t zMin, Double_t zMax)

void DrawQuadOutline(const TGLVertex3 &v1, const TGLVertex3 &v2, const TGLVertex3 &v3, const TGLVertex3 &v4)

void DrawFrame(Int_t frontPoint)const
Draws frame box around histogramm, surface or surface4,
draws grids and "profiles" for lego

void SetCamera()const
Clears gl buffer, sets projection

void SetTransformation()const
Applies rotations and translations before drawing

Int_t FrontPoint()const
Converts 3d points into window coordinate system
and find the nearest

void DrawBackPlane(Int_t plane)const
Draw back plane with number 'plane'

void DrawAxes(Int_t frontPoint)const
Using front point, find, where to draw axes and which labels to use for them

Bool_t Select(Int_t x, Int_t y)const
find hist "square" on screen

void SelectAxes(Int_t front, Int_t x, Int_t y)const
Checks, if axis can be selected

void DrawZeroPlane()const
Blue, semi-transparent plane at zero-level

void DrawProfile(Int_t plane)const
Draws profiles on back planes

void DrawLegoProfileX(Int_t plane)const
Draws X lego's profile on 'plane'
for each 'row' find min and max
and draw them as rectangle

void DrawLegoProfileY(Int_t plane)const
Draws Y lego's profile on 'plane'
for each 'column' find min and max
and draw them as rectangle

void DrawSurfaceProfileX(Int_t plane)const
Draws X surface's profile on 'plane'
for each 'row' find min and max
and draw them as rectangle

void DrawSurfaceProfileY(Int_t plane)const
Draws Y surface's profile on 'plane'
for each 'row' find min and max
and draw them as rectangle

void SetZLevels()
Levels for grid

void DrawGrid(Int_t plane)const
Grid at XOZ or YOZ back plane

void ClearBuffer()const
Clears gl buffers

void InitTexture()



Inline Functions


                        TGLHistPainter TGLHistPainter(TH1* hist)
                        TGLHistPainter TGLHistPainter(const TGLHistPainter&)
                       TGLHistPainter& operator=(const TGLHistPainter&)
        TGLHistPainter::EGLPaintOption GetPaintOption(const TString& option)
                  TGLHistPainter::PD_t GetMaxRowContent(Int_t row) const
                  TGLHistPainter::PD_t GetMaxColumnContent(Int_t column) const
                               TClass* Class()
                               TClass* IsA() const
                                  void ShowMembers(TMemberInspector& insp, char* parent)
                                  void Streamer(TBuffer& b)
                                  void StreamerNVirtual(TBuffer& b)


Last update: Mon Dec 12 22:43:25 2005


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.