14#include "TGLIncludes.h"
101 Double_t x1 = p1[0], y1 = p1[1], z1 = p1[2];
102 Double_t x2 = p2[0], y2 = p2[1], z2 = p2[2];
115 glTranslatef(x1, y1, z1);
124 if (y2==y1 && x2==x1) {
129 p3[0] = p2[0]; p3[1] = p2[1]; p3[2] = 0;
134 glRotatef(phi, normal[0], normal[1], normal[2]);
143 }
else if ((x2-x1)<0) {
147 if (y2>y1) theta = 90;
151 if (x2<x1) theta = 180;
153 glRotatef(theta, 0., 0., 1.);
170 Float_t red = 1.f, green = 1.f, blue = 1.f;
172 col->
GetRGB(red, green, blue);
173 glColor3d(red, green, blue);
176 glVertex3d(0., 0., 0.);
217 glVertex3f(
fTicks1[i], yo*tl, zo*tl);
225 glLineStipple(1, stipple);
226 glEnable(GL_LINE_STIPPLE);
233 glDisable(GL_LINE_STIPPLE);
244 glVertex3f(
fTicks2[i], yo*tl, zo*tl);
288 for (i=0; i<
fNDiv1+1 ; i++) {
301 if (strchr(opt,
'N')) optionNoopt =
kTRUE;
else optionNoopt =
kFALSE;
350 for (j=0; j<
fNDiv2-1; j++) {
364 Int_t i, j, k, nDivOpt;
365 Double_t step1=0, step2=0, wmin2=0, wmax2=0;
390 wmin2, wmax2, nDivOpt,
401 for (j=0; j<
fNDiv2-1; j++) {
409 for (i=0; i<nTickl; i++) {
417 for (i=0; i<nTickr; i++) {
unsigned short UShort_t
Unsigned Short integer 2 bytes (unsigned short).
int Int_t
Signed integer 4 bytes (int).
bool Bool_t
Boolean (0=false, 1=true) (bool).
double Double_t
Double 8 bytes.
float Float_t
Float 4 bytes (float).
const char Option_t
Option string (const char).
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
virtual Color_t GetLineColor() const
Return the line color.
virtual Width_t GetLineWidth() const
Return the line width.
virtual Short_t GetTextAlign() const
Return the text alignment.
virtual Font_t GetTextFont() const
Return the text font.
virtual Color_t GetTextColor() const
Return the text color.
virtual void GetRGB(Float_t &r, Float_t &g, Float_t &b) const
void Init()
Default initialization.
~TGLAxis() override
Destructor.
void TicksPositionsOpt()
Compute ticks positions. Linear and optimized.
void PaintGLAxis(const Double_t p1[3], const Double_t p2[3], Double_t wmin, Double_t wmax, Int_t ndiv, Option_t *opt="")
Paint GL Axis.
Double_t fTickMarksLength
void PaintGLAxisBody()
Paint horizontal axis body at position (0,0,0).
void TicksPositions(Option_t *opt="")
Compute ticks positions.
void SetLabelsAngles(Double_t a1, Double_t a2, Double_t a3)
Set labels' angles.
void PaintGLAxisLabels()
Paint axis labels on the main tick marks.
void DoLabels()
Do labels.
void TicksPositionsNoOpt()
Compute ticks positions. Linear and not optimized.
Int_t fTickMarksOrientation
void PaintGLAxisTickMarks()
Paint axis tick marks.
static Float_t LineWidth()
Get the line-width, taking the global scaling into account.
static void Optimize(Double_t A1, Double_t A2, Int_t nold, Double_t &BinLow, Double_t &BinHigh, Int_t &nbins, Double_t &BWID, Option_t *option="")
Static function to compute reasonable axis limits.
T * Normal2Plane(const T v1[3], const T v2[3], const T v3[3], T normal[3])
Calculates a normal vector of a plane.
Double_t ACos(Double_t)
Returns the principal value of the arc cosine of x, expressed in radians.
Double_t ATan(Double_t)
Returns the principal value of the arc tangent of x, expressed in radians.
Double_t Sqrt(Double_t x)
Returns the square root of x.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.