24#include "TGLIncludes.h"
29const UInt_t PolygonStippleSet::fgBitSwap[] = {0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15};
86 for (
UInt_t i = 0; i < numOfStipples; ++i) {
89 for (
Int_t j = 15, j1 = 0; j >= 0; --j, ++j1) {
92 for (
Int_t k = 1, k1 = 0; k >= 0; --k, ++k1) {
94 const UInt_t ind = baseInd + rowShift + k1;
127 : fStipple(0), fAlpha(1.)
131 if (!ignoreStipple) {
134 fStipple = (fasi >= 1 && fasi <=25) ? fasi : 2;
136 glEnable(GL_POLYGON_STIPPLE);
141 Float_t rgba[] = {0.f, 0.f, 0.f, 1.f};
146 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
156 glDisable(GL_POLYGON_STIPPLE);
167 0xf040, 0xf4f4, 0xf111, 0xf0f0,
168 0xff11, 0x3fff, 0x08ff};
180 : fSmooth(smooth), fStipple(stipple), fSetWidth(setWidth), fAlpha(0.8)
184 glEnable(GL_LINE_SMOOTH);
185 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
186 glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
194 glEnable(GL_LINE_STIPPLE);
200 Float_t rgba[] = {0.f, 0.f, 0.f, 0.8f};
205 glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
212 glLineWidth(w > maxWidth ? maxWidth : !w ? 1.f : w);
221 glDisable(GL_LINE_SMOOTH);
226 glDisable(GL_LINE_STIPPLE);
244 glVertex2d(
xy[i].fX,
xy[i].fY);
257 for (
UInt_t i = 0; i <
n; ++i) {
260 glVertex2d(-im +
x,
y);
261 glVertex2d(im +
x,
y);
262 glVertex2d(
x, -im +
y);
263 glVertex2d(
x, im +
y);
287 for (
UInt_t i = 0; i <
n; ++i) {
312 for (
UInt_t i = 0; i <
n; ++i) {
316 glVertex2d(-im +
x, -im +
y);
317 glVertex2d(im +
x, im +
y);
318 glVertex2d(-im +
x, im +
y);
319 glVertex2d(im +
x, -im +
y);
331 for (
UInt_t i = 0; i <
n; ++i) {
335 glVertex2d(-1. +
x,
y);
336 glVertex2d(
x + 1.,
y);
337 glVertex2d(
x, -1. +
y);
338 glVertex2d(
x, 1. +
y);
349 glRectd(
xy[i].fX - 1,
xy[i].fY - 1,
xy[i].fX + 1,
xy[i].fY + 1);
354void CalculateCircle(std::vector<TPoint> &circle,
Double_t r,
UInt_t pts);
368 for (
UInt_t i = 0; i <
n; ++i) {
392 for (
UInt_t i = 0; i <
n; ++i) {
409 glRectd(
xy[i].fX - im,
xy[i].fY - im,
xy[i].fX + im,
xy[i].fY + im);
417 for (
UInt_t i = 0; i <
n; ++i) {
421 glVertex2d(
x - im,
y - im);
422 glVertex2d(
x + im,
y - im);
423 glVertex2d(
x, im +
y);
434 for (
UInt_t i = 0; i <
n; ++i) {
438 glVertex2d(
x - im,
y + im);
439 glVertex2d(
x,
y - im);
440 glVertex2d(im +
x,
y + im);
450 const Int_t im =
Int_t(4.00 * MarkerSizeReduced + 0.5);
451 const Int_t imx =
Int_t(2.66 * MarkerSizeReduced + 0.5);
453 for (
UInt_t i = 0; i <
n; ++i) {
458 glVertex2d(
x - imx,
y);
459 glVertex2d(
x,
y - im);
460 glVertex2d(
x + imx,
y);
461 glVertex2d(
x,
y + im);
473 for (
UInt_t i = 0; i <
n; ++i) {
478 glVertex2d(
x - imx,
y);
479 glVertex2d(
x,
y - im);
480 glVertex2d(
x + imx,
y);
481 glVertex2d(
x,
y + im);
492 for (
UInt_t i = 0; i <
n; ++i) {
496 glVertex2d(
x - im,
y + im);
497 glVertex2d(
x,
y - im);
498 glVertex2d(im +
x,
y + im);
508 const Int_t im =
Int_t(4.00 * MarkerSizeReduced + 0.5);
509 const Int_t imx =
Int_t(1.33 * MarkerSizeReduced + 0.5);
511 for (
UInt_t i = 0; i <
n; ++i) {
516 glVertex2d(
x - im,
y - imx);
517 glVertex2d(
x - imx,
y - imx);
518 glVertex2d(
x - imx,
y - im);
519 glVertex2d(
x + imx,
y - im);
520 glVertex2d(
x + imx,
y - imx);
521 glVertex2d(
x + im,
y - imx);
522 glVertex2d(
x + im,
y + imx);
523 glVertex2d(
x + imx,
y + imx);
524 glVertex2d(
x + imx,
y + im);
525 glVertex2d(
x - imx,
y + im);
526 glVertex2d(
x - imx,
y + imx);
527 glVertex2d(
x - im,
y + imx);
539 for (
UInt_t i = 0; i <
n; ++i) {
544 glVertex2d(
x - im,
y - imx);
545 glVertex2d(
x - im,
y + imx);
546 glVertex2d(
x + im,
y + imx);
547 glVertex2d(
x + im,
y - imx);
550 glVertex2d(
x - imx,
y + imx);
551 glVertex2d(
x - imx,
y + im);
552 glVertex2d(
x + imx,
y + im);
553 glVertex2d(
x + imx,
y + imx);
557 glVertex2d(
x - imx,
y - imx);
558 glVertex2d(
x - imx,
y - im);
559 glVertex2d(
x + imx,
y - im);
560 glVertex2d(
x + imx,
y - imx);
576 for (
UInt_t i = 0; i <
n; ++i) {
581 glVertex2d(
x - im,
y - im4);
582 glVertex2d(
x - im2,
y + im1);
583 glVertex2d(
x - im4,
y - im4);
585 glVertex2d(
x - im2,
y + im1);
586 glVertex2d(
x - im3,
y + im);
587 glVertex2d(
x,
y + im2);
589 glVertex2d(
x,
y + im2);
590 glVertex2d(
x + im3,
y + im);
591 glVertex2d(
x + im2,
y + im1);
593 glVertex2d(
x + im2,
y + im1);
594 glVertex2d(
x + im,
y - im4);
595 glVertex2d(
x + im4,
y - im4);
597 glVertex2d(
x + im4,
y - im4);
598 glVertex2d(
x,
y - im);
599 glVertex2d(
x - im4,
y - im4);
601 glVertex2d(
x - im4,
y - im4);
602 glVertex2d(
x - im2,
y + im1);
603 glVertex2d(
x,
y + im2);
605 glVertex2d(
x - im4,
y - im4);
606 glVertex2d(
x,
y + im2);
607 glVertex2d(
x + im2,
y + im1);
609 glVertex2d(
x - im4,
y - im4);
610 glVertex2d(
x + im2,
y + im1);
611 glVertex2d(
x + im4,
y - im4);
624 const Int_t im =
Int_t(4.00 * MarkerSizeReduced + 0.5);
625 const Int_t im1 =
Int_t(0.66 * MarkerSizeReduced + 0.5);
626 const Int_t im2 =
Int_t(2.00 * MarkerSizeReduced + 0.5);
627 const Int_t im3 =
Int_t(2.66 * MarkerSizeReduced + 0.5);
628 const Int_t im4 =
Int_t(1.33 * MarkerSizeReduced + 0.5);
630 for (
UInt_t i = 0; i <
n; ++i) {
635 glVertex2d(
x - im,
y - im4);
636 glVertex2d(
x - im2,
y + im1);
637 glVertex2d(
x - im3,
y + im);
638 glVertex2d(
x,
y + im2);
639 glVertex2d(
x + im3,
y + im);
640 glVertex2d(
x + im2,
y + im1);
641 glVertex2d(
x + im,
y - im4);
642 glVertex2d(
x + im4,
y - im4);
643 glVertex2d(
x,
y - im);
644 glVertex2d(
x - im4,
y - im4);
655 for (
unsigned i = 0; i <
n; ++i) {
660 glVertex2d(
x - im,
y - im);
661 glVertex2d(
x + im,
y - im);
662 glVertex2d(
x + im,
y + im);
663 glVertex2d(
x - im,
y + im);
664 glVertex2d(
x - im,
y - im);
665 glVertex2d(
x + im,
y + im);
666 glVertex2d(
x - im,
y + im);
667 glVertex2d(
x + im,
y - im);
678 for (
unsigned i = 0; i <
n; ++i) {
683 glVertex2d(
x - im,
y );
684 glVertex2d(
x ,
y - im);
685 glVertex2d(
x + im,
y );
686 glVertex2d(
x ,
y + im);
687 glVertex2d(
x - im,
y );
688 glVertex2d(
x + im,
y );
689 glVertex2d(
x ,
y + im);
690 glVertex2d(
x ,
y - im);
700 const Int_t im =
Int_t(4. * MarkerSizeReduced + 0.5);
701 const Int_t im2 =
Int_t(2. * MarkerSizeReduced + 0.5);
703 for (
unsigned i = 0; i <
n; ++i) {
709 glVertex2d(
x -im2,
y + im);
710 glVertex2d(
x - im,
y );
712 glVertex2d(
x -im2,
y - im);
713 glVertex2d(
x +im2,
y - im);
715 glVertex2d(
x + im,
y );
716 glVertex2d(
x +im2,
y + im);
727 const Int_t im =
Int_t(4. * MarkerSizeReduced + 0.5);
728 const Int_t im2 =
Int_t(2. * MarkerSizeReduced + 0.5);
730 for (
unsigned i = 0; i <
n; ++i) {
735 glVertex2d(
x-im,
y );
736 glVertex2d(
x-im,
y-im2);
737 glVertex2d(
x-im2,
y-im);
738 glVertex2d(
x+im2,
y-im);
739 glVertex2d(
x+im,
y-im2);
740 glVertex2d(
x+im,
y+im2);
741 glVertex2d(
x+im2,
y+im);
742 glVertex2d(
x-im2,
y+im);
743 glVertex2d(
x-im,
y+im2);
744 glVertex2d(
x-im,
y );
745 glVertex2d(
x+im,
y );
747 glVertex2d(
x ,
y-im);
748 glVertex2d(
x ,
y+im);
761 for (
unsigned i = 0; i <
n; ++i) {
767 glVertex2d(
x -im2,
y + im);
768 glVertex2d(
x - im,
y );
770 glVertex2d(
x -im2,
y - im);
771 glVertex2d(
x +im2,
y - im);
773 glVertex2d(
x + im,
y );
774 glVertex2d(
x +im2,
y + im);
785 const Int_t im =
Int_t(4. * MarkerSizeReduced + 0.5);
786 const Int_t im2 =
Int_t(2. * MarkerSizeReduced + 0.5);
788 for (
unsigned i = 0; i <
n; ++i) {
794 glVertex2d(
x+im2,
y+im);
795 glVertex2d(
x+im ,
y+im2);
797 glVertex2d(
x+im ,
y-im2);
798 glVertex2d(
x+im2,
y-im);
800 glVertex2d(
x-im2,
y-im);
801 glVertex2d(
x-im ,
y-im2);
803 glVertex2d(
x-im ,
y+im2);
804 glVertex2d(
x-im2,
y+im);
817 for (
unsigned i = 0; i <
n; ++i) {
823 glVertex2d(
x+im2,
y+im);
824 glVertex2d(
x+im ,
y+im2);
826 glVertex2d(
x+im ,
y-im2);
827 glVertex2d(
x+im2,
y-im);
829 glVertex2d(
x-im2,
y-im);
830 glVertex2d(
x-im ,
y-im2);
832 glVertex2d(
x-im ,
y+im2);
833 glVertex2d(
x-im2,
y+im);
844 const Int_t im =
Int_t(4.00 * MarkerSizeReduced + 0.5);
845 const Int_t im4 =
Int_t(1.33 * MarkerSizeReduced + 0.5);
847 for (
unsigned i = 0; i <
n; ++i) {
852 glVertex2d(
x ,
y+im );
853 glVertex2d(
x-im4,
y+im4);
854 glVertex2d(
x-im ,
y );
855 glVertex2d(
x-im4,
y-im4);
856 glVertex2d(
x ,
y-im );
857 glVertex2d(
x+im4,
y-im4);
858 glVertex2d(
x+im ,
y );
859 glVertex2d(
x+im4,
y+im4);
860 glVertex2d(
x ,
y+im );
872 for (
unsigned i = 0; i <
n; ++i) {
877 glVertex2d(
x,
y+im );
878 glVertex2d(
x-im4,
y+im4);
882 glVertex2d(
x-im4,
y+im4);
888 glVertex2d(
x-im4,
y-im4);
892 glVertex2d(
x-im4,
y-im4);
898 glVertex2d(
x+im4,
y-im4);
902 glVertex2d(
x+im4,
y-im4);
908 glVertex2d(
x+im4,
y+im4);
912 glVertex2d(
x+im4,
y+im4);
924 const Int_t im =
Int_t(4. * MarkerSizeReduced + 0.5);
925 const Int_t im2 =
Int_t(2. * MarkerSizeReduced + 0.5);
927 for (
unsigned i = 0; i <
n; ++i) {
933 glVertex2d(
x+im2,
y+im);
934 glVertex2d(
x-im2,
y+im);
935 glVertex2d(
x+im2,
y-im);
936 glVertex2d(
x-im2,
y-im);
938 glVertex2d(
x+im,
y+im2);
939 glVertex2d(
x+im,
y-im2);
940 glVertex2d(
x-im,
y+im2);
941 glVertex2d(
x-im,
y-im2);
954 for (
unsigned i = 0; i <
n; ++i) {
960 glVertex2d(
x+im2,
y+im);
961 glVertex2d(
x-im2,
y+im);
962 glVertex2d(
x+im2,
y-im);
963 glVertex2d(
x-im2,
y-im);
965 glVertex2d(
x+im,
y+im2);
966 glVertex2d(
x+im,
y-im2);
967 glVertex2d(
x-im,
y+im2);
968 glVertex2d(
x-im,
y-im2);
979 const Int_t im =
Int_t(4. * MarkerSizeReduced + 0.5);
980 const Int_t im2 =
Int_t(2. * MarkerSizeReduced + 0.5);
982 for (
unsigned i = 0; i <
n; ++i) {
987 glVertex2d(
x ,
y +im2);
988 glVertex2d(
x -im2,
y + im);
989 glVertex2d(
x - im,
y +im2);
990 glVertex2d(
x -im2,
y );
991 glVertex2d(
x - im,
y -im2);
992 glVertex2d(
x -im2,
y - im);
993 glVertex2d(
x ,
y -im2);
994 glVertex2d(
x +im2,
y - im);
995 glVertex2d(
x + im,
y -im2);
996 glVertex2d(
x +im2,
y );
997 glVertex2d(
x + im,
y +im2);
998 glVertex2d(
x +im2,
y + im);
999 glVertex2d(
x ,
y +im2);
1011 for (
unsigned i = 0; i <
n; ++i) {
1016 glVertex2d(
x ,
y +im2);
1017 glVertex2d(
x -im2,
y +im);
1018 glVertex2d(
x -im ,
y +im2);
1019 glVertex2d(
x -im2,
y );
1023 glVertex2d(
x -im2,
y);
1024 glVertex2d(
x -im,
y -im2);
1025 glVertex2d(
x -im2,
y -im);
1026 glVertex2d(
x ,
y-im2);
1030 glVertex2d(
x ,
y -im2);
1031 glVertex2d(
x +im2,
y -im);
1032 glVertex2d(
x +im ,
y -im2);
1033 glVertex2d(
x +im2,
y);
1037 glVertex2d(
x +im2,
y);
1038 glVertex2d(
x +im ,
y +im2);
1039 glVertex2d(
x +im2,
y +im);
1040 glVertex2d(
x ,
y +im2);
1052 for (
unsigned i = 0; i <
n; ++i) {
1057 glVertex2d(
x,
y+im2);
1058 glVertex2d(
x-im2 ,
y+im);
1059 glVertex2d(
x-im,
y+im2);
1060 glVertex2d(
x-im2 ,
y);
1063 glVertex2d(
x-im2,
y);
1064 glVertex2d(
x-im ,
y-im2);
1065 glVertex2d(
x-im2,
y-im);
1066 glVertex2d(
x,
y-im2);
1069 glVertex2d(
x,
y-im2);
1070 glVertex2d(
x+im2 ,
y-im);
1071 glVertex2d(
x+im,
y-im2);
1072 glVertex2d(
x+im2,
y);
1075 glVertex2d(
x+im2,
y);
1076 glVertex2d(
x+im ,
y+im2);
1077 glVertex2d(
x+im2,
y+im);
1078 glVertex2d(
x,
y+im2);
1090 for (
unsigned i = 0; i <
n; ++i) {
1095 glVertex2d(
x+im2,
y+im2);
1096 glVertex2d(
x+im2,
y+im);
1097 glVertex2d(
x-im2,
y+im);
1098 glVertex2d(
x-im2,
y+im2);
1101 glVertex2d(
x-im2,
y+im2);
1102 glVertex2d(
x-im,
y+im2);
1103 glVertex2d(
x-im,
y-im2);
1104 glVertex2d(
x-im2,
y-im2);
1107 glVertex2d(
x-im2,
y-im2);
1108 glVertex2d(
x-im2,
y-im);
1109 glVertex2d(
x+im2,
y-im);
1110 glVertex2d(
x+im2,
y-im2);
1113 glVertex2d(
x+im2,
y-im2);
1114 glVertex2d(
x+im,
y-im2);
1115 glVertex2d(
x+im,
y+im2);
1116 glVertex2d(
x+im2,
y+im2);
1129#if defined(__APPLE_CC__) && __APPLE_CC__ > 4000 && __APPLE_CC__ < 5450 && !defined(__INTEL_COMPILER)
1130 typedef GLvoid (*tess_t)(...);
1131#elif defined( __mips ) || defined( __linux__ ) || defined( __FreeBSD__ ) || defined( __OpenBSD__ ) || defined( __sun ) || defined (__CYGWIN__) || defined (__APPLE__)
1132 typedef GLvoid (*tess_t)();
1133#elif defined ( WIN32)
1136 #error "Error - need to define type tess_t for this platform/compiler"
1159 std::vector<Double_t> & vs = dump->back().fPatch;
1180 throw std::runtime_error(
"tesselator creation failed");
1182#if defined(__GNUC__) && __GNUC__ >= 8
1183#pragma GCC diagnostic push
1184#pragma GCC diagnostic ignored "-Wcast-function-type"
1197#if defined(__GNUC__) && __GNUC__ >= 8
1198#pragma GCC diagnostic pop
1219 : fW(w), fH(
h), fX(
x), fY(
y), fTop(top)
1226 : fMaxLineWidth(0.),
1262 const TColor *color =
gROOT->GetColor(colorIndex);
1264 color->
GetRGB(rgba[0], rgba[1], rgba[2]);
1271template<
class ValueType>
1274 assert(nPoints > 0 &&
"FindBoundingRect, invalind number of points");
1275 assert(xs !=
nullptr &&
"FindBoundingRect, parameter 'xs' is null");
1276 assert(ys !=
nullptr &&
"FindBoundingRect, parameter 'ys' is null");
1278 ValueType xMin = xs[0], xMax = xMin;
1279 ValueType yMin = ys[0], yMax = yMin;
1281 for (
Int_t i = 1; i < nPoints; ++i) {
1292 box.fWidth = xMax - xMin;
1296 box.fHeight = yMax - yMin;
1313void CalculateCircle(std::vector<TPoint> &circle,
Double_t r,
UInt_t pts)
1318 circle.resize(circle.size() + pts + 1);
1320 for (
UInt_t i = 0; i < pts; ++i, angle += delta) {
1325 circle.back().fX = circle[
first].fX;
1326 circle.back().fY = circle[
first].fY;
GLAPI GLUtesselator *GLAPIENTRY gluNewTess(void)
#define GLU_TESS_TOLERANCE
GLAPI void GLAPIENTRY gluTessProperty(GLUtesselator *tess, GLenum which, GLdouble data)
GLAPI void GLAPIENTRY gluTessCallback(GLUtesselator *tess, GLenum which, _GLUfuncptr CallBackFunc)
GLAPI void GLAPIENTRY gluDeleteTess(GLUtesselator *tess)
const unsigned char gStipples[26][32]
FillAttribSet(const PolygonStippleSet &set, Bool_t ignoreStipple)
Polygon stipple, if required.
Double_t GetMaxLineWidth() const
Double_t GetMaxPointSize() const
LineAttribSet(Bool_t smooth, UInt_t stipple, Double_t maxWidth, Bool_t setWidth)
Set up line parameters.
void DrawOpenThreeTriangles(UInt_t n, const TPoint *xy) const
void DrawFullCrossX(UInt_t n, const TPoint *xy) const
void DrawFullDotSmall(UInt_t n, const TPoint *xy) const
void DrawOpenSquareDiagonal(UInt_t n, const TPoint *xy) const
void DrawOpenDoubleDiamond(UInt_t n, const TPoint *xy) const
void DrawFullFourTrianglesX(UInt_t n, const TPoint *xy) const
void DrawFullDotLarge(UInt_t n, const TPoint *xy) const
void DrawFullThreeTriangles(UInt_t n, const TPoint *xy) const
void DrawCircle(UInt_t n, const TPoint *xy) const
void DrawFullFourTrianglesPlus(UInt_t n, const TPoint *xy) const
void DrawOpenCross(UInt_t n, const TPoint *xy) const
void DrawFullCross(UInt_t n, const TPoint *xy) const
void DrawFullTrianlgeDown(UInt_t n, const TPoint *xy) const
void DrawOpenStar(UInt_t n, const TPoint *xy) const
Full star pentagone.
void DrawX(UInt_t n, const TPoint *xy) const
void DrawPlus(UInt_t n, const TPoint *xy) const
void DrawFullTrianlgeUp(UInt_t n, const TPoint *xy) const
void DrawFullSquare(UInt_t n, const TPoint *xy) const
std::vector< TPoint > fCircle
void DrawOpenFourTrianglesPlus(UInt_t n, const TPoint *xy) const
void DrawStar(UInt_t n, const TPoint *xy) const
void DrawFullDoubleDiamond(UInt_t n, const TPoint *xy) const
void DrawOpenCrossX(UInt_t n, const TPoint *xy) const
void DrawDot(UInt_t n, const TPoint *xy) const
Simple 1-pixel dots.
void DrawOctagonCross(UInt_t n, const TPoint *xy) const
void DrawFourSquaresX(UInt_t n, const TPoint *xy) const
void DrawFourSquaresPlus(UInt_t n, const TPoint *xy) const
void DrawFullDotMedium(UInt_t n, const TPoint *xy) const
void DrawDiamond(UInt_t n, const TPoint *xy) const
void DrawFullStar(UInt_t n, const TPoint *xy) const
Full star pentagone.
void DrawOpenTrianlgeDown(UInt_t n, const TPoint *xy) const
void DrawFullDiamond(UInt_t n, const TPoint *xy) const
void DrawOpenFourTrianglesX(UInt_t n, const TPoint *xy) const
void DrawOpenDiamondCross(UInt_t n, const TPoint *xy) const
OffScreenDevice(UInt_t w, UInt_t h, UInt_t x, UInt_t y, Bool_t top)
std::vector< unsigned char > fStipples
static UInt_t SwapBits(UInt_t bits)
static const UInt_t fgBitSwap[]
Tesselator(Bool_t dump=kFALSE)
static Tesselation_t * GetDump()
static Tesselation_t * fVs
static Width_t GetMarkerLineWidth(Style_t style)
Internal helper function that returns the line width of the given marker style (0 = filled marker)
The color creation and management class.
virtual void GetRGB(Float_t &r, Float_t &g, Float_t &b) const
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
const UShort_t gLineStipples[]
std::list< MeshPatch_t > Tesselation_t
BoundingRect< ValueType > FindBoundingRect(Int_t nPoints, const ValueType *xs, const ValueType *ys)
void Vertex(const Double_t *v)
void ExtractRGBA(Color_t colorIndex, Float_t *rgba)
const GLenum lineWidthPNAME
const GLenum pointSizePNAME
Short_t Max(Short_t a, Short_t b)
Double_t Floor(Double_t x)
Short_t Min(Short_t a, Short_t b)
constexpr Double_t TwoPi()