Logo ROOT  
Reference Guide
TGLUtil.h
Go to the documentation of this file.
1 // @(#)root/gl:$Id$
2 // Author: Richard Maunder 25/05/2005
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2004, 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_TGLUtil
13 #define ROOT_TGLUtil
14 
15 #include "Rtypes.h"
16 #include "TError.h"
17 
18 #include <vector>
19 #include <cmath>
20 #include <cassert>
21 #include <utility>
22 
23 class TString;
24 class TGLBoundingBox;
25 class TGLCamera;
26 
27 class TAttMarker;
28 class TAttLine;
29 
30 class GLUtesselator;
31 
32 namespace Rgl
33 {
34  enum EOverlap
35  {
36  kInside = 0,
38  kOutside
39  };
40 }
41 
43 {
48 };
49 
51 {
63 };
64 
65 
66 // TODO: Split these into own h/cxx files - too long now!
67 
68 //////////////////////////////////////////////////////////////////////////
69 // //
70 // TGLVertex3 //
71 // //
72 // 3 component (x/y/z) vertex class //
73 // //
74 // This is part of collection of utility classes for GL in TGLUtil.h/cxx//
75 // These provide const and non-const accessors Arr() / CArr() to a GL //
76 // compatible internal field - so can be used directly with OpenGL C API//
77 // calls. They are not intended to be fully featured just provide //
78 // minimum required. //
79 //////////////////////////////////////////////////////////////////////////
80 
81 class TGLVector3; // Forward declare for Shift()
82 
84 {
85 protected:
86  // Fields
87  Bool_t ValidIndex(UInt_t index) const { return (index < 3); }
89 
90 public:
91  TGLVertex3();
94  TGLVertex3(const TGLVertex3 & other);
95  ~TGLVertex3();
96 
97  Bool_t operator == (const TGLVertex3 & rhs) const;
98  TGLVertex3 & operator = (const TGLVertex3 & rhs);
100  TGLVertex3 operator - () const;
101  const TGLVertex3 & operator -= (const TGLVector3 & val);
102  const TGLVertex3 & operator += (const TGLVector3 & val);
103 
104  // Manipulators
105  void Fill(Double_t val);
106  void Set(Double_t x, Double_t y, Double_t z);
107  void Set(const Double_t* xyz);
108  void Set(const TGLVertex3 & other);
109  void Shift(TGLVector3 & shift);
110  void Shift(Double_t xDelta, Double_t yDelta, Double_t zDelta);
111  void Negate();
112 
113  void Minimum(const TGLVertex3 & other);
114  void Maximum(const TGLVertex3 & other);
115 
116  // Accessors
117  Double_t & operator [] (Int_t index);
118  const Double_t & operator [] (Int_t index) const;
119  Double_t X() const { return fVals[0]; }
120  Double_t & X() { return fVals[0]; }
121  Double_t Y() const { return fVals[1]; }
122  Double_t & Y() { return fVals[1]; }
123  Double_t Z() const { return fVals[2]; }
124  Double_t & Z() { return fVals[2]; }
125 
126  const Double_t * CArr() const { return fVals; }
127  Double_t * Arr() { return fVals; }
128 
129  void Dump() const;
130 
131  ClassDefNV(TGLVertex3,1); // GL 3 component vertex helper/wrapper class
132 };
133 
134 //______________________________________________________________________________
136 {
137  return TGLVertex3(f*v.X(), f*v.Y(), f*v.Z());
138 }
139 
140 //______________________________________________________________________________
141 inline void TGLVertex3::Negate()
142 {
143  fVals[0] = -fVals[0];
144  fVals[1] = -fVals[1];
145  fVals[2] = -fVals[2];
146 }
147 
148 //______________________________________________________________________________
149 inline Bool_t TGLVertex3::operator == (const TGLVertex3 & rhs) const
150 {
151  return (fVals[0] == rhs.fVals[0] && fVals[1] == rhs.fVals[1] && fVals[2] == rhs.fVals[2]);
152 }
153 
154 //______________________________________________________________________________
156 {
157  // Check for self-assignment
158  if (this != &rhs) {
159  Set(rhs);
160  }
161  return *this;
162 }
163 
164 // operator -= & operator += inline needs to be defered until full TGLVector3 definition
165 
166 //______________________________________________________________________________
168 {
169  return TGLVertex3(-fVals[0], -fVals[1], -fVals[2]);
170 }
171 
172 //______________________________________________________________________________
174 {
175  fVals[0] *= f;
176  fVals[1] *= f;
177  fVals[2] *= f;
178  return *this;
179 }
180 
181 //______________________________________________________________________________
183 {
184  /*if (!ValidIndex(index)) {
185  assert(kFALSE);
186  return fVals[0];
187  } else {*/
188  return fVals[index];
189  //}
190 }
191 
192 //______________________________________________________________________________
193 inline const Double_t& TGLVertex3::operator [] (Int_t index) const
194 {
195  /*if (!ValidIndex(index)) {
196  assert(kFALSE);
197  return fVals[0];
198  } else {*/
199  return fVals[index];
200  //}
201 }
202 
203 //______________________________________________________________________________
204 inline void TGLVertex3::Fill(Double_t val)
205 {
206  Set(val,val,val);
207 }
208 
209 //______________________________________________________________________________
211 {
212  fVals[0]=x;
213  fVals[1]=y;
214  fVals[2]=z;
215 }
216 
217 //______________________________________________________________________________
218 inline void TGLVertex3::Set(const Double_t* xyz)
219 {
220  fVals[0]=xyz[0];
221  fVals[1]=xyz[1];
222  fVals[2]=xyz[2];
223 }
224 
225 //______________________________________________________________________________
226 inline void TGLVertex3::Set(const TGLVertex3 & other)
227 {
228  fVals[0]=other.fVals[0];
229  fVals[1]=other.fVals[1];
230  fVals[2]=other.fVals[2];
231 }
232 
233 
234 //////////////////////////////////////////////////////////////////////////
235 // //
236 // TGLVector3 //
237 // //
238 // 3 component (x/y/z) vector class //
239 // //
240 // This is part of collection of utility classes for GL in TGLUtil.h/cxx//
241 // These provide const and non-const accessors Arr() / CArr() to a GL //
242 // compatible internal field - so can be used directly with OpenGL C API//
243 // calls. They are not intended to be fully featured just provide //
244 // minimum required. //
245 //////////////////////////////////////////////////////////////////////////
246 
247 class TGLVector3 : public TGLVertex3
248 {
249 public:
250  TGLVector3() = default;
252  TGLVector3(const Double_t *src);
253 
255  { fVals[0] = v[0]; fVals[1] = v[1]; fVals[2] = v[2]; return *this; }
256 
258  TGLVector3 operator - () const;
259 
260  Double_t Mag() const;
261  void Normalise();
262 
263  ClassDefNV(TGLVector3,1); // GL 3 component vector helper/wrapper class
264 };
265 
266 // Inline for TGLVertex3 requiring full TGLVector definition
267 //______________________________________________________________________________
268 inline const TGLVertex3 & TGLVertex3::operator -= (const TGLVector3 & vec)
269 {
270  fVals[0] -= vec[0]; fVals[1] -= vec[1]; fVals[2] -= vec[2];
271  return *this;
272 }
273 
274 // Inline for TGLVertex3 requiring full TGLVector definition
275 //______________________________________________________________________________
276 inline const TGLVertex3 & TGLVertex3::operator += (const TGLVector3 & vec)
277 {
278  fVals[0] += vec[0]; fVals[1] += vec[1]; fVals[2] += vec[2];
279  return *this;
280 }
281 
282 //______________________________________________________________________________
284 {
285  fVals[0] /= val;
286  fVals[1] /= val;
287  fVals[2] /= val;
288  return *this;
289 }
290 
291 //______________________________________________________________________________
293 {
294  return TGLVector3(-fVals[0], -fVals[1], -fVals[2]);
295 }
296 
297 //______________________________________________________________________________
298 inline Double_t TGLVector3::Mag() const
299 {
300  return std::sqrt(fVals[0]*fVals[0] + fVals[1]*fVals[1] + fVals[2]*fVals[2]);
301 }
302 
303 //______________________________________________________________________________
305 {
306  Double_t mag = Mag();
307  if ( mag == 0.0 ) {
308  Error("TGLVector3::Normalise", "vector has zero magnitude");
309  return;
310  }
311  fVals[0] /= mag;
312  fVals[1] /= mag;
313  fVals[2] /= mag;
314 }
315 
316 //______________________________________________________________________________
317 inline Double_t Dot(const TGLVector3 & v1, const TGLVector3 & v2)
318 {
319  return v1[0]*v2[0] + v1[1]*v2[1] + v1[2]*v2[2];
320 }
321 
322 //______________________________________________________________________________
323 inline TGLVector3 Cross(const TGLVector3 & v1, const TGLVector3 & v2)
324 {
325  return TGLVector3(v1[1]*v2[2] - v2[1]*v1[2],
326  v1[2]*v2[0] - v2[2]*v1[0],
327  v1[0]*v2[1] - v2[0]*v1[1]);
328 }
329 
330 //______________________________________________________________________________
331 inline const TGLVector3 operator / (const TGLVector3 & vec, Double_t val)
332 {
333  return TGLVector3(vec[0] / val, vec[1] / val, vec[2] / val);
334 }
335 
336 //______________________________________________________________________________
337 inline const TGLVector3 operator * (const TGLVector3 & vec, Double_t val)
338 {
339  return TGLVector3(vec[0] * val, vec[1] * val, vec[2] * val);
340 }
341 
342 //______________________________________________________________________________
343 // Vertex + Vector => Vertex
344 inline TGLVertex3 operator + (const TGLVertex3 & vertex1, const TGLVector3 & vertex2)
345 {
346  return TGLVertex3(vertex1[0] + vertex2[0], vertex1[1] + vertex2[1], vertex1[2] + vertex2[2]);
347 }
348 
349 //______________________________________________________________________________
350 // Vertex - Vertex => Vector
351 inline TGLVector3 operator - (const TGLVertex3 & vertex1, const TGLVertex3 & vertex2)
352 {
353  return TGLVector3(vertex1[0] - vertex2[0], vertex1[1] - vertex2[1], vertex1[2] - vertex2[2]);
354 }
355 
356 //______________________________________________________________________________
357 // Vector + Vector => Vector
358 inline TGLVector3 operator + (const TGLVector3 & vector1, const TGLVector3 & vector2)
359 {
360  return TGLVector3(vector1[0] + vector2[0], vector1[1] + vector2[1], vector1[2] + vector2[2]);
361 }
362 
363 //______________________________________________________________________________
364 // Vector - Vector => Vector
365 inline TGLVector3 operator - (const TGLVector3 & vector1, const TGLVector3 & vector2)
366 {
367  return TGLVector3(vector1[0] - vector2[0], vector1[1] - vector2[1], vector1[2] - vector2[2]);
368 }
369 
370 //______________________________________________________________________________
371 // Dot-product
372 inline Double_t operator * (const TGLVector3 & a, const TGLVector3 & b)
373 {
374  return a[0]*b[0] + a[1]*b[1] + a[2]*b[2];
375 }
376 
377 //////////////////////////////////////////////////////////////////////////
378 // //
379 // TGLLine3 //
380 // //
381 // 3D space, fixed length, line class, with direction / length 'vector',//
382 // passing through point 'vertex'. Just wraps a TGLVector3 / TGLVertex3 //
383 // pair. //
384 //////////////////////////////////////////////////////////////////////////
385 
386 class TGLLine3
387 {
388 private:
389  // Fields
390  TGLVertex3 fVertex; //! Start vertex of line
391  TGLVector3 fVector; //! Vector of line from fVertex
392 
393 public:
394  TGLLine3(const TGLVertex3 & start, const TGLVertex3 & end);
395  TGLLine3(const TGLVertex3 & start, const TGLVector3 & vector);
396  ~TGLLine3() = default;
397 
398  void Set(const TGLVertex3 & start, const TGLVertex3 & end);
399  void Set(const TGLVertex3 & start, const TGLVector3 & vector);
400 
401  // Bitwise copy constructor and = operator are fine
402 
403  // Accessors
404  const TGLVertex3 & Start() const { return fVertex; }
405  const TGLVertex3 End() const { return fVertex + fVector; }
406  const TGLVector3 & Vector() const { return fVector; }
407 
408  // Debug
409  void Draw() const;
410 
411  ClassDefNV(TGLLine3,0); // GL line wrapper class
412 };
413 
414 //////////////////////////////////////////////////////////////////////////
415 // //
416 // TGLRect //
417 // //
418 // Viewport (pixel base) 2D rectangle class //
419 //////////////////////////////////////////////////////////////////////////
420 
421 class TGLRect
422 {
423 private:
424  // Fields
425  Int_t fX, fY; //! Corner
426  Int_t fWidth, fHeight; //! Positive width/height
427 
428 public:
429  TGLRect();
430  TGLRect(Int_t x, Int_t y, Int_t width, Int_t height);
431  TGLRect(Int_t x, Int_t y, UInt_t width, UInt_t height);
432  virtual ~TGLRect();
433 
434  // Bitwise copy const & =op are ok at present
435 
436  // Manipulators
437  void Set(Int_t x, Int_t y, Int_t width, Int_t height);
438  void SetCorner(Int_t x, Int_t y);
439  void Offset(Int_t dX, Int_t dY);
440  void Expand(Int_t x, Int_t y);
441 
442  // Accessors
443  const Int_t* CArr() const { return &fX; }
444  Int_t* CArr() { return &fX; }
445 
446  Int_t X() const { return fX; }
447  Int_t & X() { return fX; }
448  Int_t Y() const { return fY; }
449  Int_t & Y() { return fY; }
450  Int_t Width() const { return fWidth; }
451  Int_t & Width() { return fWidth; }
452  Int_t Height() const { return fHeight; }
453  Int_t & Height() { return fHeight; }
454  Int_t CenterX() const { return fX + fWidth/2; }
455  Int_t CenterY() const { return fY + fHeight/2; }
456  Int_t Left() const { return fX; }
457  Int_t Right() const { return fX + fWidth; }
458  Int_t Top() const { return fY; }
459  Int_t Bottom() const { return fY + fHeight; }
460 
461  Int_t Diagonal() const;
462  Int_t Longest() const;
463 
464  Double_t Aspect() const;
465  Rgl::EOverlap Overlap(const TGLRect & other) const;
466 
467  ClassDef(TGLRect,0); // GL rect helper/wrapper class
468 };
469 
470 //______________________________________________________________________________
471 inline void TGLRect::Set(Int_t x, Int_t y, Int_t width, Int_t height)
472 {
473  fX = x;
474  fY = y;
475  fWidth = width;
476  fHeight = height;
477 }
478 
479 //______________________________________________________________________________
481 {
482  fX = x;
483  fY = y;
484 }
485 
486 //______________________________________________________________________________
487 inline void TGLRect::Offset(Int_t dX, Int_t dY)
488 {
489  fX += dX;
490  fY += dY;
491 }
492 
493 //______________________________________________________________________________
494 inline Int_t TGLRect::Longest() const
495 {
496  return fWidth > fHeight ? fWidth : fHeight;
497 }
498 
499 //______________________________________________________________________________
500 inline Double_t TGLRect::Aspect() const
501 {
502  // Return aspect ratio (width/height)
503  if (fHeight == 0) {
504  return 0.0;
505  } else {
506  return static_cast<Double_t>(fWidth) / static_cast<Double_t>(fHeight);
507  }
508 }
509 
510 //////////////////////////////////////////////////////////////////////////
511 // //
512 // TGLPlane //
513 // //
514 // 3D plane class - of format Ax + By + Cz + D = 0 //
515 // //
516 // This is part of collection of simple utility classes for GL only in //
517 // TGLUtil.h/cxx. These provide const and non-const accessors Arr() & //
518 // CArr() to a GL compatible internal field - so can be used directly //
519 // with OpenGL C API calls - which TVector3 etc cannot (easily). //
520 // They are not intended to be fully featured just provide minimum //
521 // required. //
522 //////////////////////////////////////////////////////////////////////////
523 
524 class TGLPlane
525 {
526 private:
527  // Fields
529 
530  // Methods
531  void Normalise();
532 
533 public:
534  TGLPlane();
535  TGLPlane(const TGLPlane & other);
537  TGLPlane(Double_t eq[4]);
538  TGLPlane(const TGLVector3 & norm, const TGLVertex3 & point);
539  TGLPlane(const TGLVertex3 & p1, const TGLVertex3 & p2, const TGLVertex3 & p3);
540  ~TGLPlane() = default;
541 
542  TGLPlane &operator=(const TGLPlane &src);
543 
544  // Manipulators
545  void Set(const TGLPlane & other);
547  void Set(Double_t eq[4]);
548  void Set(const TGLVector3 & norm, const TGLVertex3 & point);
549  void Set(const TGLVertex3 & p1, const TGLVertex3 & p2, const TGLVertex3 & p3);
550  void Negate();
551 
552  // Accessors
553  Double_t A() const { return fVals[0]; }
554  Double_t B() const { return fVals[1]; }
555  Double_t C() const { return fVals[2]; }
556  Double_t D() const { return fVals[3]; }
557 
558  TGLVector3 Norm() const { return TGLVector3( fVals[0], fVals[1], fVals[2]); }
559  Double_t DistanceTo(const TGLVertex3 & vertex) const;
560  TGLVertex3 NearestOn(const TGLVertex3 & point) const;
561 
562  // Internal data accessors - for GL API
563  const Double_t * CArr() const { return fVals; }
564  Double_t * Arr() { return fVals; }
565 
566  void Dump() const;
567 
568  ClassDefNV(TGLPlane,0); // GL plane helper/wrapper class
569 };
570 
571 typedef std::vector<TGLPlane> TGLPlaneSet_t;
572 typedef std::vector<TGLPlane>::iterator TGLPlaneSet_i;
573 typedef std::vector<TGLPlane>::const_iterator TGLPlaneSet_ci;
574 
575 // Some free functions for planes
576 std::pair<Bool_t, TGLLine3> Intersection(const TGLPlane & p1, const TGLPlane & p2);
577 std::pair<Bool_t, TGLVertex3> Intersection(const TGLPlane & p1, const TGLPlane & p2, const TGLPlane & p3);
578 std::pair<Bool_t, TGLVertex3> Intersection(const TGLPlane & plane, const TGLLine3 & line, Bool_t extend);
579 
580 
581 //////////////////////////////////////////////////////////////////////////
582 // //
583 // TGLMatrix //
584 // //
585 // 16 component (4x4) transform matrix - column MAJOR as per GL. //
586 // Provides limited support for adjusting the translation, scale and //
587 // rotation components. //
588 // //
589 // This is part of collection of simple utility classes for GL only in //
590 // TGLUtil.h/cxx. These provide const and non-const accessors Arr() & //
591 // CArr() to a GL compatible internal field - so can be used directly //
592 // with OpenGL C API calls - which TVector3 etc cannot (easily). //
593 // They are not intended to be fully featured just provide minimum //
594 // required. //
595 //////////////////////////////////////////////////////////////////////////
596 
598 {
599 private:
600  // Fields
601  Double_t fVals[16]; // Column MAJOR as per OGL
602 
603  // Methods
604  Bool_t ValidIndex(UInt_t index) const { return (index < 16); }
605 
606 public:
607  TGLMatrix();
609  TGLMatrix(const TGLVertex3 & translation);
610  TGLMatrix(const TGLVertex3 & origin, const TGLVector3 & zAxis, const TGLVector3 & xAxis);
611  TGLMatrix(const TGLVertex3 & origin, const TGLVector3 & zAxis);
612  TGLMatrix(const Double_t vals[16]);
613  TGLMatrix(const TGLMatrix & other);
614  virtual ~TGLMatrix();
615 
616  // Operators
617  TGLMatrix & operator =(const TGLMatrix & rhs);
618  Double_t & operator [] (Int_t index);
619  Double_t operator [] (Int_t index) const;
620 
621  void MultRight(const TGLMatrix & rhs);
622  void MultLeft (const TGLMatrix & lhs);
623  TGLMatrix & operator*=(const TGLMatrix & rhs) { MultRight(rhs); return *this; }
624 
625  // Manipulators
626  void Set(const TGLVertex3 & origin, const TGLVector3 & zAxis, const TGLVector3 & xAxis = 0);
627  void Set(const Double_t vals[16]);
628  void SetIdentity();
629 
631  void SetTranslation(const TGLVertex3 & translation);
632 
633  void Translate(const TGLVector3 & vect);
634  void MoveLF(Int_t ai, Double_t amount);
635  void Move3LF(Double_t x, Double_t y, Double_t z);
636 
637  void Scale(const TGLVector3 & scale);
638  void Rotate(const TGLVertex3 & pivot, const TGLVector3 & axis, Double_t angle);
639  void RotateLF(Int_t i1, Int_t i2, Double_t amount);
640  void RotatePF(Int_t i1, Int_t i2, Double_t amount);
641  void TransformVertex(TGLVertex3 & vertex) const;
642  void Transpose3x3();
643  Double_t Invert();
644 
645  // Accesors
646  TGLVector3 GetTranslation() const;
647  TGLVector3 GetScale() const;
648  Bool_t IsScalingForRender() const;
649 
651  void SetBaseVec(Int_t b, const TGLVector3& v);
652  void SetBaseVec(Int_t b, Double_t* x);
653 
654  TGLVector3 GetBaseVec(Int_t b) const;
655  void GetBaseVec(Int_t b, TGLVector3& v) const;
656  void GetBaseVec(Int_t b, Double_t* x) const;
657 
658  TGLVector3 Multiply(const TGLVector3& v, Double_t w=1) const;
659  TGLVector3 Rotate(const TGLVector3& v) const;
660  void MultiplyIP(TGLVector3& v, Double_t w=1) const;
661  void RotateIP(TGLVector3& v) const;
662 
663  // Internal data accessors - for GL API
664  const Double_t * CArr() const { return fVals; }
665  Double_t * Arr() { return fVals; }
666 
667  void Dump() const;
668 
669  ClassDef(TGLMatrix,1); // GL matrix helper/wrapper class
670 };
671 
672 //______________________________________________________________________________
674 {
675  // Check for self-assignment
676  if (this != &rhs) {
677  Set(rhs.fVals);
678  }
679  return *this;
680 }
681 
682 //______________________________________________________________________________
684 {
685  /*if (!ValidIndex(index)) {
686  assert(kFALSE);
687  return fVals[0];
688  } else {*/
689  return fVals[index];
690  //}
691 }
692 
693 //______________________________________________________________________________
695 {
696  /*if (!ValidIndex(index)) {
697  assert(kFALSE);
698  return fVals[0];
699  } else {*/
700  return fVals[index];
701  //}
702 }
703 
704 //______________________________________________________________________________
705 inline TGLMatrix operator * (const TGLMatrix & lhs, const TGLMatrix & rhs)
706 {
707  TGLMatrix res;
708 
709  res[ 0] = rhs[ 0] * lhs[ 0] + rhs[ 1] * lhs[ 4] + rhs[ 2] * lhs[ 8] + rhs[ 3] * lhs[12];
710  res[ 1] = rhs[ 0] * lhs[ 1] + rhs[ 1] * lhs[ 5] + rhs[ 2] * lhs[ 9] + rhs[ 3] * lhs[13];
711  res[ 2] = rhs[ 0] * lhs[ 2] + rhs[ 1] * lhs[ 6] + rhs[ 2] * lhs[10] + rhs[ 3] * lhs[14];
712  res[ 3] = rhs[ 0] * lhs[ 3] + rhs[ 1] * lhs[ 7] + rhs[ 2] * lhs[11] + rhs[ 3] * lhs[15];
713 
714  res[ 4] = rhs[ 4] * lhs[ 0] + rhs[ 5] * lhs[ 4] + rhs[ 6] * lhs[ 8] + rhs[ 7] * lhs[12];
715  res[ 5] = rhs[ 4] * lhs[ 1] + rhs[ 5] * lhs[ 5] + rhs[ 6] * lhs[ 9] + rhs[ 7] * lhs[13];
716  res[ 6] = rhs[ 4] * lhs[ 2] + rhs[ 5] * lhs[ 6] + rhs[ 6] * lhs[10] + rhs[ 7] * lhs[14];
717  res[ 7] = rhs[ 4] * lhs[ 3] + rhs[ 5] * lhs[ 7] + rhs[ 6] * lhs[11] + rhs[ 7] * lhs[15];
718 
719  res[ 8] = rhs[ 8] * lhs[ 0] + rhs[ 9] * lhs[ 4] + rhs[10] * lhs[ 8] + rhs[11] * lhs[12];
720  res[ 9] = rhs[ 8] * lhs[ 1] + rhs[ 9] * lhs[ 5] + rhs[10] * lhs[ 9] + rhs[11] * lhs[13];
721  res[10] = rhs[ 8] * lhs[ 2] + rhs[ 9] * lhs[ 6] + rhs[10] * lhs[10] + rhs[11] * lhs[14];
722  res[11] = rhs[ 8] * lhs[ 3] + rhs[ 9] * lhs[ 7] + rhs[10] * lhs[11] + rhs[11] * lhs[15];
723 
724  res[12] = rhs[12] * lhs[ 0] + rhs[13] * lhs[ 4] + rhs[14] * lhs[ 8] + rhs[15] * lhs[12];
725  res[13] = rhs[12] * lhs[ 1] + rhs[13] * lhs[ 5] + rhs[14] * lhs[ 9] + rhs[15] * lhs[13];
726  res[14] = rhs[12] * lhs[ 2] + rhs[13] * lhs[ 6] + rhs[14] * lhs[10] + rhs[15] * lhs[14];
727  res[15] = rhs[12] * lhs[ 3] + rhs[13] * lhs[ 7] + rhs[14] * lhs[11] + rhs[15] * lhs[15];
728 
729  return res;
730 }
731 
732 //______________________________________________________________________________
734 {
735  Double_t* C = fVals + 4*--b;
736  C[0] = x; C[1] = y; C[2] = z;
737 }
738 
739 //______________________________________________________________________________
741 {
742  Double_t* C = fVals + 4*--b;
743  C[0] = v[0]; C[1] = v[1]; C[2] = v[2];
744 }
745 
746 //______________________________________________________________________________
748 {
749  Double_t* C = fVals + 4*--b;
750  C[0] = x[0]; C[1] = x[1]; C[2] = x[2];
751 }
752 
753 //______________________________________________________________________________
755 {
756  return TGLVector3(&fVals[4*--b]);
757 }
758 
759 //______________________________________________________________________________
761 {
762  const Double_t* C = fVals + 4*--b;
763  v[0] = C[0]; v[1] = C[1]; v[2] = C[2];
764 }
765 
766 //______________________________________________________________________________
767 inline void TGLMatrix::GetBaseVec(Int_t b, Double_t* x) const
768 {
769  const Double_t* C = fVals + 4*--b;
770  x[0] = C[0], x[1] = C[1], x[2] = C[2];
771 }
772 
773 
774 //////////////////////////////////////////////////////////////////////////
775 //
776 // TGLColor
777 //
778 // Encapsulate color in preferred GL format - UChar_t RGBA array.
779 // Color index is also cached for easier interfacing with the
780 // traditional ROOT graphics.
781 //
782 //////////////////////////////////////////////////////////////////////////
783 
784 class TGLColor
785 {
786 protected:
788  mutable Short_t fIndex;
789 
790 public:
791  TGLColor();
792  TGLColor(Int_t r, Int_t g, Int_t b, Int_t a=255);
794  TGLColor(Color_t color_index, Char_t transparency=0);
795  TGLColor(const TGLColor& c);
796 
797  TGLColor& operator=(const TGLColor& c);
798 
799  UChar_t* Arr() { return fRGBA; }
800  const UChar_t* CArr() const { return fRGBA; }
801 
802  UChar_t GetRed() const { return fRGBA[0]; }
803  UChar_t GetGreen() const { return fRGBA[1]; }
804  UChar_t GetBlue() const { return fRGBA[2]; }
805  UChar_t GetAlpha() const { return fRGBA[3]; }
806 
807  Color_t GetColorIndex() const;
808  Char_t GetTransparency() const;
809 
810  void SetRed(Int_t v) { fRGBA[0] = v; }
811  void SetGreen(Int_t v) { fRGBA[1] = v; }
812  void SetBlue(Int_t v) { fRGBA[2] = v; }
813  void SetAlpha(Int_t v) { fRGBA[3] = v; }
814 
815  void SetColor(Int_t r, Int_t g, Int_t b, Int_t a=255);
816  void SetColor(Float_t r, Float_t g, Float_t b, Float_t a=1);
817  void SetColor(Color_t color_index);
818  void SetColor(Color_t color_index, Char_t transparency);
819  void SetTransparency(Char_t transparency);
820 
821  TString AsString() const;
822 
823  ClassDefNV(TGLColor, 0); // Color in preferred GL format - RGBA.
824 };
825 
826 
827 //////////////////////////////////////////////////////////////////////////
828 //
829 // TGLColorSet
830 //
831 // A collection of colors used for OpenGL rendering.
832 //
833 //////////////////////////////////////////////////////////////////////////
834 
836 {
837 protected:
842  TGLColor fSelection[5]; // Colors for shape-selection-levels
843 
844 public:
845  TGLColorSet();
846  TGLColorSet(const TGLColorSet& s);
847  ~TGLColorSet() = default;
848 
850 
853  TGLColor& Outline() { return fOutline; }
854  TGLColor& Markup() { return fMarkup; }
855  TGLColor& Selection(Int_t i) { return fSelection[i]; }
856 
857  const TGLColor& Background() const { return fBackground; }
858  const TGLColor& Foreground() const { return fForeground; }
859  const TGLColor& Outline() const { return fOutline; }
860  const TGLColor& Markup() const { return fMarkup; }
861  const TGLColor& Selection(Int_t i) const { return fSelection[i]; }
862 
863  void StdDarkBackground();
864  void StdLightBackground();
865 
866  ClassDefNV(TGLColorSet, 0); // Collection of colors used for GL rendering.
867 };
868 
869 //////////////////////////////////////////////////////////////////////////
870 // //
871 // TGLUtil //
872 // //
873 // Wrapper class for various misc static functions - error checking, //
874 // draw helpers etc. //
875 // //
876 //////////////////////////////////////////////////////////////////////////
877 
878 class TGLUtil
879 {
880 public:
882  {
883  public:
885  virtual ~TColorLocker() { UnlockColor(); }
886 
887  ClassDef(TColorLocker,0); // Lock/unlock color in constructor/destructor.
888  };
889 
891  {
893  public:
896 
899 
900  ClassDef(TDrawQualityModifier,0); // Set/restore draw quality in constructor/destructor.
901  };
902 
904  {
906  public:
909 
912 
913  ClassDef(TDrawQualityScaler,0); // Multiply/restore draw quality in constructor/destructor.
914  };
915 
916 private:
919 
921 
926 
930 
931  TGLUtil(const TGLUtil&); // Not implemented.
932  TGLUtil& operator=(const TGLUtil&); // Not implemented.
933 
934 public:
935  virtual ~TGLUtil() {}
936  static void InitializeIfNeeded();
937 
938  // Error checking
939  static Int_t CheckError(const char * loc);
940 
941  // Polygon tesselator for direct drawing
946 
947  // Some simple shape drawing utils
950 
951  static UInt_t GetDrawQuality();
952  static void SetDrawQuality(UInt_t dq);
953  static void ResetDrawQuality();
954  static UInt_t GetDefaultDrawQuality();
955  static void SetDefaultDrawQuality(UInt_t dq);
956 
957  static UInt_t LockColor();
958  static UInt_t UnlockColor();
959  static Bool_t IsColorLocked();
960 
961  static void Color(const TGLColor& color);
962  static void ColorAlpha(const TGLColor& color, UChar_t alpha);
963  static void ColorAlpha(const TGLColor& color, Float_t alpha);
964  static void ColorAlpha(Color_t color_index, Float_t alpha=1);
965  static void ColorTransparency(Color_t color_index, Char_t transparency=0);
966  static void Color3ub(UChar_t r, UChar_t g, UChar_t b);
967  static void Color4ub(UChar_t r, UChar_t g, UChar_t b, UChar_t a);
968  static void Color3ubv(const UChar_t* rgb);
969  static void Color4ubv(const UChar_t* rgba);
970  static void Color3f(Float_t r, Float_t g, Float_t b);
971  static void Color4f(Float_t r, Float_t g, Float_t b, Float_t a);
972  static void Color3fv(const Float_t* rgb);
973  static void Color4fv(const Float_t* rgba);
974 
975  // Coordinate conversion and extra scaling (needed for osx retina)
976  static void PointToViewport(Int_t& x, Int_t& y);
977  static void PointToViewport(Int_t& x, Int_t& y, Int_t& w, Int_t& h);
980  static Int_t GetPickingRadius();
981 
982  static Float_t GetPointSizeScale();
983  static void SetPointSizeScale(Float_t scale);
984  static Float_t GetLineWidthScale();
985  static void SetLineWidthScale(Float_t scale);
986 
987  static void PointSize(Float_t point_size);
988  static void LineWidth(Float_t line_width);
989 
990  static Float_t PointSize();
991  static Float_t LineWidth();
992 
993  static void BeginExtendPickRegion(Float_t scale);
994  static void EndExtendPickRegion();
995 
996  static void RenderPolyMarkers(const TAttMarker& marker, Char_t transp,
997  Float_t* p, Int_t n,
998  Int_t pick_radius=0, Bool_t selection=kFALSE,
999  Bool_t sec_selection=kFALSE);
1000 
1001  static void RenderPolyMarkers(const TAttMarker &marker, const std::vector<Double_t> &points,
1002  Double_t dX, Double_t dY, Double_t dZ);
1003 
1004  static void RenderPoints(const TAttMarker& marker,
1005  Float_t* p, Int_t n,
1006  Int_t pick_radius=0, Bool_t selection=kFALSE,
1007  Bool_t sec_selection=kFALSE);
1008 
1009  static void RenderPoints(const TAttMarker& marker,
1010  const std::vector<Double_t> &points);
1011 
1012  static void RenderCrosses(const TAttMarker& marker,
1013  Float_t* p, Int_t n,
1014  Bool_t sec_selection=kFALSE);
1015 
1016  static void RenderCrosses(const TAttMarker& marker,
1017  const std::vector<Double_t> &points,
1018  Double_t dX, Double_t dY, Double_t dZ);
1019 
1020  static void RenderPolyLine(const TAttLine& aline, Char_t transp,
1021  Float_t* p, Int_t n,
1022  Int_t pick_radius=0, Bool_t selection=kFALSE);
1023 
1024  static void BeginAttLine(const TAttLine& aline, Char_t transp,
1025  Int_t pick_radius=0, Bool_t selection=kFALSE);
1026  static void EndAttLine(Int_t pick_radius=0, Bool_t selection=kFALSE);
1027 
1028  // TODO: These draw routines should take LOD hints
1029  static void SetDrawColors(const UChar_t rgba[4]);
1030  static void DrawSphere(const TGLVertex3 & position, Double_t radius, const UChar_t rgba[4]);
1031  static void DrawLine(const TGLLine3 & line, ELineHeadShape head, Double_t size, const UChar_t rgba[4]);
1032  static void DrawLine(const TGLVertex3 & start, const TGLVector3 & vector, ELineHeadShape head,
1033  Double_t size, const UChar_t rgba[4]);
1034  static void DrawRing(const TGLVertex3 & center, const TGLVector3 & normal,
1035  Double_t radius, const UChar_t* rgba);
1036 
1037  static void DrawReferenceMarker(const TGLCamera & camera,
1038  const TGLVertex3 & pos,
1039  Float_t radius = 3,
1040  const UChar_t * rgba = 0);
1041  static void DrawSimpleAxes(const TGLCamera & camera,
1042  const TGLBoundingBox & bbox,
1043  Int_t axesType);
1044  static void DrawNumber(const TString & num,
1045  const TGLVertex3 & pos,
1046  Bool_t center = kFALSE);
1047 
1048  // Frequently used colors.
1049  static const UChar_t fgRed[4];
1050  static const UChar_t fgGreen[4];
1051  static const UChar_t fgBlue[4];
1052  static const UChar_t fgYellow[4];
1053  static const UChar_t fgWhite[4];
1054  static const UChar_t fgGrey[4];
1055 
1056  ClassDef(TGLUtil,0); // Wrapper class for misc GL pieces
1057 };
1058 
1059 /**************************************************************************/
1060 
1062 {
1063 private:
1066 
1070 
1071  void SetState(Bool_t s);
1072 
1073 public:
1076 };
1077 
1079 {
1080 private:
1083 
1086 
1087 public:
1090 };
1091 
1093 {
1094  TGLFloatHolder(const TGLFloatHolder&); // Not implemented
1095  TGLFloatHolder& operator=(const TGLFloatHolder&); // Not implemented
1096 
1101 
1102 public:
1103  TGLFloatHolder(Int_t what, Float_t state, void (*foo)(Float_t));
1104  ~TGLFloatHolder();
1105 };
1106 
1108 private:
1110 
1111 public:
1112  TGLEnableGuard(Int_t cap);
1113  ~TGLEnableGuard();
1114 
1115 private:
1118 };
1119 
1121 private:
1123 
1124 public:
1125  TGLDisableGuard(Int_t cap);
1126  ~TGLDisableGuard();
1127 
1128 private:
1131 };
1132 
1134  std::vector<UChar_t> fBuffer;
1137 
1138 public:
1140  virtual ~TGLSelectionBuffer();
1141 
1142  void ReadColorBuffer(Int_t width, Int_t height);
1143  void ReadColorBuffer(Int_t x, Int_t y, Int_t width, Int_t height);
1144  const UChar_t *GetPixelColor(Int_t px, Int_t py)const;
1145 
1146 private:
1149 
1150  ClassDef(TGLSelectionBuffer, 0); //Holds color buffer content for selection
1151 };
1152 
1153 template<class T>
1154 class TGL2DArray : public std::vector<T> {
1155 private:
1158  typedef typename std::vector<T>::size_type size_type;
1159 
1160 public:
1162  void SetMaxRow(Int_t max)
1163  {
1164  fMaxRow = max;
1165  }
1166  void SetRowLen(Int_t len)
1167  {
1168  fRowLen = len;
1169  }
1170  const T *operator [] (size_type ind)const
1171  {
1172  return &std::vector<T>::operator [](ind * fRowLen);
1173  }
1175  {
1176  return &std::vector<T>::operator [] (ind * fRowLen);
1177  }
1178 };
1179 
1180 class TGLPlotCoordinates;
1181 class TGLQuadric;
1182 class TAxis;
1183 
1184 namespace Rgl {
1185 
1186 extern const Float_t gRedEmission[];
1187 extern const Float_t gGreenEmission[];
1188 extern const Float_t gBlueEmission[];
1189 extern const Float_t gOrangeEmission[];
1190 extern const Float_t gWhiteEmission[];
1191 extern const Float_t gGrayEmission[];
1192 extern const Float_t gNullEmission[];
1193 
1194 typedef std::pair<Int_t, Int_t> BinRange_t;
1195 typedef std::pair<Double_t, Double_t> Range_t;
1196 
1197 void ObjectIDToColor(Int_t objectID, Bool_t highColor);
1198 Int_t ColorToObjectID(const UChar_t *color, Bool_t highColor);
1199 void DrawQuadOutline(const TGLVertex3 &v1, const TGLVertex3 &v2,
1200  const TGLVertex3 &v3, const TGLVertex3 &v4);
1201 void DrawQuadFilled(const TGLVertex3 &v0, const TGLVertex3 &v1,
1202  const TGLVertex3 &v2, const TGLVertex3 &v3,
1203  const TGLVector3 &normal);
1204 void DrawQuadFilled(const Double_t *v0, const Double_t *v1,
1205  const Double_t *v2, const Double_t *v3,
1206  const Double_t *normal);
1207 
1208 void DrawSmoothFace(const TGLVertex3 &v1, const TGLVertex3 &v2,
1209  const TGLVertex3 &v3, const TGLVector3 &norm1,
1210  const TGLVector3 &norm2, const TGLVector3 &norm3);
1211 void DrawBoxFront(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax,
1212  Double_t zMin, Double_t zMax, Int_t fp);
1213 
1214 void DrawTransparentBox(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax,
1215  Double_t zMin, Double_t zMax, Int_t fp);
1216 
1217 
1218 void DrawBoxFrontTextured(Double_t xMin, Double_t xMax, Double_t yMin,
1219  Double_t yMax, Double_t zMin, Double_t zMax,
1220  Double_t tMin, Double_t tMax, Int_t front);
1221 
1223  const Double_t *rgba1, const Double_t *rgba2);
1224 
1225 void DrawQuadStripWithRadialGradientFill(unsigned nPoints, const Double_t *inner, const Double_t *innerRGBA,
1226  const Double_t *outer, const Double_t *outerRGBA);
1227 
1228 #ifndef __CINT__
1229 void DrawTrapezoidTextured(const Double_t ver[][2], Double_t zMin, Double_t zMax,
1230  Double_t tMin, Double_t tMax);
1231 void DrawTrapezoidTextured(const Double_t ver[][3], Double_t texMin, Double_t texMax);
1232 void DrawTrapezoidTextured2(const Double_t ver[][2], Double_t zMin, Double_t zMax,
1233  Double_t tMin, Double_t tMax);
1234 #endif
1235 
1236 void DrawCylinder(TGLQuadric *quadric, Double_t xMin, Double_t xMax, Double_t yMin,
1237  Double_t yMax, Double_t zMin, Double_t zMax);
1238 void DrawSphere(TGLQuadric *quadric, Double_t xMin, Double_t xMax, Double_t yMin,
1239  Double_t yMax, Double_t zMin, Double_t zMax);
1240 void DrawError(Double_t xMin, Double_t xMax, Double_t yMin,
1241  Double_t yMax, Double_t zMin, Double_t zMax);
1242 
1243 #ifndef __CINT__
1244 void DrawTrapezoid(const Double_t ver[][2], Double_t zMin, Double_t zMax, Bool_t color = kTRUE);
1245 void DrawTrapezoid(const Double_t ver[][3]);
1246 #endif
1247 
1248 void DrawAxes(Int_t frontPoint, const Int_t *viewport, const TGLVertex3 *box2D,
1249  const TGLPlotCoordinates *plotCoord, TAxis *xAxis, TAxis *yAxis,
1250  TAxis *zAxis);
1251 void SetZLevels(TAxis *zAxis, Double_t zMin, Double_t zMax,
1252  Double_t zScale, std::vector<Double_t> &zLevels);
1253 
1254 void DrawFaceTextured(const TGLVertex3 &v1, const TGLVertex3 &v2, const TGLVertex3 &v3,
1255  Double_t t1, Double_t t2, Double_t t3, const TGLVector3 &norm1,
1256  const TGLVector3 &norm2, const TGLVector3 &norm3);
1257 void DrawFaceTextured(const TGLVertex3 &v1, const TGLVertex3 &v2, const TGLVertex3 &v3,
1258  Double_t t1, Double_t t2, Double_t t3, Double_t z, const TGLVector3 &planeNormal);
1259 void GetColor(Float_t v, Float_t vmin, Float_t vmax, Int_t type, Float_t *rgba);
1260 
1261 class TGuardBase {
1262 private:
1263  mutable Bool_t fActive;
1264 
1266 protected:
1268  : fActive(kTRUE)
1269  {
1270  }
1272  : fActive(kTRUE)
1273  {
1274  rhs.fActive = kFALSE;
1275  }
1276 
1278  {
1279  return fActive;
1280  }
1281 
1282 public:
1283  void Stop()const
1284  {
1285  fActive = kFALSE;
1286  }
1287 };
1288 
1289 template<class Func, class Arg>
1290 class TOneArgGuard : public TGuardBase {
1291 private:
1292  Func fFunc;
1293  Arg fArg;
1294 public:
1295  TOneArgGuard(Func f, Arg a)
1296  : fFunc(f), fArg(a)
1297  {
1298  }
1300  {
1301  if (IsActive())
1302  fFunc(fArg);
1303  }
1304 };
1305 
1306 template<class Func, class Arg1, class Arg2>
1307 class TTwoArgsGuard : public TGuardBase {
1308 private:
1309  Func fFunc;
1310  Arg1 fArg1;
1311  Arg2 fArg2;
1312 
1313 public:
1314  TTwoArgsGuard(Func f, Arg1 a1, Arg2 a2)
1315  : fFunc(f), fArg1(a1), fArg2(a2)
1316  {
1317  }
1319  {
1320  if (IsActive())
1321  fFunc(fArg1, fArg2);
1322  }
1323 };
1324 
1325 template<class Func, class Arg>
1327 {
1328  return TOneArgGuard<Func, Arg>(f, a);
1329 }
1330 
1331 template<class Func, class Arg1, class Arg2>
1333 {
1334  return TTwoArgsGuard<Func, Arg1, Arg2>(f, a1, a2);
1335 }
1336 
1337 }//namespace Rgl.
1338 
1340 private:
1341  std::vector<UChar_t> fTexels;
1342  const std::vector<Double_t> *fContours;
1344  mutable UInt_t fTexture;
1347 
1348  TGLLevelPalette(const TGLLevelPalette&); // Not implemented
1349  TGLLevelPalette& operator=(const TGLLevelPalette&); // Not implemented
1350 
1351 public:
1352  TGLLevelPalette();
1353 
1354  Bool_t GeneratePalette(UInt_t paletteSize, const Rgl::Range_t &zRange, Bool_t checkSize = kTRUE);
1355 
1356  void SetContours(const std::vector<Double_t> *contours);
1357 
1358  void EnableTexture(Int_t mode)const;
1359  void DisableTexture()const;
1360 
1361  Int_t GetPaletteSize()const;
1362 
1363  Double_t GetTexCoord(Double_t z)const;
1364 
1365  const UChar_t *GetColour(Double_t z)const;
1366  const UChar_t *GetColour(Int_t ind)const;
1367 };
1368 
1369 #endif // ROOT_TGLUtil
TGLUtil::kAxesOrigin
@ kAxesOrigin
Definition: TGLUtil.h:949
TGLColor::GetTransparency
Char_t GetTransparency() const
Returns transparency value.
Definition: TGLUtil.cxx:1227
TGLUtil::fgPickingRadius
static Int_t fgPickingRadius
Definition: TGLUtil.h:929
TGLUtil
Wrapper class for various misc static functions - error checking, draw helpers etc.
Definition: TGLUtil.h:879
c
#define c(i)
Definition: RSha256.hxx:101
GLUtesselator
Definition: tess.h:59
TGLVertex3::Y
Double_t Y() const
Definition: TGLUtil.h:121
vertex
REAL * vertex
Definition: triangle.c:512
TGLUtil::DrawSphere
static void DrawSphere(const TGLVertex3 &position, Double_t radius, const UChar_t rgba[4])
Draw sphere, centered on vertex 'position', with radius 'radius', color 'rgba'.
Definition: TGLUtil.cxx:2351
TGLRect::X
Int_t & X()
Definition: TGLUtil.h:447
TGLColor::SetRed
void SetRed(Int_t v)
Definition: TGLUtil.h:810
TGLColor::Arr
UChar_t * Arr()
Definition: TGLUtil.h:799
TGLMatrix::~TGLMatrix
virtual ~TGLMatrix()
Destroy matrix object.
Definition: TGLUtil.cxx:695
Rgl::make_guard
TOneArgGuard< Func, Arg > make_guard(Func f, Arg a)
Definition: TGLUtil.h:1326
TGLVertex3::Fill
void Fill(Double_t val)
Definition: TGLUtil.h:204
operator-
TGLVector3 operator-(const TGLVertex3 &vertex1, const TGLVertex3 &vertex2)
Definition: TGLUtil.h:351
n
const Int_t n
Definition: legend1.C:16
TAxis
Class to manage histogram axis.
Definition: TAxis.h:30
TGLLine3::End
const TGLVertex3 End() const
Definition: TGLUtil.h:405
TGLLine3::TGLLine3
TGLLine3(const TGLVertex3 &start, const TGLVertex3 &end)
Vector of line from fVertex.
Definition: TGLUtil.cxx:176
TGLVertex3::ValidIndex
Bool_t ValidIndex(UInt_t index) const
Definition: TGLUtil.h:87
kGLSurfacePlot
@ kGLSurfacePlot
Definition: TGLUtil.h:53
Rgl::DrawTrapezoid
void DrawTrapezoid(const Double_t ver[][2], Double_t zMin, Double_t zMax, Bool_t color=kTRUE)
Definition: TGLUtil.cxx:3348
TGLPlane::~TGLPlane
~TGLPlane()=default
Intersection
std::pair< Bool_t, TGLLine3 > Intersection(const TGLPlane &p1, const TGLPlane &p2)
Find 3D line interestion of this plane with 'other'.
Definition: TGLUtil.cxx:516
TGLUtil::GetPickingRadius
static Int_t GetPickingRadius()
Returns picking radius.
Definition: TGLUtil.cxx:1865
TGLVertex3::Maximum
void Maximum(const TGLVertex3 &other)
Definition: TGLUtil.cxx:120
TGLRect::Diagonal
Int_t Diagonal() const
Return the diagonal of the rectangle.
Definition: TGLUtil.cxx:286
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
v0
@ v0
Definition: rootcling_impl.cxx:3636
TGLUtil::SetPointSizeScale
static void SetPointSizeScale(Float_t scale)
Set global point-size scale.
Definition: TGLUtil.cxx:1885
Rgl::kPartial
@ kPartial
Definition: TGLUtil.h:37
TGLMatrix::Arr
Double_t * Arr()
Definition: TGLUtil.h:665
TGLLine3::~TGLLine3
~TGLLine3()=default
TGLUtil::kLineHeadArrow
@ kLineHeadArrow
Definition: TGLUtil.h:948
TGLRect::fWidth
Int_t fWidth
Corner.
Definition: TGLUtil.h:426
Rgl::DrawBoxFront
void DrawBoxFront(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t zMin, Double_t zMax, Int_t fp)
Draws lego's bar as a 3d box.
Definition: TGLUtil.cxx:3007
f
#define f(i)
Definition: RSha256.hxx:104
TGLPlane::Negate
void Negate()
Negate the plane.
Definition: TGLUtil.cxx:481
TGLRect::CArr
Int_t * CArr()
Definition: TGLUtil.h:444
TGLVertex3::operator*=
TGLVertex3 & operator*=(Double_t f)
Definition: TGLUtil.h:173
TGLColorSet::Foreground
TGLColor & Foreground()
Definition: TGLUtil.h:852
TGLVector3::ClassDefNV
ClassDefNV(TGLVector3, 1)
TGLUtil::GetDrawTesselator4dv
static GLUtesselator * GetDrawTesselator4dv()
Returns a tesselator for direct drawing when using 4-vertices with double precision.
Definition: TGLUtil.cxx:1555
TGLRect::Y
Int_t Y() const
Definition: TGLUtil.h:448
TGLUtil::TColorLocker::TColorLocker
TColorLocker()
Definition: TGLUtil.h:884
TGLUtil::IsColorLocked
static Bool_t IsColorLocked()
Returns true if color lock-count is greater than 0.
Definition: TGLUtil.cxx:1683
TGLUtil::Color4f
static void Color4f(Float_t r, Float_t g, Float_t b, Float_t a)
Wrapper for glColor4f.
Definition: TGLUtil.cxx:1789
Rgl::gGreenEmission
const Float_t gGreenEmission[]
Definition: TGLUtil.cxx:2842
TGLRect::Expand
void Expand(Int_t x, Int_t y)
Expand the rect to encompass point (x,y)
Definition: TGLUtil.cxx:261
TGLPlaneSet_ci
std::vector< TGLPlane >::const_iterator TGLPlaneSet_ci
Definition: TGLUtil.h:573
TGLUtil::TDrawQualityScaler::fOldQuality
Int_t fOldQuality
Definition: TGLUtil.h:905
TGLFloatHolder::fWhat
Int_t fWhat
Definition: TGLUtil.h:1097
TGLDisableGuard::~TGLDisableGuard
~TGLDisableGuard()
TGLDisableGuard destructor.
Definition: TGLUtil.cxx:2773
TGLUtil::operator=
TGLUtil & operator=(const TGLUtil &)
TGLUtil::Color4fv
static void Color4fv(const Float_t *rgba)
Wrapper for glColor4fv.
Definition: TGLUtil.cxx:1805
Rgl::TGuardBase::TGuardBase
TGuardBase(const TGuardBase &rhs)
Definition: TGLUtil.h:1271
TGLUtil::TGLUtil
TGLUtil(const TGLUtil &)
TGLMatrix::Set
void Set(const TGLVertex3 &origin, const TGLVector3 &zAxis, const TGLVector3 &xAxis=0)
Set matrix which when applied puts local origin at 'origin' and the local Z axis in direction 'z'.
Definition: TGLUtil.cxx:736
TGLColorSet::StdLightBackground
void StdLightBackground()
Set defaults for light (white) background.
Definition: TGLUtil.cxx:1389
TGLPlane::Set
void Set(const TGLPlane &other)
Assign from other.
Definition: TGLUtil.cxx:425
TGLVertex3::Shift
void Shift(TGLVector3 &shift)
Offset a vertex by vector 'shift'.
Definition: TGLUtil.cxx:92
Rgl::GetColor
void GetColor(Float_t v, Float_t vmin, Float_t vmax, Int_t type, Float_t *rgba)
This function creates color for parametric surface's vertex, using its 'u' value.
Definition: TGLUtil.cxx:3877
TGLLine3
3D space, fixed length, line class, with direction / length 'vector', passing through point 'vertex'.
Definition: TGLUtil.h:387
TGLUtil::fgYellow
static const UChar_t fgYellow[4]
Definition: TGLUtil.h:1052
TGLMatrix::MultiplyIP
void MultiplyIP(TGLVector3 &v, Double_t w=1) const
Multiply vector in-place.
Definition: TGLUtil.cxx:1075
Rgl::DrawTransparentBox
void DrawTransparentBox(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t zMin, Double_t zMax, Int_t fp)
Draws lego's bar as a 3d box.
Definition: TGLUtil.cxx:3057
TGLLevelPalette
Definition: TGLUtil.h:1339
kGLLegoPlot
@ kGLLegoPlot
Definition: TGLUtil.h:52
r
ROOT::R::TRInterface & r
Definition: Object.C:4
operator/
const TGLVector3 operator/(const TGLVector3 &vec, Double_t val)
Definition: TGLUtil.h:331
TGLFloatHolder
Definition: TGLUtil.h:1093
TGLDisableGuard::operator=
TGLDisableGuard & operator=(const TGLDisableGuard &)
TGLDisableGuard::TGLDisableGuard
TGLDisableGuard(const TGLDisableGuard &)
TGLUtil::GetPointSizeScale
static Float_t GetPointSizeScale()
Get global point-size scale.
Definition: TGLUtil.cxx:1877
TGLFloatHolder::fFlip
Bool_t fFlip
Definition: TGLUtil.h:1099
TGLEnableGuard::fCap
Int_t fCap
Definition: TGLUtil.h:1109
TGLPlane::DistanceTo
Double_t DistanceTo(const TGLVertex3 &vertex) const
Distance from plane to vertex.
Definition: TGLUtil.cxx:492
TGLUtil::fgRed
static const UChar_t fgRed[4]
Definition: TGLUtil.h:1049
TGLMatrix::Rotate
void Rotate(const TGLVertex3 &pivot, const TGLVector3 &axis, Double_t angle)
Update matrix so resulting transform has been rotated about 'pivot' (in parent frame),...
Definition: TGLUtil.cxx:870
TGLColor::SetAlpha
void SetAlpha(Int_t v)
Definition: TGLUtil.h:813
TGLRect::Set
void Set(Int_t x, Int_t y, Int_t width, Int_t height)
Definition: TGLUtil.h:471
TGLUtil::fgDrawQuality
static UInt_t fgDrawQuality
Definition: TGLUtil.h:918
TGLMatrix::Dump
void Dump() const
Output 16 matrix components to std::cout.
Definition: TGLUtil.cxx:1132
TGLFloatHolder::fFoo
void(* fFoo)(Float_t)
Definition: TGLUtil.h:1100
Rgl::TGuardBase::fActive
Bool_t fActive
Definition: TGLUtil.h:1263
TGLLine3::Vector
const TGLVector3 & Vector() const
Definition: TGLUtil.h:406
TGLMatrix::GetBaseVec
TGLVector3 GetBaseVec(Int_t b) const
Definition: TGLUtil.h:754
TGLCamera
Abstract base camera class - concrete classes for orthographic and perspective cameras derive from it...
Definition: TGLCamera.h:44
Rgl::ColorToObjectID
Int_t ColorToObjectID(const UChar_t *color, Bool_t highColor)
Definition: TGLUtil.cxx:2917
Float_t
float Float_t
Definition: RtypesCore.h:57
width
include TDocParser_001 C image html pict1_TDocParser_001 png width
Definition: TDocParser.cxx:121
TGLUtil::fgWhite
static const UChar_t fgWhite[4]
Definition: TGLUtil.h:1053
TGeant4Unit::s
static constexpr double s
Definition: TGeant4SystemOfUnits.h:162
TGLUtil::TDrawQualityScaler::~TDrawQualityScaler
virtual ~TDrawQualityScaler()
Definition: TGLUtil.h:910
TGLLine3::Draw
void Draw() const
Draw line in current basic GL color.
Definition: TGLUtil.cxx:211
TGLVertex3::X
Double_t X() const
Definition: TGLUtil.h:119
TGLColorSet::fSelection
TGLColor fSelection[5]
Definition: TGLUtil.h:842
TGLRect::Aspect
Double_t Aspect() const
Definition: TGLUtil.h:500
Int_t
int Int_t
Definition: RtypesCore.h:45
TGLUtil::TColorLocker::~TColorLocker
virtual ~TColorLocker()
Definition: TGLUtil.h:885
TGLUtil::GetPointLineScalingFactor
static Float_t GetPointLineScalingFactor()
Return extra scaling factor for points and lines.
Definition: TGLUtil.cxx:1857
TGLUtil::PointSize
static Float_t PointSize()
Get the point-size, taking the global scaling into account.
Definition: TGLUtil.cxx:1929
TGLSelectionBuffer::GetPixelColor
const UChar_t * GetPixelColor(Int_t px, Int_t py) const
Get pixel color.
Definition: TGLUtil.cxx:2826
Rgl::TTwoArgsGuard::fArg2
Arg2 fArg2
Definition: TGLUtil.h:1311
kGLTF3Plot
@ kGLTF3Plot
Definition: TGLUtil.h:55
TGLColor::SetTransparency
void SetTransparency(Char_t transparency)
Set alpha from the transparency.
Definition: TGLUtil.cxx:1312
x
Double_t x[n]
Definition: legend1.C:17
TGLUtil::kLineHeadNone
@ kLineHeadNone
Definition: TGLUtil.h:948
TGLUtil::ColorTransparency
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:1735
Rgl::DrawBoxFrontTextured
void DrawBoxFrontTextured(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t zMin, Double_t zMax, Double_t tMin, Double_t tMax, Int_t front)
Draws lego's bar as a 3d box LULULULU.
Definition: TGLUtil.cxx:3134
TGLPlaneSet_i
std::vector< TGLPlane >::iterator TGLPlaneSet_i
Definition: TGLUtil.h:572
TGLFloatHolder::fState
Float_t fState
Definition: TGLUtil.h:1098
TGLVector3::operator-
TGLVector3 operator-() const
Definition: TGLUtil.h:292
TGLUtil::DrawRing
static void DrawRing(const TGLVertex3 &center, const TGLVector3 &normal, Double_t radius, const UChar_t *rgba)
Draw ring, centered on 'center', lying on plane defined by 'center' & 'normal' of outer radius 'radiu...
Definition: TGLUtil.cxx:2432
TGLColorSet::fForeground
TGLColor fForeground
Definition: TGLUtil.h:839
TGLCapabilityEnabler::~TGLCapabilityEnabler
~TGLCapabilityEnabler()
Destructor - reset state if changed.
Definition: TGLUtil.cxx:2719
Rgl::TOneArgGuard::TOneArgGuard
TOneArgGuard(Func f, Arg a)
Definition: TGLUtil.h:1295
TGLUtil::TDrawQualityScaler::TDrawQualityScaler
TDrawQualityScaler(Float_t fac)
Definition: TGLUtil.h:907
Rgl::TGuardBase
Definition: TGLUtil.h:1261
Rgl::DrawTrapezoidTextured
void DrawTrapezoidTextured(const Double_t ver[][2], Double_t zMin, Double_t zMax, Double_t tMin, Double_t tMax)
In polar coordinates, box became trapezoid.
Definition: TGLUtil.cxx:3418
TGLMatrix
16 component (4x4) transform matrix - column MAJOR as per GL.
Definition: TGLUtil.h:598
TGLColorSet::Markup
TGLColor & Markup()
Definition: TGLUtil.h:854
TGLUtil::ColorAlpha
static void ColorAlpha(const TGLColor &color, UChar_t alpha)
Set color from TGLColor and alpha value.
Definition: TGLUtil.cxx:1699
TGLLevelPalette::fContours
const std::vector< Double_t > * fContours
Definition: TGLUtil.h:1342
TGLCapabilitySwitch::operator=
TGLCapabilitySwitch & operator=(const TGLCapabilitySwitch &)
TGLPlane::TGLPlane
TGLPlane()
Construct a default plane of x + y + z = 0.
Definition: TGLUtil.cxx:336
TGLRect::CArr
const Int_t * CArr() const
Definition: TGLUtil.h:443
TGLCapabilitySwitch::fWhat
Int_t fWhat
Definition: TGLUtil.h:1067
TGLRect::Height
Int_t & Height()
Definition: TGLUtil.h:453
TGLRect::TGLRect
TGLRect()
Positive width/height.
Definition: TGLUtil.cxx:229
TGLUtil::Color4ub
static void Color4ub(UChar_t r, UChar_t g, UChar_t b, UChar_t a)
Wrapper for glColor4ub.
Definition: TGLUtil.cxx:1757
TGLRect::Right
Int_t Right() const
Definition: TGLUtil.h:457
TString
Basic string class.
Definition: TString.h:136
TGLUtil::ELineHeadShape
ELineHeadShape
Definition: TGLUtil.h:948
TGLMatrix::Invert
Double_t Invert()
Invert the matrix, returns determinant.
Definition: TGLUtil.cxx:971
TGLUtil::kAxesEdge
@ kAxesEdge
Definition: TGLUtil.h:949
TGLUtil::EAxesType
EAxesType
Definition: TGLUtil.h:949
TGLUtil::kAxesNone
@ kAxesNone
Definition: TGLUtil.h:949
TGLUtil::kLineHeadBox
@ kLineHeadBox
Definition: TGLUtil.h:948
TGLUtil::CheckError
static Int_t CheckError(const char *loc)
Check current GL error state, outputting details via ROOT Error method if one.
Definition: TGLUtil.cxx:1640
TGLVertex3::~TGLVertex3
~TGLVertex3()
Destroy vertex object.
Definition: TGLUtil.cxx:85
TGLColorSet
Class encapsulating a set of colors used throughout standard rendering.
Definition: TGLUtil.h:836
TGLColorSet::StdDarkBackground
void StdDarkBackground()
Set defaults for dark (black) background.
Definition: TGLUtil.cxx:1372
Bool_t
bool Bool_t
Definition: RtypesCore.h:63
TGLBoundingBox
Concrete class describing an orientated (free) or axis aligned box of 8 vertices.
Definition: TGLBoundingBox.h:33
TGLUtil::Color
static void Color(const TGLColor &color)
Set color from TGLColor.
Definition: TGLUtil.cxx:1691
Color_t
short Color_t
Definition: RtypesCore.h:83
TGLSelectionBuffer::fBuffer
std::vector< UChar_t > fBuffer
Definition: TGLUtil.h:1134
TGLColorSet::Selection
const TGLColor & Selection(Int_t i) const
Definition: TGLUtil.h:861
TGLUtil::GetDefaultDrawQuality
static UInt_t GetDefaultDrawQuality()
static: get default draw quality
Definition: TGLUtil.cxx:1623
TGLColorSet::ClassDefNV
ClassDefNV(TGLColorSet, 0)
kGLDefaultPlot
@ kGLDefaultPlot
Definition: TGLUtil.h:62
v
@ v
Definition: rootcling_impl.cxx:3635
TGLUtil::SetLineWidthScale
static void SetLineWidthScale(Float_t scale)
Set global line-width scale.
Definition: TGLUtil.cxx:1901
b
#define b(i)
Definition: RSha256.hxx:100
TGLUtil::Color3ub
static void Color3ub(UChar_t r, UChar_t g, UChar_t b)
Wrapper for glColor3ub.
Definition: TGLUtil.cxx:1749
TGLPlotCoordinates
Helper class for plot-painters holding information about axis ranges, numbers of bins and flags if ce...
Definition: TGLPlotPainter.h:310
kGLCylindrical
@ kGLCylindrical
Definition: TGLUtil.h:46
TGLVertex3::operator[]
Double_t & operator[](Int_t index)
Definition: TGLUtil.h:182
TGLLevelPalette::TGLLevelPalette
TGLLevelPalette()
Ctor.
Definition: TGLUtil.cxx:4150
bool
TGLUtil::GetLineWidthScale
static Float_t GetLineWidthScale()
Returns global line-width scale.
Definition: TGLUtil.cxx:1893
Rgl::DrawCylinder
void DrawCylinder(TGLQuadric *quadric, Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t zMin, Double_t zMax)
Cylinder for lego3.
Definition: TGLUtil.cxx:3244
TGLMatrix::RotatePF
void RotatePF(Int_t i1, Int_t i2, Double_t amount)
Rotate in parent frame. Does optimised version of MultLeft.
Definition: TGLUtil.cxx:914
Rgl::Range_t
std::pair< Double_t, Double_t > Range_t
Definition: TGLUtil.h:1195
TGLColor::GetRed
UChar_t GetRed() const
Definition: TGLUtil.h:802
Rgl::TOneArgGuard::fFunc
Func fFunc
Definition: TGLUtil.h:1292
TGLPlane::CArr
const Double_t * CArr() const
Definition: TGLUtil.h:563
TGLVertex3::operator=
TGLVertex3 & operator=(const TGLVertex3 &rhs)
Definition: TGLUtil.h:155
x1
static const double x1[5]
Definition: RooGaussKronrodIntegrator1D.cxx:346
TGL2DArray::fRowLen
Int_t fRowLen
Definition: TGLUtil.h:1156
TGLUtil::fgColorLockCount
static UInt_t fgColorLockCount
Definition: TGLUtil.h:920
TGLCapabilitySwitch::~TGLCapabilitySwitch
~TGLCapabilitySwitch()
Destructor - reset state if changed.
Definition: TGLUtil.cxx:2688
kGLPolar
@ kGLPolar
Definition: TGLUtil.h:45
TGLPlane::D
Double_t D() const
Definition: TGLUtil.h:556
TGLUtil::GetDrawTesselator3dv
static GLUtesselator * GetDrawTesselator3dv()
Returns a tesselator for direct drawing when using 3-vertices with double precision.
Definition: TGLUtil.cxx:1534
TGLMatrix::fVals
Double_t fVals[16]
Definition: TGLUtil.h:601
TGL2DArray
Definition: TGLUtil.h:1154
ROOT::Math::Cephes::C
static double C[]
Definition: SpecFuncCephes.cxx:187
Rgl::DrawFaceTextured
void DrawFaceTextured(const TGLVertex3 &v1, const TGLVertex3 &v2, const TGLVertex3 &v3, Double_t t1, Double_t t2, Double_t t3, const TGLVector3 &norm1, const TGLVector3 &norm2, const TGLVector3 &norm3)
Draw textured triangle.
Definition: TGLUtil.cxx:3836
TGLColorSet::~TGLColorSet
~TGLColorSet()=default
TGLRect::Left
Int_t Left() const
Definition: TGLUtil.h:456
TGLDisableGuard
Definition: TGLUtil.h:1120
kGLIsoPlot
@ kGLIsoPlot
Definition: TGLUtil.h:58
TGLLine3::ClassDefNV
ClassDefNV(TGLLine3, 0)
TGLUtil::DrawLine
static void DrawLine(const TGLLine3 &line, ELineHeadShape head, Double_t size, const UChar_t rgba[4])
Draw thick line (tube) defined by 'line', with head at end shape 'head' - box/arrow/none,...
Definition: TGLUtil.cxx:2366
TGLUtil::RenderPolyMarkers
static void RenderPolyMarkers(const TAttMarker &marker, Char_t transp, Float_t *p, Int_t n, Int_t pick_radius=0, Bool_t selection=kFALSE, Bool_t sec_selection=kFALSE)
Render polymarkers at points specified by p-array.
Definition: TGLUtil.cxx:1974
TGLEnableGuard::TGLEnableGuard
TGLEnableGuard(const TGLEnableGuard &)
TGLRect::Width
Int_t Width() const
Definition: TGLUtil.h:450
TGLColor::operator=
TGLColor & operator=(const TGLColor &c)
Assignment operator.
Definition: TGLUtil.cxx:1204
TGLUtil::TDrawQualityModifier::~TDrawQualityModifier
virtual ~TDrawQualityModifier()
Definition: TGLUtil.h:897
TGLColorSet::operator=
TGLColorSet & operator=(const TGLColorSet &s)
Assignment operator.
Definition: TGLUtil.cxx:1358
TGLDisableGuard::TGLDisableGuard
TGLDisableGuard(Int_t cap)
TGLDisableGuard constructor.
Definition: TGLUtil.cxx:2764
TGLUtil::Color3f
static void Color3f(Float_t r, Float_t g, Float_t b)
Wrapper for glColor3f.
Definition: TGLUtil.cxx:1781
TGLMatrix::Multiply
TGLVector3 Multiply(const TGLVector3 &v, Double_t w=1) const
Multiply vector.
Definition: TGLUtil.cxx:1049
kGLStackPlot
@ kGLStackPlot
Definition: TGLUtil.h:56
Rgl::gNullEmission
const Float_t gNullEmission[]
Definition: TGLUtil.cxx:2847
Rgl::TTwoArgsGuard::TTwoArgsGuard
TTwoArgsGuard(Func f, Arg1 a1, Arg2 a2)
Definition: TGLUtil.h:1314
TGLPlane::ClassDefNV
ClassDefNV(TGLPlane, 0)
TGLVertex3::operator-
TGLVertex3 operator-() const
Definition: TGLUtil.h:167
Rgl::TGuardBase::Stop
void Stop() const
Definition: TGLUtil.h:1283
TGLCapabilityEnabler::fFlip
Bool_t fFlip
Definition: TGLUtil.h:1085
TGLColor::GetGreen
UChar_t GetGreen() const
Definition: TGLUtil.h:803
TGLPlane
3D plane class - of format Ax + By + Cz + D = 0
Definition: TGLUtil.h:525
TGLUtil::fgLineWidthScale
static Float_t fgLineWidthScale
Definition: TGLUtil.h:925
TGLMatrix::operator=
TGLMatrix & operator=(const TGLMatrix &rhs)
Definition: TGLUtil.h:673
TGLVertex3::operator+=
const TGLVertex3 & operator+=(const TGLVector3 &val)
Definition: TGLUtil.h:276
TGLVertex3::operator-=
const TGLVertex3 & operator-=(const TGLVector3 &val)
Definition: TGLUtil.h:268
TGL2DArray::size_type
std::vector< T >::size_type size_type
Definition: TGLUtil.h:1158
TGL2DArray::operator[]
const T * operator[](size_type ind) const
Definition: TGLUtil.h:1170
TGLLevelPalette::fPaletteSize
UInt_t fPaletteSize
Definition: TGLUtil.h:1343
TAttLine
Line Attributes class.
Definition: TAttLine.h:18
Rgl::DrawQuadStripWithRadialGradientFill
void DrawQuadStripWithRadialGradientFill(unsigned nPoints, const Double_t *inner, const Double_t *innerRGBA, const Double_t *outer, const Double_t *outerRGBA)
TODO: is it possible to use GLdouble to avoid problems with Double_t/GLdouble if they are not the sam...
Definition: TGLUtil.cxx:3217
TGLRect::fHeight
Int_t fHeight
Definition: TGLUtil.h:426
Rgl::SetZLevels
void SetZLevels(TAxis *zAxis, Double_t zMin, Double_t zMax, Double_t zScale, std::vector< Double_t > &zLevels)
Definition: TGLUtil.cxx:3820
Rgl::DrawQuadFilled
void DrawQuadFilled(const TGLVertex3 &v0, const TGLVertex3 &v1, const TGLVertex3 &v2, const TGLVertex3 &v3, const TGLVector3 &normal)
Draw quad face.
Definition: TGLUtil.cxx:2953
TGLUtil::EndAttLine
static void EndAttLine(Int_t pick_radius=0, Bool_t selection=kFALSE)
Restore previous line drawing state.
Definition: TGLUtil.cxx:2302
TGLColor::GetColorIndex
Color_t GetColorIndex() const
Returns color-index representing the color.
Definition: TGLUtil.cxx:1217
TGLCapabilityEnabler::operator=
TGLCapabilityEnabler & operator=(const TGLCapabilityEnabler &)
TGLLine3::Start
const TGLVertex3 & Start() const
Definition: TGLUtil.h:404
TGLLevelPalette::TGLLevelPalette
TGLLevelPalette(const TGLLevelPalette &)
h
#define h(i)
Definition: RSha256.hxx:106
TGLSelectionBuffer::TGLSelectionBuffer
TGLSelectionBuffer()
TGLSelectionBuffer constructor.
Definition: TGLUtil.cxx:2787
TGLUtil::RenderPoints
static void RenderPoints(const TAttMarker &marker, Float_t *p, Int_t n, Int_t pick_radius=0, Bool_t selection=kFALSE, Bool_t sec_selection=kFALSE)
Render markers as circular or square points.
Definition: TGLUtil.cxx:2014
TGLRect::Longest
Int_t Longest() const
Definition: TGLUtil.h:494
TGLMatrix::TGLMatrix
TGLMatrix()
Construct default identity matrix:
Definition: TGLUtil.cxx:606
TGLVector3
3 component (x/y/z) vector class.
Definition: TGLUtil.h:248
TGLColorSet::Markup
const TGLColor & Markup() const
Definition: TGLUtil.h:860
TGLLevelPalette::fTexels
std::vector< UChar_t > fTexels
Definition: TGLUtil.h:1341
Rgl::TOneArgGuard
Definition: TGLUtil.h:1290
a
auto * a
Definition: textangle.C:12
Rgl::DrawSphere
void DrawSphere(TGLQuadric *quadric, Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t zMin, Double_t zMax)
Cylinder for lego3.
Definition: TGLUtil.cxx:3275
TGLMatrix::IsScalingForRender
Bool_t IsScalingForRender() const
Return true if matrix is to be considered a scaling matrix for rendering.
Definition: TGLUtil.cxx:1111
TGLMatrix::SetBaseVec
void SetBaseVec(Int_t b, Double_t x, Double_t y, Double_t z)
Definition: TGLUtil.h:733
TGLColorSet::fBackground
TGLColor fBackground
Definition: TGLUtil.h:838
TGLCapabilitySwitch
Definition: TGLUtil.h:1062
TGLUtil::Color3fv
static void Color3fv(const Float_t *rgb)
Wrapper for glColor3fv.
Definition: TGLUtil.cxx:1797
TGL2DArray::SetMaxRow
void SetMaxRow(Int_t max)
Definition: TGLUtil.h:1162
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
TGLMatrix::MoveLF
void MoveLF(Int_t ai, Double_t amount)
Translate in local frame.
Definition: TGLUtil.cxx:813
TGLRect::Width
Int_t & Width()
Definition: TGLUtil.h:451
TGLCapabilityEnabler::fWhat
Int_t fWhat
Definition: TGLUtil.h:1084
TGLLevelPalette::operator=
TGLLevelPalette & operator=(const TGLLevelPalette &)
TGLVertex3::Z
Double_t Z() const
Definition: TGLUtil.h:123
TGLUtil::TDrawQualityModifier::TDrawQualityModifier
TDrawQualityModifier(Int_t dq)
Definition: TGLUtil.h:894
TGLCapabilitySwitch::fFlip
Bool_t fFlip
Definition: TGLUtil.h:1069
TGLRect::Top
Int_t Top() const
Definition: TGLUtil.h:458
TGL2DArray::fMaxRow
Int_t fMaxRow
Definition: TGLUtil.h:1157
TGLUtil::RenderPolyLine
static void RenderPolyLine(const TAttLine &aline, Char_t transp, Float_t *p, Int_t n, Int_t pick_radius=0, Bool_t selection=kFALSE)
Render poly-line as specified by the p-array.
Definition: TGLUtil.cxx:2246
TGLVector3::operator/=
TGLVector3 & operator/=(Double_t val)
Definition: TGLUtil.h:283
TGLUtil::DrawReferenceMarker
static void DrawReferenceMarker(const TGLCamera &camera, const TGLVertex3 &pos, Float_t radius=3, const UChar_t *rgba=0)
Draw a sphere- marker on world-coordinate 'pos' with pixel radius 'radius'.
Definition: TGLUtil.cxx:2473
TGLUtil::BeginExtendPickRegion
static void BeginExtendPickRegion(Float_t scale)
Definition: TGLUtil.cxx:1946
TGLRect::X
Int_t X() const
Definition: TGLUtil.h:446
TGLSelectionBuffer::ReadColorBuffer
void ReadColorBuffer(Int_t width, Int_t height)
Read color buffer.
Definition: TGLUtil.cxx:2802
TGL2DArray::SetRowLen
void SetRowLen(Int_t len)
Definition: TGLUtil.h:1166
Rgl::TGuardBase::operator=
TGuardBase & operator=(const TGuardBase &rhs)
TAttMarker
Marker Attributes class.
Definition: TAttMarker.h:19
Rgl::EOverlap
EOverlap
Definition: TGLUtil.h:35
TGLUtil::TDrawQualityScaler
Definition: TGLUtil.h:904
TGLMatrix::Move3LF
void Move3LF(Double_t x, Double_t y, Double_t z)
Translate in local frame along all base vectors simultaneously.
Definition: TGLUtil.cxx:822
kGLSpherical
@ kGLSpherical
Definition: TGLUtil.h:47
TGLPlane::A
Double_t A() const
Definition: TGLUtil.h:553
EGLCoordType
EGLCoordType
Definition: TGLUtil.h:43
TGLUtil::fgPointLineScalingFactor
static Float_t fgPointLineScalingFactor
Definition: TGLUtil.h:928
what
static const char * what
Definition: stlLoader.cc:6
Rgl::gWhiteEmission
const Float_t gWhiteEmission[]
Definition: TGLUtil.cxx:2845
TGLColorSet::fOutline
TGLColor fOutline
Definition: TGLUtil.h:840
TGLEnableGuard::operator=
TGLEnableGuard & operator=(const TGLEnableGuard &)
TGLRect::CenterY
Int_t CenterY() const
Definition: TGLUtil.h:455
UInt_t
unsigned int UInt_t
Definition: RtypesCore.h:46
TGLUtil::fgLineWidth
static Float_t fgLineWidth
Definition: TGLUtil.h:923
TGLMatrix::TransformVertex
void TransformVertex(TGLVertex3 &vertex) const
Transform passed 'vertex' by this matrix - converts local frame to parent.
Definition: TGLUtil.cxx:933
TGLUtil::~TGLUtil
virtual ~TGLUtil()
Definition: TGLUtil.h:935
TGLVertex3::operator==
Bool_t operator==(const TGLVertex3 &rhs) const
Definition: TGLUtil.h:149
TGLMatrix::Transpose3x3
void Transpose3x3()
Transpose the top left 3x3 matrix component along major diagonal Supported as currently incompatibili...
Definition: TGLUtil.cxx:947
TGLSelectionBuffer::operator=
TGLSelectionBuffer & operator=(const TGLSelectionBuffer &)
TGLMatrix::GetScale
TGLVector3 GetScale() const
Get local axis scaling factors.
Definition: TGLUtil.cxx:1099
y
Double_t y[n]
Definition: legend1.C:17
TGLUtil::DrawSimpleAxes
static void DrawSimpleAxes(const TGLCamera &camera, const TGLBoundingBox &bbox, Int_t axesType)
Draw simple xyz-axes for given bounding-box.
Definition: TGLUtil.cxx:2488
TGLColorSet::TGLColorSet
TGLColorSet()
Constructor. Sets default for dark background.
Definition: TGLUtil.cxx:1337
TGLPlane::B
Double_t B() const
Definition: TGLUtil.h:554
sqrt
double sqrt(double)
TGLColor::SetBlue
void SetBlue(Int_t v)
Definition: TGLUtil.h:812
kGL5D
@ kGL5D
Definition: TGLUtil.h:59
Short_t
short Short_t
Definition: RtypesCore.h:39
TGLMatrix::operator*=
TGLMatrix & operator*=(const TGLMatrix &rhs)
Definition: TGLUtil.h:623
TGLRect::Y
Int_t & Y()
Definition: TGLUtil.h:449
TGLColor::CArr
const UChar_t * CArr() const
Definition: TGLUtil.h:800
TGLColorSet::fMarkup
TGLColor fMarkup
Definition: TGLUtil.h:841
TGLUtil::fgPointSize
static Float_t fgPointSize
Definition: TGLUtil.h:922
TGLUtil::Color4ubv
static void Color4ubv(const UChar_t *rgba)
Wrapper for glColor4ubv.
Definition: TGLUtil.cxx:1773
line
TLine * line
Definition: entrylistblock_figure1.C:235
TGLPlane::fVals
Double_t fVals[4]
Definition: TGLUtil.h:528
TGLUtil::fgBlue
static const UChar_t fgBlue[4]
Definition: TGLUtil.h:1051
TGLVector3::Mag
Double_t Mag() const
Definition: TGLUtil.h:298
TGLLine3::Set
void Set(const TGLVertex3 &start, const TGLVertex3 &end)
Set 3D line running from 'start' to 'end'.
Definition: TGLUtil.cxx:192
TGLLevelPalette::DisableTexture
void DisableTexture() const
Disable 1D texture.
Definition: TGLUtil.cxx:4245
TGLPlaneSet_t
std::vector< TGLPlane > TGLPlaneSet_t
Definition: TGLUtil.h:571
void
typedef void((*Func_t)())
TGLUtil::GetDrawTesselator4fv
static GLUtesselator * GetDrawTesselator4fv()
Returns a tesselator for direct drawing when using 4-vertices with single precision.
Definition: TGLUtil.cxx:1513
TGLMatrix::ValidIndex
Bool_t ValidIndex(UInt_t index) const
Definition: TGLUtil.h:604
unsigned int
TGLUtil::DrawNumber
static void DrawNumber(const TString &num, const TGLVertex3 &pos, Bool_t center=kFALSE)
Draw number in string 'num' via internal 8x8-pixel bitmap on vertex 'pos'.
Definition: TGLUtil.cxx:2628
TGLMatrix::SetIdentity
void SetIdentity()
Set matrix to identity.
Definition: TGLUtil.cxx:765
Rgl::TTwoArgsGuard
Definition: TGLUtil.h:1307
TGLDisableGuard::fCap
Int_t fCap
Definition: TGLUtil.h:1122
operator+
TGLVertex3 operator+(const TGLVertex3 &vertex1, const TGLVector3 &vertex2)
Definition: TGLUtil.h:344
TGLQuadric
Wrapper class for GLU quadric shape drawing object.
Definition: TGLQuadric.h:28
Rgl::gOrangeEmission
const Float_t gOrangeEmission[]
Definition: TGLUtil.cxx:2844
TGLSelectionBuffer::fHeight
Int_t fHeight
Definition: TGLUtil.h:1136
TGLColorSet::Outline
TGLColor & Outline()
Definition: TGLUtil.h:853
TGLRect::Height
Int_t Height() const
Definition: TGLUtil.h:452
TGLVector3::Normalise
void Normalise()
Definition: TGLUtil.h:304
TGLMatrix::GetTranslation
TGLVector3 GetTranslation() const
Return the translation component of matrix.
Definition: TGLUtil.cxx:794
TGLLevelPalette::EnableTexture
void EnableTexture(Int_t mode) const
Enable 1D texture.
Definition: TGLUtil.cxx:4226
TGLColor
Class encapsulating color information in preferred GL format - an array of four unsigned bytes.
Definition: TGLUtil.h:785
TGLFloatHolder::TGLFloatHolder
TGLFloatHolder(const TGLFloatHolder &)
TGLRect::Bottom
Int_t Bottom() const
Definition: TGLUtil.h:459
Rgl::TTwoArgsGuard::fFunc
Func fFunc
Definition: TGLUtil.h:1309
TGLRect::fX
Int_t fX
Definition: TGLUtil.h:425
Rgl::kInside
@ kInside
Definition: TGLUtil.h:36
TGLVertex3::Set
void Set(Double_t x, Double_t y, Double_t z)
Definition: TGLUtil.h:210
Rgl::TOneArgGuard::fArg
Arg fArg
Definition: TGLUtil.h:1293
TGLVertex3::Negate
void Negate()
Definition: TGLUtil.h:141
TGLLine3::fVertex
TGLVertex3 fVertex
Definition: TGLUtil.h:390
TGLVertex3::X
Double_t & X()
Definition: TGLUtil.h:120
TGLRect
Viewport (pixel base) 2D rectangle class.
Definition: TGLUtil.h:422
TGLUtil::fgGrey
static const UChar_t fgGrey[4]
Definition: TGLUtil.h:1054
TGLVertex3::fVals
Double_t fVals[3]
Definition: TGLUtil.h:88
TGLColor::AsString
TString AsString() const
Return string describing the color.
Definition: TGLUtil.cxx:1320
TGLColor::SetGreen
void SetGreen(Int_t v)
Definition: TGLUtil.h:811
TGLLevelPalette::fTexture
UInt_t fTexture
Definition: TGLUtil.h:1344
TGLFloatHolder::operator=
TGLFloatHolder & operator=(const TGLFloatHolder &)
TGLLevelPalette::GetColour
const UChar_t * GetColour(Double_t z) const
Get color.
Definition: TGLUtil.cxx:4291
v1
@ v1
Definition: rootcling_impl.cxx:3637
Double_t
double Double_t
Definition: RtypesCore.h:59
TGLLevelPalette::fMaxPaletteSize
Int_t fMaxPaletteSize
Definition: TGLUtil.h:1345
TGLLine3::fVector
TGLVector3 fVector
Start vertex of line.
Definition: TGLUtil.h:391
TGLUtil::EndExtendPickRegion
static void EndExtendPickRegion()
Definition: TGLUtil.cxx:1961
EGLPlotType
EGLPlotType
Definition: TGLUtil.h:51
TGLColor::GetAlpha
UChar_t GetAlpha() const
Definition: TGLUtil.h:805
TGLSelectionBuffer
Definition: TGLUtil.h:1133
TGLUtil::ResetDrawQuality
static void ResetDrawQuality()
static: reset draw quality
Definition: TGLUtil.cxx:1615
TGLPlane::operator=
TGLPlane & operator=(const TGLPlane &src)
Assignment operator.
Definition: TGLUtil.cxx:389
TGLPlane::Arr
Double_t * Arr()
Definition: TGLUtil.h:564
t1
auto * t1
Definition: textangle.C:20
TGLVertex3::CArr
const Double_t * CArr() const
Definition: TGLUtil.h:126
TGLUtil::LockColor
static UInt_t LockColor()
Prevent further color changes.
Definition: TGLUtil.cxx:1663
TGLColor::ClassDefNV
ClassDefNV(TGLColor, 0)
kGLVoxel
@ kGLVoxel
Definition: TGLUtil.h:61
kGLBoxPlot
@ kGLBoxPlot
Definition: TGLUtil.h:54
v3
@ v3
Definition: rootcling_impl.cxx:3639
Rgl::DrawBoxWithGradientFill
void DrawBoxWithGradientFill(Double_t y1, Double_t y2, Double_t x1, Double_t x2, const Double_t *rgba1, const Double_t *rgba2)
Definition: TGLUtil.cxx:3197
TGLVector3::operator=
TGLVector3 & operator=(const TGLVertex3 &v)
Definition: TGLUtil.h:254
TGLColorSet::Background
const TGLColor & Background() const
Definition: TGLUtil.h:857
UChar_t
unsigned char UChar_t
Definition: RtypesCore.h:38
v2
@ v2
Definition: rootcling_impl.cxx:3638
points
point * points
Definition: X3DBuffer.c:22
TGLRect::Overlap
Rgl::EOverlap Overlap(const TGLRect &other) const
Return overlap result (kInside, kOutside, kPartial) of this rect with 'other'.
Definition: TGLUtil.cxx:297
TGLUtil::fgGreen
static const UChar_t fgGreen[4]
Definition: TGLUtil.h:1050
Rgl
Definition: TVirtualGL.h:125
Rgl::DrawSmoothFace
void DrawSmoothFace(const TGLVertex3 &v1, const TGLVertex3 &v2, const TGLVertex3 &v3, const TGLVector3 &norm1, const TGLVector3 &norm2, const TGLVector3 &norm3)
Draws triangle face, each vertex has its own averaged normal.
Definition: TGLUtil.cxx:2983
TGLUtil::InitializeIfNeeded
static void InitializeIfNeeded()
Initialize globals that require other libraries to be initialized.
Definition: TGLUtil.cxx:1576
kGLParametricPlot
@ kGLParametricPlot
Definition: TGLUtil.h:57
TGLColor::fRGBA
UChar_t fRGBA[4]
Definition: TGLUtil.h:787
TGLSelectionBuffer::~TGLSelectionBuffer
virtual ~TGLSelectionBuffer()
TGLSelectionBuffer destructor.
Definition: TGLUtil.cxx:2795
TGLLevelPalette::SetContours
void SetContours(const std::vector< Double_t > *contours)
Clear :)
Definition: TGLUtil.cxx:4218
Rgl::gRedEmission
const Float_t gRedEmission[]
Definition: TGLUtil.cxx:2841
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
TGLColor::GetBlue
UChar_t GetBlue() const
Definition: TGLUtil.h:804
TGLColor::TGLColor
TGLColor()
Default constructor. Color is initialized to black.
Definition: TGLUtil.cxx:1158
TGLVertex3::Arr
Double_t * Arr()
Definition: TGLUtil.h:127
TGLColor::fIndex
Short_t fIndex
Definition: TGLUtil.h:788
Rgl::DrawAxes
void DrawAxes(Int_t frontPoint, const Int_t *viewport, const TGLVertex3 *box2D, const TGLPlotCoordinates *plotCoord, TAxis *xAxis, TAxis *yAxis, TAxis *zAxis)
Using front point, find, where to draw axes and which labels to use for them gVirtualX->SelectWindow(...
Definition: TGLUtil.cxx:3759
v4
@ v4
Definition: rootcling_impl.cxx:3640
TGLUtil::fgScreenScalingFactor
static Float_t fgScreenScalingFactor
Definition: TGLUtil.h:927
TGLVertex3::Minimum
void Minimum(const TGLVertex3 &other)
Definition: TGLUtil.cxx:111
TGLMatrix::RotateIP
void RotateIP(TGLVector3 &v) const
Rotate vector in-place. Translation is not applied.
Definition: TGLUtil.cxx:1087
Rgl::TOneArgGuard::~TOneArgGuard
~TOneArgGuard()
Definition: TGLUtil.h:1299
TGLColorSet::Foreground
const TGLColor & Foreground() const
Definition: TGLUtil.h:858
ROOT::Math::Chebyshev::T
double T(double x)
Definition: ChebyshevPol.h:34
d
#define d(i)
Definition: RSha256.hxx:102
TGLPlane::Normalise
void Normalise()
Normalise the plane.
Definition: TGLUtil.cxx:398
TGLUtil::Color3ubv
static void Color3ubv(const UChar_t *rgb)
Wrapper for glColor3ubv.
Definition: TGLUtil.cxx:1765
Rgl::TGuardBase::TGuardBase
TGuardBase()
Definition: TGLUtil.h:1267
x2
static const double x2[5]
Definition: RooGaussKronrodIntegrator1D.cxx:364
TGLCapabilityEnabler
Definition: TGLUtil.h:1079
Dot
Double_t Dot(const TGLVector3 &v1, const TGLVector3 &v2)
Definition: TGLUtil.h:317
TGLRect::SetCorner
void SetCorner(Int_t x, Int_t y)
Definition: TGLUtil.h:480
TGLUtil::SetDrawColors
static void SetDrawColors(const UChar_t rgba[4])
Set basic draw colors from 4 component 'rgba' Used by other TGLUtil drawing routines.
Definition: TGLUtil.cxx:2330
TGL2DArray::TGL2DArray
TGL2DArray()
Definition: TGLUtil.h:1161
TGLUtil::SetDrawQuality
static void SetDrawQuality(UInt_t dq)
static: set draw quality
Definition: TGLUtil.cxx:1607
TGLMatrix::Scale
void Scale(const TGLVector3 &scale)
Set matrix axis scales to 'scale'.
Definition: TGLUtil.cxx:834
TGLCapabilitySwitch::TGLCapabilitySwitch
TGLCapabilitySwitch(const TGLCapabilitySwitch &)
TGLCapabilitySwitch::SetState
void SetState(Bool_t s)
Definition: TGLUtil.cxx:2696
TGLLevelPalette::GetPaletteSize
Int_t GetPaletteSize() const
Get. Palette. Size.
Definition: TGLUtil.cxx:4254
TGLEnableGuard::TGLEnableGuard
TGLEnableGuard(Int_t cap)
TGLEnableGuard constructor.
Definition: TGLUtil.cxx:2747
TGLUtil::TDrawQualityModifier
Definition: TGLUtil.h:891
TGLLevelPalette::GetTexCoord
Double_t GetTexCoord(Double_t z) const
Get tex coordinate.
Definition: TGLUtil.cxx:4262
TGLVertex3::Dump
void Dump() const
Output vertex component values to std::cout.
Definition: TGLUtil.cxx:130
TGLUtil::GetScreenScalingFactor
static Float_t GetScreenScalingFactor()
Returns scaling factor between screen points and GL viewport pixels.
Definition: TGLUtil.cxx:1846
TGLLevelPalette::GeneratePalette
Bool_t GeneratePalette(UInt_t paletteSize, const Rgl::Range_t &zRange, Bool_t checkSize=kTRUE)
Try to find colors for palette.
Definition: TGLUtil.cxx:4161
TGLVertex3::Z
Double_t & Z()
Definition: TGLUtil.h:124
TGLUtil::TColorLocker
Definition: TGLUtil.h:882
TGLRect::fY
Int_t fY
Definition: TGLUtil.h:425
TGLFloatHolder::~TGLFloatHolder
~TGLFloatHolder()
Definition: TGLUtil.cxx:2738
TGLLevelPalette::fZRange
Rgl::Range_t fZRange
Definition: TGLUtil.h:1346
TGLVertex3::Y
Double_t & Y()
Definition: TGLUtil.h:122
TGLUtil::LineWidth
static Float_t LineWidth()
Get the line-width, taking the global scaling into account.
Definition: TGLUtil.cxx:1937
TGLColor::SetColor
void SetColor(Int_t r, Int_t g, Int_t b, Int_t a=255)
Set color with Int_t values.
Definition: TGLUtil.cxx:1235
Rgl::DrawQuadOutline
void DrawQuadOutline(const TGLVertex3 &v1, const TGLVertex3 &v2, const TGLVertex3 &v3, const TGLVertex3 &v4)
Draw quad outline.
Definition: TGLUtil.cxx:2939
TGLMatrix::SetTranslation
void SetTranslation(Double_t x, Double_t y, Double_t z)
Set matrix translation components x,y,z.
Definition: TGLUtil.cxx:776
TGLMatrix::operator[]
Double_t & operator[](Int_t index)
Definition: TGLUtil.h:683
TGLUtil::GetDrawQuality
static UInt_t GetDrawQuality()
static: get draw quality
Definition: TGLUtil.cxx:1599
Rgl::TTwoArgsGuard::fArg1
Arg1 fArg1
Definition: TGLUtil.h:1310
TGLMatrix::MultLeft
void MultLeft(const TGLMatrix &lhs)
Multiply with matrix lhs on left.
Definition: TGLUtil.cxx:718
TGLUtil::BeginAttLine
static void BeginAttLine(const TAttLine &aline, Char_t transp, Int_t pick_radius=0, Bool_t selection=kFALSE)
Setup drawing parameters according to passed TAttLine.
Definition: TGLUtil.cxx:2266
TGLColorSet::Outline
const TGLColor & Outline() const
Definition: TGLUtil.h:859
type
int type
Definition: TGX11.cxx:121
Rgl::kOutside
@ kOutside
Definition: TGLUtil.h:38
kGLTH3Composition
@ kGLTH3Composition
Definition: TGLUtil.h:60
TGLPlane::C
Double_t C() const
Definition: TGLUtil.h:555
TGLUtil::TDrawQualityModifier::fOldQuality
Int_t fOldQuality
Definition: TGLUtil.h:892
TGLUtil::SetDefaultDrawQuality
static void SetDefaultDrawQuality(UInt_t dq)
static: set default draw quality
Definition: TGLUtil.cxx:1631
Rgl::DrawTrapezoidTextured2
void DrawTrapezoidTextured2(const Double_t ver[][2], Double_t zMin, Double_t zMax, Double_t tMin, Double_t tMax)
In polar coordinates, box became trapezoid.
Definition: TGLUtil.cxx:3495
TGLMatrix::RotateLF
void RotateLF(Int_t i1, Int_t i2, Double_t amount)
Rotate in local frame.
Definition: TGLUtil.cxx:897
operator*
TGLVertex3 operator*(Double_t f, const TGLVertex3 &v)
Definition: TGLUtil.h:135
TGLUtil::fgDefaultDrawQuality
static UInt_t fgDefaultDrawQuality
Definition: TGLUtil.h:917
Rgl::gGrayEmission
const Float_t gGrayEmission[]
Definition: TGLUtil.cxx:2846
TGLMatrix::Translate
void Translate(const TGLVector3 &vect)
Shift matrix translation components by 'vect' in parent frame.
Definition: TGLUtil.cxx:802
TGLSelectionBuffer::TGLSelectionBuffer
TGLSelectionBuffer(const TGLSelectionBuffer &)
TGLColorSet::Background
TGLColor & Background()
Definition: TGLUtil.h:851
Char_t
char Char_t
Definition: RtypesCore.h:33
TGLCapabilitySwitch::fState
Bool_t fState
Definition: TGLUtil.h:1068
TGLUtil::GetDrawTesselator3fv
static GLUtesselator * GetDrawTesselator3fv()
Returns a tesselator for direct drawing when using 3-vertices with single precision.
Definition: TGLUtil.cxx:1492
TGLRect::~TGLRect
virtual ~TGLRect()
Destroy rect object.
Definition: TGLUtil.cxx:254
TGLVertex3
3 component (x/y/z) vertex class.
Definition: TGLUtil.h:84
TGLVertex3::TGLVertex3
TGLVertex3()
Construct a default (0.0, 0.0, 0.0) vertex.
Definition: TGLUtil.cxx:53
Rtypes.h
TGLSelectionBuffer::fWidth
Int_t fWidth
Definition: TGLUtil.h:1135
TGLUtil::PointToViewport
static void PointToViewport(Int_t &x, Int_t &y)
Convert from point/screen coordinates to GL viewport coordinates.
Definition: TGLUtil.cxx:1817
Cross
TGLVector3 Cross(const TGLVector3 &v1, const TGLVector3 &v2)
Definition: TGLUtil.h:323
TGLMatrix::MultRight
void MultRight(const TGLMatrix &rhs)
Multiply with matrix rhs on right.
Definition: TGLUtil.cxx:702
TGLVector3::TGLVector3
TGLVector3()=default
TGLPlane::NearestOn
TGLVertex3 NearestOn(const TGLVertex3 &point) const
Return nearest point on plane.
Definition: TGLUtil.cxx:500
TGLRect::Offset
void Offset(Int_t dX, Int_t dY)
Definition: TGLUtil.h:487
Rgl::TTwoArgsGuard::~TTwoArgsGuard
~TTwoArgsGuard()
Definition: TGLUtil.h:1318
TGLColorSet::Selection
TGLColor & Selection(Int_t i)
Definition: TGLUtil.h:855
Rgl::gBlueEmission
const Float_t gBlueEmission[]
Definition: TGLUtil.cxx:2843
TGLPlane::Norm
TGLVector3 Norm() const
Definition: TGLUtil.h:558
Rgl::ObjectIDToColor
void ObjectIDToColor(Int_t objectID, Bool_t highColor)
Object id encoded as rgb triplet.
Definition: TGLUtil.cxx:2891
kGLCartesian
@ kGLCartesian
Definition: TGLUtil.h:44
TGLVertex3::ClassDefNV
ClassDefNV(TGLVertex3, 1)
TGLUtil::RenderCrosses
static void RenderCrosses(const TAttMarker &marker, Float_t *p, Int_t n, Bool_t sec_selection=kFALSE)
Render markers as crosses.
Definition: TGLUtil.cxx:2134
TGLEnableGuard::~TGLEnableGuard
~TGLEnableGuard()
TGLEnableGuard destructor.
Definition: TGLUtil.cxx:2756
TGLUtil::UnlockColor
static UInt_t UnlockColor()
Allow color changes.
Definition: TGLUtil.cxx:1671
TGLRect::CenterX
Int_t CenterX() const
Definition: TGLUtil.h:454
Rgl::DrawError
void DrawError(Double_t xMin, Double_t xMax, Double_t yMin, Double_t yMax, Double_t zMin, Double_t zMax)
Definition: TGLUtil.cxx:3298
TGLPlane::Dump
void Dump() const
Output plane equation to std::out.
Definition: TGLUtil.cxx:416
Rgl::TGuardBase::IsActive
Bool_t IsActive() const
Definition: TGLUtil.h:1277
int
TGLEnableGuard
Definition: TGLUtil.h:1107
Rgl::BinRange_t
std::pair< Int_t, Int_t > BinRange_t
Definition: TGLUtil.h:1194
Error
void Error(const char *location, const char *msgfmt,...)
Use this function in case an error occurred.
Definition: TError.cxx:187
TError.h
TGLCapabilityEnabler::TGLCapabilityEnabler
TGLCapabilityEnabler(const TGLCapabilityEnabler &)
TGLMatrix::CArr
const Double_t * CArr() const
Definition: TGLUtil.h:664
TGLUtil::fgPointSizeScale
static Float_t fgPointSizeScale
Definition: TGLUtil.h:924
g
#define g(i)
Definition: RSha256.hxx:105