ROOT  6.06/09
Reference Guide
TGLCameraOverlay.cxx
Go to the documentation of this file.
1 // @(#)root/gl:$Id$
2 // Author: Alja Mrak-Tadel 2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, 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 #include "TGLIncludes.h"
13 #include "TGLCameraOverlay.h"
14 #include "TGLViewer.h"
15 #include "TGLCamera.h"
16 #include "TGLSelectRecord.h"
17 #include "TGLUtil.h"
18 #include "TGLRnrCtx.h"
19 #include "TGLAxisPainter.h"
20 
21 #include "TMath.h"
22 #include "TAxis.h"
23 #include "THLimitsFinder.h"
24 
25 /** \class TGLCameraOverlay
26 \ingroup opengl
27 A GL overlay element which displays camera furstum.
28 */
29 
31 
32 ////////////////////////////////////////////////////////////////////////////////
33 
36 
37  fShowOrthographic(showOrtho),
38  fShowPerspective(showPersp),
39 
40  fOrthographicMode(kAxis),
41  fPerspectiveMode(kPlaneIntersect),
42 
43  fAxisPainter(0),
44  fAxis(0),
45  fAxisExtend(0.9),
46  fUseAxisColors(kFALSE),
47 
48  fExternalRefPlane(),
49  fUseExternalRefPlane(kFALSE)
50 {
51  // Constructor.
52 
53  fFrustum[0] = fFrustum[1] = fFrustum[2] = fFrustum[3] = 0;
54 
55  fAxis = new TAxis();
56  fAxis->SetNdivisions(710);
57  fAxis->SetLabelSize(0.018);
58  fAxis->SetLabelOffset(0.01);
61 
65 }
66 
67 ////////////////////////////////////////////////////////////////////////////////
68 /// Destructor.
69 
71 {
72  delete fAxisPainter;
73  delete fAxis;
74 }
75 
76 ////////////////////////////////////////////////////////////////////////////////
77 /// Get axis attributes.
78 
80 {
81  return dynamic_cast<TAttAxis*>(fAxis);
82 }
83 
84 ////////////////////////////////////////////////////////////////////////////////
85 /// Set frustum values from given camera.
86 
88 {
89  TGLVector3 absRef(1., 1., 1.); // needed in case if orthographic camera is negative
90  Float_t l = -cam.FrustumPlane(TGLCamera::kLeft).D() * Dot(cam.GetCamBase().GetBaseVec(2), absRef);
91  Float_t r = cam.FrustumPlane(TGLCamera::kRight).D() * Dot(cam.GetCamBase().GetBaseVec(2), absRef);
94 
95  fFrustum[0] = l;
96  fFrustum[1] = b;
97  fFrustum[2] = r;
98  fFrustum[3] = t;
99 }
100 
101 ////////////////////////////////////////////////////////////////////////////////
102 /// Draw cross section coordinates in top right corner of screen.
103 
105 {
106  TGLCamera &cam = rnrCtx.RefCamera();
107  // get eye line
108  const TGLMatrix& mx = cam.GetCamBase() * cam.GetCamTrans();
109  TGLVertex3 d = mx.GetTranslation();
110  TGLVertex3 p = d + mx.GetBaseVec(1);
111  TGLLine3 line(d, p);
112  // get ref plane
115  // get intersection
116  std::pair<Bool_t, TGLVertex3> intersection;
117  intersection = Intersection(rp, line, kTRUE);
118 
119  if (intersection.first)
120  {
121  TGLVertex3 v = intersection.second;
122 
123  glMatrixMode(GL_PROJECTION);
124  glPushMatrix();
125  glLoadIdentity();
126 
127  glMatrixMode(GL_MODELVIEW);
128  glPushMatrix();
129  glLoadIdentity();
130 
131  TGLRect &vp = rnrCtx.GetCamera()->RefViewport();
132  TGLFont font;
133  Int_t fs = TMath::Nint(TMath::Sqrt(vp.Width()*vp.Width() + vp.Height()*vp.Height())*0.02);
134  rnrCtx.RegisterFontNoScale(fs, "arial", TGLFont::kPixmap, font);
135  const char* txt = Form("(%f, %f, %f)", v[0], v[1], v[2]);
136  TGLUtil::Color(rnrCtx.ColorSet().Markup());
137  font.Render(txt, 0.98, 0.98, 0, TGLFont::kRight, TGLFont::kBottom);
138 
139  // render cross
141  Float_t w = 0.02; // cross size
142  Float_t ce = 0.15; // empty space
143  glBegin(GL_LINES);
144  glVertex2f(0 +w*ce, 0);
145  glVertex2f(0 +w, 0);
146 
147  glVertex2f(0 -w*ce, 0);
148  glVertex2f(0 -w, 0);
149 
150  Float_t h = w*vp.Width()/vp.Height();
151  glVertex2f(0, 0 +h*ce);
152  glVertex2f(0, 0 +h);
153 
154  glVertex2f(0, 0 -h*ce);
155  glVertex2f(0, 0 -h);
156  glEnd();
157 
158  glPopMatrix();
159  glMatrixMode(GL_PROJECTION);
160  glPopMatrix();
161  glMatrixMode(GL_MODELVIEW);
162  }
163 }
164 
165 ////////////////////////////////////////////////////////////////////////////////
166 /// Draw axis on four edges and a transparent grid.
167 
169 {
172 
173  Color_t lineColor = fUseAxisColors ? fAxis->GetAxisColor() : rnrCtx.ColorSet().Markup().GetColorIndex();
174 
175  // font size calculated relative to viewport diagonal
176  GLint vp[4]; glGetIntegerv(GL_VIEWPORT, vp);
177  Float_t rl = 0.5 *((vp[2]-vp[0]) + (vp[3]-vp[1]));
178  Int_t fsizePx = (Int_t)(fAxis->GetLabelSize()*rl);
179  // tick length
180  Float_t tlY = 0.015*rl/(vp[2]-vp[0]);
181  Float_t tlX = 0.015*rl/(vp[3]-vp[1]);
182  // corner vectors
183  Float_t minX, maxX;
184  TGLVector3 xdir = rnrCtx.RefCamera().GetCamBase().GetBaseVec(2); xdir.Normalise(); // left
185  if (fFrustum[2] > fFrustum[0] )
186  {
187  minX = fFrustum[0];
188  maxX = fFrustum[2];
189  }
190  else {
191  xdir = -xdir;
192  minX = fFrustum[2];
193  maxX = fFrustum[0];
194  }
195 
196  TGLVector3 ydir = rnrCtx.RefCamera().GetCamBase().GetBaseVec(3); ydir.Normalise(); // up
197  TGLVector3 vy1 = ydir * fFrustum[1];
198  TGLVector3 vy2 = ydir * fFrustum[3];
199 
200  TGLVector3 vx1 = xdir * minX;
201  TGLVector3 vx2 = xdir * maxX;
202  // range
203  Double_t rngY = fFrustum[3] - fFrustum[1];
204  Double_t rngX = maxX - minX;
205  Double_t off = TMath::Sqrt((rngX*rngX)+(rngY*rngY)) * 0.03;
206  Double_t minY = fFrustum[1] + off;
207  Double_t maxY = fFrustum[3] - off;
208  minX += off;
209  maxX -= off;
210 
211  // grid lines
212  Char_t alpha = 80; //primary
213  Char_t alpha2 = 90; //secondary
214  Int_t secSteps = fAxis->GetNdivisions() % 100;
215  GLushort stipple = 0x5555; // 33333 more rare
216 
217  // horizontal X
218  //
220  fAxis->SetTickLength(tlX);
221  fAxisPainter->RefDir() = xdir;
222  fAxis->SetLimits(minX, maxX);
223  fAxisPainter->RefTMOff(0) = ydir*rngY;
224 
225  // bottom
226  glPushMatrix();
227  glTranslated(vy1.X(), vy1.Y(), vy1.Z());
229  fAxisPainter->PaintAxis(rnrCtx, fAxis);
230  glPopMatrix();
231 
232  // top
233  glPushMatrix();
234  glTranslated(vy2.X(), vy2.Y(), vy2.Z());
239  glPopMatrix();
240 
242  if (grid)
243  {
245  TGLVector3 tmp;
246  // draw label vertical lines
247  TGLUtil::ColorTransparency(lineColor, alpha);
248  glBegin(GL_LINES);
249  for ( TGLAxisPainter::LabVec_t::iterator i = labs.begin(); i != labs.end(); i++)
250  {
251  tmp = vy1 + xdir * (i->first);
252  glVertex3dv(tmp.Arr());
253  tmp = vy2 + xdir * (i->first);
254  glVertex3dv(tmp.Arr());
255  }
256  glEnd();
257 
258  // secondary tick mark lines
259  if (labs.size() > 1)
260  {
261  TGLUtil::ColorTransparency(lineColor, alpha2);
262  glPushAttrib(GL_ENABLE_BIT | GL_LINE_BIT);
263  glEnable(GL_LINE_STIPPLE);
264  glLineStipple(1, stipple);
265 
266  glBegin(GL_LINES);
267  Int_t ondiv = 0;
268  Double_t omin = 0, omax = 0, bw1 = 0;
269  THLimitsFinder::Optimize(labs[0].second, labs[1].second, secSteps, omin, omax, ondiv, bw1);
270  Double_t val = labs[0].second;
271  while (val < fFrustum[2])
272  {
273  for (Int_t k=0; k<ondiv; k++)
274  {
275  val += bw1;
276  tmp = vy1 + xdir * val;
277  glVertex3dv(tmp.Arr());
278  tmp = vy2 + xdir * val;
279  glVertex3dv(tmp.Arr());
280  }
281  }
282  val = labs[0].second - bw1;
283  while(val > fFrustum[0])
284  {
285  tmp = vy1 + xdir * val;
286  glVertex3dv(tmp.Arr());
287  tmp = vy2 + xdir * val;
288  glVertex3dv(tmp.Arr());
289  val -= bw1;
290  }
291  glEnd();
292  glPopAttrib();
293  }
294  } // draw grid
295 
296  //
297  // vertical Y axis
298  //
299 
300  fAxis->SetTickLength(tlY);
301  fAxisPainter->RefDir() = ydir;
302  fAxis->SetLimits(minY, maxY);
303  fAxisPainter->RefTMOff(0) = xdir*rngX;
304  // left
305  glPushMatrix();
306  glTranslated(vx1.X(), vx1.Y(), vx1.Z());
308  fAxisPainter->PaintAxis(rnrCtx, fAxis);
309  glPopMatrix();
310  // right
311  glPushMatrix();
312  glTranslated(vx2.X(), vx2.Y(), vx2.Z());
317  glPopMatrix();
318 
319  if (grid)
320  {
322  TGLVector3 tmp;
323  // draw label horizontal lines
324  TGLUtil::ColorTransparency(lineColor, alpha);
325  glBegin(GL_LINES);
326  for ( TGLAxisPainter::LabVec_t::iterator i = labs.begin(); i != labs.end(); i++)
327  {
328  tmp = vx1 + ydir *(i->first);
329  glVertex3dv(tmp.Arr());
330  tmp = vx2 + ydir *(i->first);
331  glVertex3dv(tmp.Arr());
332  }
333  glEnd();
334 
335  // secondary tick mark lines
336  if (labs.size() > 1)
337  {
338  TGLUtil::ColorTransparency(lineColor, alpha2);
339  glPushAttrib(GL_ENABLE_BIT | GL_LINE_BIT);
340  glEnable(GL_LINE_STIPPLE);
341  glLineStipple(1, stipple);
342 
343  glBegin(GL_LINES);
344  Int_t ondiv;
345  Double_t omin = 0, omax = 0, bw1 = 0;
346  Double_t val = 0;
347  THLimitsFinder::Optimize(labs[0].second, labs[1].second, secSteps, omin, omax, ondiv, bw1);
348  val = labs[0].second;
349  while(val < fFrustum[3])
350  {
351  for(Int_t k=0; k<ondiv; k++)
352  {
353  val += bw1;
354  tmp = vx1 + ydir *val;
355  glVertex3dv(tmp.Arr());
356  tmp = vx2 + ydir * val;
357  glVertex3dv(tmp.Arr());
358  }
359  }
360 
361  val = labs[0].second - bw1;
362  while(val > fFrustum[1])
363  {
364  tmp = vx1 + ydir *val;
365  glVertex3dv(tmp.Arr());
366  tmp = vx2 + ydir * val;
367  glVertex3dv(tmp.Arr());
368  val -= bw1;
369  }
370  glEnd();
371  glPopAttrib();
372  }
373  } // draw grid
374 }
375 
376 ////////////////////////////////////////////////////////////////////////////////
377 /// Show frustum size with fixed screen line length and printed value.
378 
380 {
381  // factors 10, 5 and 2 are allowed
382  Double_t wfrust = TMath::Abs(fFrustum[2]-fFrustum[0]);
383  Float_t barsize= 0.14* wfrust;
384  Int_t exp = (Int_t) TMath::Floor(TMath::Log10(barsize));
385  Double_t fact = barsize/TMath::Power(10, exp);
386  Double_t red;
387  if (fact > 5)
388  {
389  red = 5*TMath::Power(10, exp);
390  }
391  else if (fact > 2)
392  {
393  red = 2*TMath::Power(10, exp);
394  } else
395  {
396  red = TMath::Power(10, exp);
397  }
398 
399  TGLVector3 v;
400  TGLVector3 xdir = rnrCtx.RefCamera().GetCamBase().GetBaseVec(2); // left
401  TGLVector3 ydir = rnrCtx.RefCamera().GetCamBase().GetBaseVec(3); // up
402  xdir.Normalise();
403  ydir.Normalise();
404 
405  TGLUtil::Color(rnrCtx.ColorSet().Foreground());
406 
407  const char* txt = Form("%.*f", (exp < 0) ? -exp : 0, red);
408  Float_t bb[6];
409  TGLFont font;
410  rnrCtx.RegisterFont(12, "arial", TGLFont::kPixmap, font);
411  font.BBox(txt, bb[0], bb[1], bb[2], bb[3], bb[4], bb[5]);
412  TGLRect &vp = rnrCtx.GetCamera()->RefViewport();
413  Double_t mH = (fFrustum[3]-fFrustum[1])*bb[4]/vp.Height();
414  glPushMatrix();
415  v = xdir*(fFrustum[2]-barsize) + ydir*(fFrustum[3] - mH*1.5);
416  glTranslated(v.X(), v.Y(), v.Z());
417  glRasterPos2i(0,0);
418  font.Render(txt);
419  glPopMatrix();
420 
421  glPushAttrib(GL_ENABLE_BIT | GL_LINE_BIT);
422  TGLUtil::LineWidth(2.);
423  glPushMatrix();
424  Float_t xt = fFrustum[2] - 1.1*barsize;
425  Float_t yt = fFrustum[3] - 2.1*mH;
426  v = xdir*xt + ydir*yt;
427  glTranslated(v.X(), v.Y(), v.Z());
428 
429  glBegin(GL_LINES);
430  // horizontal static
431  v = red*xdir;
432  glVertex3dv(v.Arr());
433  v = barsize*xdir;
434  glVertex3dv(v.Arr());
435  // corner bars end
436  v = xdir*barsize + ydir*mH;
437  glVertex3dv(v.Arr());
438  v = xdir*barsize - ydir*mH;
439  glVertex3dv(v.Arr());
440  // corner bar start
442  v = ydir*mH;
443  glVertex3dv(v.Arr());
444  v.Negate();
445  glVertex3dv(v.Arr());
446  // marker pointer
447  v = red*ydir;
448  glVertex3dv(v.Arr());
449  v += ydir*mH;
450  glVertex3dv(v.Arr());
451  //marker line
452  glVertex3d(0, 0., 0.);
453  v = red*xdir;
454  glVertex3dv(v.Arr());
455  glEnd();
456  glPopAttrib();
457  glPopMatrix();
458 }
459 
460 ////////////////////////////////////////////////////////////////////////////////
461 /// Display coordinates info of current frustum.
462 
464 {
465  TGLCamera &cam = rnrCtx.RefCamera();
466 
467  if (rnrCtx.Selection() ||
468  (cam.IsPerspective() && ! fShowPerspective) ||
469  (cam.IsOrthographic() && ! fShowOrthographic))
470  {
471  return;
472  }
473 
474  glPushAttrib(GL_ENABLE_BIT | GL_LINE_BIT);
475  glEnable(GL_BLEND);
476  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
477 
478  TGLUtil::Color(rnrCtx.ColorSet().Markup());
479  TGLCapabilitySwitch lights_off(GL_LIGHTING, kFALSE);
480  Float_t old_depth_range[2];
481  glGetFloatv(GL_DEPTH_RANGE, old_depth_range);
482 
483  SetFrustum(cam);
484 
485  if (cam.IsOrthographic())
486  {
487  switch (fOrthographicMode)
488  {
489  case kBar:
490  glDepthRange(0, 0.1);
491  RenderBar(rnrCtx);
492  break;
493  case kAxis:
494  glDepthRange(0, 0.1);
495  RenderAxis(rnrCtx, kFALSE);
496  break;
497  case kGridFront:
498  glDepthRange(0, 0.1);
499  RenderAxis(rnrCtx, kTRUE);
500  break;
501  case kGridBack:
502  glDepthRange(1, 0.9);
503  RenderAxis(rnrCtx, kTRUE);
504  break;
505  default:
506  break;
507  };
508  }
509  else
510  {
511  RenderPlaneIntersect(rnrCtx);
512  }
513 
514  glDepthRange(old_depth_range[0], old_depth_range[1]);
515  glPopAttrib();
516 }
virtual Color_t GetAxisColor() const
Definition: TAttAxis.h:51
TGLAxisPainter * fAxisPainter
A GL overlay element which displays camera furstum.
The TGLRnrCtx class aggregates data for a given redering context as needed by various parts of the RO...
Definition: TGLRnrCtx.h:40
Double_t Floor(Double_t x)
Definition: TMath.h:473
Abstract base camera class - concrete classes for orthographic and perspective cameras derive from it...
Definition: TGLCamera.h:43
void SetUseAxisColors(Bool_t x)
static void Color(const TGLColor &color)
Set color from TGLColor.
Definition: TGLUtil.cxx:1658
Int_t Width() const
Definition: TGLUtil.h:455
virtual void SetLimits(Double_t xmin, Double_t xmax)
Definition: TAxis.h:154
static void ColorTransparency(Color_t color_index, Char_t transparency=0)
Set color from color_index and ROOT-style transparency (default 0).
Definition: TGLUtil.cxx:1702
TLine * line
float Float_t
Definition: RtypesCore.h:53
Double_t D() const
Definition: TGLUtil.h:559
TGLVector3 GetTranslation() const
Return the translation component of matrix.
Definition: TGLUtil.cxx:822
Definition: Rtypes.h:61
16 component (4x4) transform matrix - column MAJOR as per GL.
Definition: TGLUtil.h:600
TGLPlane fExternalRefPlane
TH1 * h
Definition: legend2.C:5
virtual void SetLabelColor(Color_t color=1, Float_t alpha=1.)
Set color of labels.
Definition: TAttAxis.cxx:155
void RenderAxis(TGLRnrCtx &rnrCtx, Bool_t drawGrid)
Draw axis on four edges and a transparent grid.
TGLCamera & RefCamera()
Definition: TGLRnrCtx.h:157
Bool_t Selection() const
Definition: TGLRnrCtx.h:222
virtual void SetNdivisions(Int_t n=510, Bool_t optim=kTRUE)
Set the number of divisions for this axis.
Definition: TAttAxis.cxx:211
Definition: Rtypes.h:60
static void Optimize(Double_t A1, Double_t A2, Int_t nold, Double_t &BinLow, Double_t &BinHigh, Int_t &nbins, Double_t &BWID, Option_t *option="")
static function to compute reasonable axis limits
void SetFontMode(TGLFont::EMode m)
void SetFrustum(TGLCamera &cam)
Set frustum values from given camera.
TGLCameraOverlay(const TGLCameraOverlay &)
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
TGLVector3 & RefDir()
void RegisterFontNoScale(Int_t size, Int_t file, Int_t mode, TGLFont &out)
Get font in the GL rendering context.
Definition: TGLRnrCtx.cxx:367
TGLRect & RefViewport()
Definition: TGLCamera.h:128
TGLColor & Markup()
Definition: TGLUtil.h:856
Manages histogram axis attributes.
Definition: TAttAxis.h:32
virtual void Render(TGLRnrCtx &rnrCtx)
Display coordinates info of current frustum.
virtual void SetLabelOffset(Float_t offset=0.005)
Set distance between the axis and the labels The distance is expressed in per cent of the pad width...
Definition: TAttAxis.cxx:175
Short_t Abs(Short_t d)
Definition: TMathBase.h:110
const TGLMatrix & GetCamBase() const
Definition: TGLCamera.h:166
An overlay element.
Definition: TGLOverlay.h:22
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Definition: TMath.h:501
TGLVector3 & RefTMOff(Int_t i)
virtual Bool_t IsOrthographic() const
Definition: TGLCamera.h:118
void BBox(const char *txt, Float_t &llx, Float_t &lly, Float_t &llz, Float_t &urx, Float_t &ury, Float_t &urz) const
Get bounding box.
std::vector< Lab_t > LabVec_t
virtual ~TGLCameraOverlay()
Destructor.
void Render(const char *txt, Double_t x, Double_t y, Double_t angle, Double_t mgn) const
3 component (x/y/z) vertex class.
Definition: TGLUtil.h:86
TGLCamera * GetCamera()
Definition: TGLRnrCtx.h:156
Double_t Log10(Double_t x)
Definition: TMath.h:529
Viewport (pixel base) 2D rectangle class.
Definition: TGLUtil.h:426
const TGLMatrix & GetCamTrans() const
Definition: TGLCamera.h:167
3 component (x/y/z) vector class.
Definition: TGLUtil.h:250
void RegisterFont(Int_t size, Int_t file, Int_t mode, TGLFont &out)
Get font in the GL rendering context.
Definition: TGLRnrCtx.cxx:384
short Color_t
Definition: RtypesCore.h:79
void PaintAxis(TGLRnrCtx &ctx, TAxis *ax)
GL render TAxis.
Double_t fFrustum[4]
TGLVector3 GetBaseVec(Int_t b) const
Definition: TGLUtil.h:757
void RnrLabels() const
Render label reading prepared list ov value-pos pairs.
ROOT::R::TRInterface & r
Definition: Object.C:4
Double_t * Arr()
Definition: TGLUtil.h:130
Class to manage histogram axis.
Definition: TAxis.h:36
SVector< double, 2 > v
Definition: Dict.h:5
void RnrLines() const
Render axis main line and tick-marks.
char * Form(const char *fmt,...)
TLine * l
Definition: textangle.C:4
3D space, fixed length, line class, with direction / length 'vector', passing through point 'vertex'...
Definition: TGLUtil.h:391
void RenderBar(TGLRnrCtx &rnrCtx)
Show frustum size with fixed screen line length and printed value.
virtual void SetAxisColor(Color_t color=1, Float_t alpha=1.)
Set color of the line axis and tick marks.
Definition: TAttAxis.cxx:145
void SetLabelAlign(TGLFont::ETextAlignH_e, TGLFont::ETextAlignV_e)
Set label align.
virtual void SetLabelSize(Float_t size=0.04)
Set size of axis labels The size is expressed in per cent of the pad width.
Definition: TAttAxis.cxx:186
virtual Bool_t IsPerspective() const
Definition: TGLCamera.h:119
Double_t Dot(const TGLVector3 &v1, const TGLVector3 &v2)
Definition: TGLUtil.h:322
double Double_t
Definition: RtypesCore.h:55
virtual Int_t GetNdivisions() const
Definition: TAttAxis.h:50
Double_t X() const
Definition: TGLUtil.h:122
void Negate()
Definition: TGLUtil.h:144
LabVec_t & RefLabVec()
virtual Float_t GetLabelSize() const
Definition: TAttAxis.h:55
Double_t Y() const
Definition: TGLUtil.h:124
char Char_t
Definition: RtypesCore.h:29
void Normalise()
Definition: TGLUtil.h:309
Color_t GetColorIndex() const
Returns color-index representing the color.
Definition: TGLUtil.cxx:1240
void RenderPlaneIntersect(TGLRnrCtx &rnrCtx)
Draw cross section coordinates in top right corner of screen.
void SetLabelPixelFontSize(Int_t fs)
Int_t Height() const
Definition: TGLUtil.h:457
virtual void SetTickLength(Float_t length=0.03)
Set tick mark length The length is expressed in per cent of the pad width.
Definition: TAttAxis.cxx:231
const TGLPlane & FrustumPlane(EFrustumPlane plane) const
Definition: TGLCamera.h:219
static Float_t LineWidth()
Get the line-width, taking the global scaling into account.
Definition: TGLUtil.cxx:1904
Double_t Z() const
Definition: TGLUtil.h:126
A wrapper class for FTFont.
Double_t Sqrt(Double_t x)
Definition: TMath.h:464
TGLColorSet & ColorSet()
Return reference to current color-set (top of the stack).
Definition: TGLRnrCtx.cxx:278
double exp(double)
const Bool_t kTRUE
Definition: Rtypes.h:91
Int_t Nint(T x)
Definition: TMath.h:480
3D plane class - of format Ax + By + Cz + D = 0
Definition: TGLUtil.h:529
TGLColor & Foreground()
Definition: TGLUtil.h:854
ClassImp(TGLCameraOverlay)
TAttAxis * GetAttAxis()
Get axis attributes.
void SetAttAxis(TAttAxis *a)
std::pair< Bool_t, TGLLine3 > Intersection(const TGLPlane &p1, const TGLPlane &p2)
Find 3D line interestion of this plane with 'other'.
Definition: TGLUtil.cxx:544