Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TGLPlotBox.h
Go to the documentation of this file.
1// @(#)root/gl:$Id$
2// Author: Timur Pocheptsov 31/08/2006
3
4/*************************************************************************
5 * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12#ifndef ROOT_TGLPlotFrame
13#define ROOT_TGLPlotFrame
14
15#include <vector>
16
17#include "Rtypes.h"
18#include "TGLUtil.h"
19
20class TColor;
21
22/*
23 TGLPlotBox draws a box behind a plot.
24*/
25
27private:
32
34
36 mutable TGLVertex3 f2DBox[8];
37 mutable TGLVertex3 f2DBoxU[8];
39
40 //The sizes of a "unit" cube.
44
47
48public:
49
50 TGLPlotBox(Bool_t xoySelectable, Bool_t xozSelectable, Bool_t yozSelectable);
51 //ClassDef macro adds some virtual functions,
52 //so, to supress g++ warnings virtual destructor declared.
53 virtual ~TGLPlotBox();
54
55 void DrawBox(Int_t selectedPart, Bool_t selectionPass,
56 const std::vector<Double_t> &zLevels,
57 Bool_t highColor)const;
58
59 void SetPlotBox(const Rgl::Range_t &xRange,
60 const Rgl::Range_t &yRange,
61 const Rgl::Range_t &zRange);
62 void SetPlotBox(const Rgl::Range_t &xRange, Double_t rangeXU,
63 const Rgl::Range_t &yRange, Double_t rangeYU,
64 const Rgl::Range_t &zRange, Double_t rangeZU);
65
66 void SetFrameColor(const TColor *color);
67
68 Int_t FindFrontPoint()const;
69 Int_t GetFrontPoint()const;
70
71 const TGLVertex3 *Get3DBox()const;
72 const TGLVertex3 *Get2DBox()const;
73
74 static const Int_t fgFramePlanes[][4];
75 static const Int_t fgBackPairs[][2];
76 static const Int_t fgFrontPairs[][2];
77 static const Double_t fgNormals[][3];
78
80 Bool_t GetDrawFront() const {return fDrawFront;}
81
83 Bool_t GetDrawBack() const {return fDrawBack;}
84
85private:
86 void DrawBack(Int_t selectedPart, Bool_t selectionPass, const std::vector<Double_t> &zLevels, Bool_t highColor)const;
87 void DrawFront()const;
88 void DrawBackPlane(Int_t plane, Bool_t selectionPass,
89 const std::vector<Double_t> &zLevels)const;
90
91 ClassDef(TGLPlotBox, 0)//Back box for plot.
92};
93
94#endif
#define d(i)
Definition RSha256.hxx:102
bool Bool_t
Definition RtypesCore.h:63
int Int_t
Definition RtypesCore.h:45
#define ClassDef(name, id)
Definition Rtypes.h:342
The color creation and management class.
Definition TColor.h:21
Implementation of a box around a histogram/function for plot-painters.
Definition TGLPlotBox.h:26
const TColor * fFrameColor
Definition TGLPlotBox.h:28
Int_t FindFrontPoint() const
Convert 3d points into window coordinate system and find the nearest.
void DrawFront() const
const Bool_t fYOZSelectable
Definition TGLPlotBox.h:31
virtual ~TGLPlotBox()
Empty dtor to suppress g++ warnings.
Int_t fFrontPoint
Definition TGLPlotBox.h:38
static const Int_t fgFrontPairs[][2]
Definition TGLPlotBox.h:76
void SetPlotBox(const Rgl::Range_t &xRange, const Rgl::Range_t &yRange, const Rgl::Range_t &zRange)
Set up a frame box.
TGLVertex3 f2DBox[8]
Definition TGLPlotBox.h:36
TGLVertex3 f2DBoxU[8]
Definition TGLPlotBox.h:37
const TGLVertex3 * Get3DBox() const
Get 3D box.
static const Int_t fgFramePlanes[][4]
Definition TGLPlotBox.h:74
const TGLVertex3 * Get2DBox() const
Get 2D box.
Bool_t GetDrawFront() const
Definition TGLPlotBox.h:80
Double_t fRangeXU
Definition TGLPlotBox.h:41
void SetDrawFront(Bool_t d)
Definition TGLPlotBox.h:79
Bool_t GetDrawBack() const
Definition TGLPlotBox.h:83
Bool_t fDrawFront
Definition TGLPlotBox.h:46
const Bool_t fXOYSelectable
Definition TGLPlotBox.h:29
Double_t fRangeYU
Definition TGLPlotBox.h:42
static const Int_t fgBackPairs[][2]
Definition TGLPlotBox.h:75
Double_t fRangeZU
Definition TGLPlotBox.h:43
void DrawBack(Int_t selectedPart, Bool_t selectionPass, const std::vector< Double_t > &zLevels, Bool_t highColor) const
static const Double_t fgNormals[][3]
Definition TGLPlotBox.h:77
void SetDrawBack(Bool_t d)
Definition TGLPlotBox.h:82
void DrawBox(Int_t selectedPart, Bool_t selectionPass, const std::vector< Double_t > &zLevels, Bool_t highColor) const
Draw back box for a plot.
void DrawBackPlane(Int_t plane, Bool_t selectionPass, const std::vector< Double_t > &zLevels) const
Draw back plane with number 'plane'.
void SetFrameColor(const TColor *color)
Back box color.
Bool_t fDrawBack
Definition TGLPlotBox.h:45
Bool_t fSelectablePairs[4][2]
Definition TGLPlotBox.h:33
TGLVertex3 f3DBox[8]
Definition TGLPlotBox.h:35
Int_t GetFrontPoint() const
The nearest point.
const Bool_t fXOZSelectable
Definition TGLPlotBox.h:30
3 component (x/y/z) vertex class.
Definition TGLUtil.h:84
std::pair< Double_t, Double_t > Range_t
Definition TGLUtil.h:1202