12 #ifndef ROOT_TGLSurfacePainter
13 #define ROOT_TGLSurfacePainter
24 class TGLSurfacePainter :
public TGLPlotPainter {
35 mutable ESurfaceType fType;
37 TGL2DArray<TGLVertex3> fMesh;
38 mutable TGL2DArray<Double_t> fTexMap;
39 TGL2DArray<std::pair<TGLVector3, TGLVector3> > fFaceNormals;
40 TGL2DArray<TGLVector3> fAverageNormals;
42 mutable TString fObjectInfo;
46 std::vector<TGLVertex3> fVertices;
47 void Swap(Projection_t &rhs);
50 mutable Projection_t fProj;
52 mutable std::list<Projection_t> fXOZProj;
53 mutable std::list<Projection_t> fYOZProj;
54 mutable std::list<Projection_t> fXOYProj;
56 mutable TGLLevelPalette fPalette;
57 mutable std::vector<Double_t> fColorLevels;
58 Rgl::Range_t fMinMaxVal;
61 mutable Bool_t fUpdateTexMap;
64 TGLSurfacePainter(TH1 *hist, TGLPlotCamera *camera, TGLPlotCoordinates *coord);
67 char *GetPlotInfo(Int_t px, Int_t py);
68 Bool_t InitGeometry();
69 void StartPan(Int_t px, Int_t py);
70 void Pan(Int_t px, Int_t py);
71 void AddOption(
const TString &stringOption);
72 void ProcessEvent(Int_t event, Int_t px, Int_t py);
81 void SetSurfaceColor()
const;
83 Bool_t InitGeometryCartesian();
84 Bool_t InitGeometryPolar();
85 Bool_t InitGeometryCylindrical();
86 Bool_t InitGeometrySpherical();
88 void DrawProjections()
const;
89 void DrawSectionXOZ()
const;
90 void DrawSectionYOZ()
const;
91 void DrawSectionXOY()
const;
93 void ClampZ(Double_t &zVal)
const;
95 char *WindowPointTo3DPoint(Int_t px, Int_t py)
const;
97 Bool_t PreparePalette()
const;
98 void GenTexMap()
const;
99 void DrawContoursProjection()
const;
101 Bool_t Textured()
const;
102 Bool_t HasSections()
const;
103 Bool_t HasProjections()
const;
105 void DrawPalette()
const;
106 void DrawPaletteAxis()
const;
108 static TRandom *fgRandom;
110 ClassDef(TGLSurfacePainter, 0)