library: libRGL
#include "TGLLegoPainter.h"

TGLLegoPainter


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

class TGLLegoPainter : public TGLPlotPainter, public TGLPlotFrame

Inheritance Chart:
TVirtualGLPainter
<-
TGLPlotPainter
TGLPlotFrame
<-
TGLLegoPainter
    private:
TGLLegoPainter(const TGLLegoPainter&) Bool_t ClampZ(Double_t& zVal) const void ClearBuffers() TGLLegoPainter::Selection_t ColorToObject(const UChar_t* color) void Disable1DTexture() void DrawBackPlane(Int_t plane) const void DrawFrame() void DrawGrid(Int_t plane) const void DrawLegoCartesian() void DrawLegoCylindrical() void DrawLegoPolar() void DrawLegoSpherical() void DrawPlot() void DrawProfiles() void DrawProfileX() void DrawProfileY() void Enable1DTexture() void EncodeToColor(Int_t i, Int_t j) const Bool_t InitGeometryCartesian() Bool_t InitGeometryCylindrical() Bool_t InitGeometryPolar() Bool_t InitGeometrySpherical() void InitGL() Bool_t MakeGLContextCurrent() const void MoveDynamicProfile(Int_t px, Int_t py) TGLLegoPainter& operator=(const TGLLegoPainter&) void SetLegoColor() void SetSelectionMode() public:
TGLLegoPainter(TH1* hist, TGLAxisPainter* axisPainter, Int_t ctx = -1, EGLCoordType type = kGLCartesian, Bool_t logX = kFALSE, Bool_t logY = kFALSE, Bool_t logZ = kFALSE) ~TGLLegoPainter() virtual void AddOption(const TString& stringOption) static TClass* Class() virtual char* GetObjectInfo(Int_t px, Int_t py) virtual Bool_t InitGeometry() virtual TClass* IsA() const virtual void Paint() virtual void Pan(Int_t px, Int_t py) virtual void ProcessEvent(Int_t event, Int_t px, Int_t py) virtual void Rotate(Int_t px, Int_t py) virtual TObject* Select(Int_t px, Int_t py) virtual void SetCoordType(EGLCoordType type) virtual void SetFrameColor(TColor* frameColor) virtual void SetGLContext(Int_t ctx) virtual void SetLogX(Bool_t logX) virtual void SetLogY(Bool_t logY) virtual void SetLogZ(Bool_t logZ) virtual void SetPadColor(TColor* padColor) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void StartPan(Int_t px, Int_t py) virtual void StartRotation(Int_t px, Int_t py) virtual void StopPan() virtual void StopRotation() virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) virtual void ZoomIn() virtual void ZoomOut()

Data Members

    private:
TH1* fHist Int_t fGLContext EGLCoordType fCoordType pair<int,int> fBinsX pair<int,int> fBinsY pair<double,double> fRangeX pair<double,double> fRangeY pair<double,double> fRangeZ Double_t fMinZ TGLLegoPainter::ELegoType fLegoType TGLSelectionBuffer fSelection Bool_t fSelectionPass Bool_t fUpdateSelection pair<int,int> fSelectedBin TGLLegoPainter::ESelectionType fSelectionMode Int_t fSelectedPlane TColor* fPadColor TColor* fFrameColor Double_t fXOZProfilePos Double_t fYOZProfilePos Bool_t fIsMoving vector<Range_t> fXEdges vector<Range_t> fYEdges vector<pair<double,double>,allocator<pair<double,double> > > fCosSinTableX vector<pair<double,double>,allocator<pair<double,double> > > fCosSinTableY TString fBinInfo TGLAxisPainter* fAxisPainter vector<Double_t> fZLevels UInt_t fTextureName vector<UChar_t> fTexture TGLQuadric fQuadric Bool_t fDrawErrors static const Float_t fRedEmission static const Float_t fOrangeEmission static const Float_t fGreenEmission static const Float_t fNullEmission public:
static const TGLLegoPainter::ELegoType kColorSimple static const TGLLegoPainter::ELegoType kColorLevel static const TGLLegoPainter::ELegoType kCylindricBars static const TGLLegoPainter::ESelectionType kSelectionSimple static const TGLLegoPainter::ESelectionType kSelectionFull

Class Description

TGLLegoPainter(TH1 *hist, TGLAxisPainter *axisPainter, Int_t ctx, EGLCoordType type, Bool_t logX, Bool_t logY, Bool_t logZ)
void Paint()
void SetGLContext(Int_t ctx)
Called from TGLPadHistPainter (one painter can be in different pads).
char * GetObjectInfo(Int_t px, Int_t py)
This function is used by pad to show
info in a status bar. It can be:
-bin number and content (selected bin is highlighted)
-TH name (back box planes are selected)
During rotation or shifting, this functions should
return immediately.
Bool_t InitGeometry()
Dispatch method.
Bool_t InitGeometryCartesian()
Find bin ranges for X and Y axes,
axes ranges for X, Y and Z.
Function returns false, if logarithmic scale for
some axis was requested, but we cannot
find correct range.
Bool_t InitGeometryPolar()
Find bin ranges for X and Y axes.
Find range for Z axis.
X is mapped to the polar angle,
Y to polar radius.
Z is Z.
Bool_t InitGeometryCylindrical()
Find bin ranges for X and Y axes.
Find range for Z axis.
X is mapped to the azimuth,
Y is height.
Z is radius.
Bool_t InitGeometrySpherical()
Find bin ranges for X and Y axes.
Find range for Z axis.
X is mapped to the theta,
Y is phi,
Z is radius.
void StartRotation(Int_t px, Int_t py)
Rotation started.
void Rotate(Int_t px, Int_t py)
Rotation.
Selection buffer must be updated.
void StopRotation()
Rotation is finished.
void StartPan(Int_t px, Int_t py)
User clicks right mouse button (in a pad).
void Pan(Int_t px, Int_t py)
User's moving mouse cursor, with right mouse button pressed (for pad).
Calculate 3d shift related to 2d mouse movement.
void StopPan()
Right mouse button was released (in a pad).
Enable GetObjectInfo.
TObject * Select(Int_t px, Int_t py)
void ZoomIn()
+Zoom
void ZoomOut()
-Zoom
void SetLogX(Bool_t log)
X logarithmic scale.
void SetLogY(Bool_t log)
Y logarithmic scale.
void SetLogZ(Bool_t log)
Z logarithmic scale.
void SetCoordType(EGLCoordType type)
kGLCartesian or kGLPolar etc.
void AddOption(const TString &option)
Set lego type from the string option.
void SetPadColor(TColor *c)
Used only in a pad.
void SetFrameColor(TColor *c)
Used only in a pad.
void InitGL()
Common gl initialization.
void EncodeToColor(Int_t i, Int_t j)
In a simple mode, all lego (with it's frame) is white (in a black color buffer)
void DrawPlot()
Select actual drawing function.
void DrawLegoCartesian()
Draws lego in a cartesian system.
Draw back box (possibly, with dynamic profiles).
void DrawLegoPolar()
Draws lego in a polar system.
No back box, no profiles.
Bars are drawn as trapezoids.
void DrawLegoCylindrical()
void DrawLegoSpherical()
void SetLegoColor()
Set color for lego.
Bool_t MakeGLContextCurrent()
Make the gl context current.
void ClearBuffers()
Clears gl buffers (possibly with pad's background color).
void SetSelectionMode()
Number of bins + 5 must be less then 2^24 (5 == 3 back planes + 2 dynamic profiles).
2 ^ 24 == r g b in a glColor3ub (ub for unsigned char). Number of bits supposed
== 8.
void DrawFrame()
Draw back box for lego.
This box is not written into
OpenGL's depth buffer, to avoid some visual artifacts.
void DrawBackPlane(Int_t plane)
Draw back plane with number 'plane'
void DrawProfiles()
Draw static profiles ("shadows") and
dynamic profile (if any).
void MoveDynamicProfile(Int_t px, Int_t py)
Create dynamic profile using selected plane
void DrawProfileX()
void DrawProfileY()
void ProcessEvent(Int_t event, Int_t, Int_t)
Bool_t ClampZ(Double_t &zVal)
void Enable1DTexture()
Enable 1D texture.
Must be in TGLTexture1D class in TGLUtil.
void Disable1DTexture()
Disable 1D texture.
Must be in TGLTexture1D class in TGLUtil.
void DrawGrid(Int_t plane)
Grid at XOZ or YOZ back plane
Under win32 glPushAttrib does not help with GL_LINE_STIPPLE enable bit
TGLLegoPainter(const TGLLegoPainter &)
Selection_t ColorToObject(const UChar_t *color)

Author: Timur Pocheptsov 14/06/2006
Last update: root/gl:$Name: $:$Id: TGLLegoPainter.cxx,v 1.3 2006/06/19 09:10:25 couet Exp $
Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *


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.