116 glTranslatef(x1, y1, z1);
125 if (y2==y1 && x2==x1) {
130 p3[0] = p2[0]; p3[1] = p2[1]; p3[2] = 0;
135 glRotatef(phi, normal[0], normal[1], normal[2]);
144 }
else if ((x2-x1)<0) {
148 if (y2>y1) theta = 90;
152 if (x2<x1) theta = 180;
154 glRotatef(theta, 0., 0., 1.);
171 Float_t red = 1.f, green = 1.f, blue = 1.f;
173 col->
GetRGB(red, green, blue);
174 glColor3d(red, green, blue);
177 glVertex3d(0., 0., 0.);
218 glVertex3f(
fTicks1[i], yo*tl, zo*tl);
226 glLineStipple(1, stipple);
227 glEnable(GL_LINE_STIPPLE);
234 glDisable(GL_LINE_STIPPLE);
245 glVertex3f(
fTicks2[i], yo*tl, zo*tl);
289 for (i=0; i<
fNDiv1+1 ; i++) {
302 if (strchr(opt,
'N')) optionNoopt =
kTRUE;
else optionNoopt =
kFALSE;
349 for (i=0; i<fNTicks1-1; i++) {
351 for (j=0; j<
fNDiv2-1; j++) {
365 Int_t i, j, k, nDivOpt;
366 Double_t step1=0, step2=0, wmin2=0, wmax2=0;
391 wmin2, wmax2, nDivOpt,
402 for (j=0; j<
fNDiv2-1; j++) {
410 for (i=0; i<nTickl; i++) {
417 t2 =
fTicks1[fNTicks1-1]+step2;
418 for (i=0; i<nTickr; i++) {
void PaintGLText(Double_t x, Double_t y, Double_t z, const char *text)
Draw text.
static double p3(double t, double a, double b, double c, double d)
virtual Font_t GetTextFont() const
void TicksPositions(Option_t *opt="")
Compute ticks positions.
void TicksPositionsNoOpt()
Compute ticks positions. Linear and not optimized.
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
Int_t fTickMarksOrientation
void SetGLTextAngles(Double_t a1, Double_t a2, Double_t a3)
Set the text rotation angles.
T * Normal2Plane(const T v1[3], const T v2[3], const T v3[3], T normal[3])
static const double x2[5]
virtual Short_t GetTextAlign() const
virtual Color_t GetTextColor() const
void Init(TClassEdit::TInterpreterLookupHelper *helper)
static double p2(double t, double a, double b, double c)
void Init()
Default initialization.
void SetLabelsAngles(Double_t a1, Double_t a2, Double_t a3)
Set labels' angles.
virtual void SetTextAlign(Short_t align=11)
virtual void GetRGB(Float_t &r, Float_t &g, Float_t &b) const
char * Form(const char *fmt,...)
static double p1(double t, double a, double b)
virtual Color_t GetLineColor() const
void PaintGLAxisLabels()
Paint axis labels on the main tick marks.
void PaintGLAxisBody()
Paint horizontal axis body at position (0,0,0)
void DoLabels()
Do labels.
ClassImp(TGLAxis) TGLAxis
Constructor.
static const double x1[5]
void PaintGLAxisTickMarks()
Paint axis tick marks.
The color creation and management class.
Double_t fTickMarksLength
void TicksPositionsOpt()
Compute ticks positions. Linear and optimized.
void SetGLTextFont(Font_t fontnumber)
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.
virtual void SetTextColor(Color_t tcolor=1)
static Float_t LineWidth()
Get the line-width, taking the global scaling into account.
Double_t Sqrt(Double_t x)
virtual void SetTextSize(Float_t tsize=1)
virtual Width_t GetLineWidth() const
virtual ~TGLAxis()
Destructor.