library: libRGL #include "TGLHistPainter.h" |
Inheritance Chart: | |||||||||||||||
|
private:
TGLHistPainter(const TGLHistPainter&) void AdjustScales() void CalculateTransformation() void ClearBuffers() const void DisableTexture() const void DrawAxes() const void DrawBackPlane(Int_t plane) const void DrawFrame() const void DrawGrid(Int_t plane) const void DrawLego() const void DrawLegoProfileX(Int_t plane) const void DrawLegoProfileY(Int_t plane) const void DrawProfile(Int_t plane) const void DrawSurface() const void DrawSurfaceProfileX(Int_t plane) const void DrawSurfaceProfileY(Int_t plane) const void DrawTF3() const void DrawZeroPlane() const void EnableTexture() const Int_t FrontPoint() const void InitGL() const Bool_t MakeCurrent() const TGLHistPainter& operator=(const TGLHistPainter&) virtual void Paint() virtual void Pan(Int_t newX, Int_t newY) void PrintPlot() Bool_t Select(Int_t x, Int_t y) const virtual TObject* Select(Int_t, Int_t) void SelectAxes(Int_t front, Int_t x, Int_t y) const void SetAverageNormals() Bool_t SetAxes() void SetCamera() const void SetMesh() void SetNormals() TGLHistPainter::EGLPaintOption SetPaintFunction(TString& option) void SetPlotColor() const void SetTable() void SetTexture() void SetTF3Mesh() void SetTransformation() const Bool_t SetVertices() 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 PaintStat(Int_t dostat, TF1* fit) virtual void ProcessMessage(const char* mess, const TObject* obj) virtual void SetHistogram(TH1* hist) virtual void SetShowProjection(const char*, Int_t) virtual void SetStack(TList* stack) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b)
private:
TVirtualHistPainter* fDefaultPainter TH1* fHist TF3* fF3 TGLHistPainter::EGLPaintOption fLastOption TGLHistPainter::EGLTF3Style fTF3Style 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 Int_t fFirstBinZ Int_t fLastBinZ Bool_t fLogX Bool_t fLogY Bool_t fLogZ vector<Double_t> fX vector<Double_t> fY vector<Double_t> fZ RootGL::T2DArray<TGLVertex3> fMesh RootGL::T2DArray<pair<TGLVector3,TGLVector3> > fFaceNormals RootGL::T2DArray<TGLVector3> fAverageNormals vector<RootGL::TGLTriFace_t> fF3Mesh vector<Double_t> fZLevels Int_t fGLDevice TGLVertex3 f2DAxes[8] Bool_t f2DPass UInt_t fTextureName vector<UChar_t> fTexture G__p2memfunc fCurrentPainter Int_t fFrontPoint Double_t fZoom TGLVertex3 fPan TPoint fCurrPos public:
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 kTF3 static const TGLHistPainter::EGLPaintOption kUnsupported static const TGLHistPainter::EGLTF3Style kDefault static const TGLHistPainter::EGLTF3Style kMaple0 static const TGLHistPainter::EGLTF3Style kMaple1 static const TGLHistPainter::EGLTF3Style kMaple2
Each TGLHistPainter has default painter as a member to delegate unsupported calls
If fLastOption != kUnsupported, try to select hist or axis. If not - gPad is selected (there are problems with TF2)
If fLastOption == kUnsupported, delegate call. If not, try to process itself
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
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
Calculates normals for triangles in surface. we have four points (cell contents of four neighbouring hist bins), three points are in one plane, so build normals for 2 triangles
One normal per vertex; this normal is average of neighbouring triangles normals
Sets viewport, bounds for arcball Calculates arguments for glOrtho Claculates center of scene and shift
Draws frame box around hist or surface,
draws grids and 'profiles'
Planes are 85% opaque to make their color "softer"
Using front point, find, where to draw axes and which labels to use for them gVirtualX->SelectWindow(gGLManager->GetVirtualXInd(fGLDevice));
Draws X lego's profile on 'plane' for each 'row' find min and max and draw them as rectangle
Draws Y lego's profile on 'plane' for each 'column' find min and max and draw them as rectangle
Grid at XOZ or YOZ back plane Under win32 glPushAttrib does not help with GL_LINE_STIPPLE enable bit