Logo ROOT   6.08/07
Reference Guide
TGLAxis.h
Go to the documentation of this file.
1 // @(#)root/gl:$Id$
2 // Author: Olivier Couet 17/04/2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2006, 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_TGLAxis
13 #define ROOT_TGLAxis
14 
15 #ifndef ROOT_TAttText
16 #include "TAttText.h"
17 #endif
18 
19 #ifndef ROOT_TAttLine
20 #include "TAttLine.h"
21 #endif
22 
23 class TString;
24 class TGLText;
25 
26 class TGLAxis : public TAttLine, public TAttText {
27 private:
28  TGLAxis(const TGLAxis&); // Not implemented
29  TGLAxis& operator=(const TGLAxis&); // Not implemented
30 
49  Double_t fAngle1; // 1st labels' angle.
50  Double_t fAngle2; // 2nd labels' angle.
51  Double_t fAngle3; // 3rd labels' angle.
52 
53 public:
54  TGLAxis();
55  virtual ~TGLAxis();
56 
57  void PaintGLAxis (const Double_t p1[3], const Double_t p2[3],
58  Double_t wmin , Double_t wmax , Int_t ndiv,
59  Option_t *opt="");
60  void Init ();
61  void PaintGLAxisBody ();
62  void PaintGLAxisTickMarks ();
63  void PaintGLAxisLabels ();
64  void TicksPositions (Option_t *opt="");
65  void TicksPositionsNoOpt ();
66  void TicksPositionsOpt ();
67  void DoLabels ();
68  void SetTickMarksLength (Double_t length){fTickMarksLength = length;}
69  void SetTickMarksOrientation (Int_t tmo){fTickMarksOrientation = tmo;}
70  void SetLabelsOffset (Double_t offset){fLabelsOffset = offset;}
71  void SetLabelsSize (Double_t size){fLabelsSize = size;}
72  void SetGridLength (Double_t grid){fGridLength = grid;}
73  void SetLabelsAngles (Double_t a1, Double_t a2, Double_t a3);
74 
75  ClassDef(TGLAxis,0) // a GL Axis
76 };
77 
78 #endif
Double_t fAngle1
Definition: TGLAxis.h:49
void TicksPositions(Option_t *opt="")
Compute ticks positions.
Definition: TGLAxis.cxx:298
void TicksPositionsNoOpt()
Compute ticks positions. Linear and not optimized.
Definition: TGLAxis.cxx:331
GL Text.
Definition: TGLText.h:21
const char Option_t
Definition: RtypesCore.h:62
void SetTickMarksLength(Double_t length)
Definition: TGLAxis.h:68
Basic string class.
Definition: TString.h:137
Int_t fTickMarksOrientation
Definition: TGLAxis.h:44
int Int_t
Definition: RtypesCore.h:41
Double_t fGridLength
Definition: TGLAxis.h:47
Int_t fNTicks1
Definition: TGLAxis.h:35
TGLAxis()
Constructor.
Definition: TGLAxis.cxx:35
Int_t fNDiv2
Definition: TGLAxis.h:33
void SetTickMarksOrientation(Int_t tmo)
Definition: TGLAxis.h:69
Double_t fLabelsSize
Definition: TGLAxis.h:46
GL Axis.
Definition: TGLAxis.h:26
#define ClassDef(name, id)
Definition: Rtypes.h:254
static double p2(double t, double a, double b, double c)
void Init()
Default initialization.
Definition: TGLAxis.cxx:43
TString * fLabels
Definition: TGLAxis.h:39
void SetLabelsAngles(Double_t a1, Double_t a2, Double_t a3)
Set labels' angles.
Definition: TGLAxis.cxx:446
TGLText * fText
Definition: TGLAxis.h:48
Int_t fNDiv
Definition: TGLAxis.h:31
Double_t fWmax
Definition: TGLAxis.h:42
Text Attributes class.
Definition: TAttText.h:24
static double p1(double t, double a, double b)
void SetGridLength(Double_t grid)
Definition: TGLAxis.h:72
Double_t fLabelsOffset
Definition: TGLAxis.h:45
void PaintGLAxisLabels()
Paint axis labels on the main tick marks.
Definition: TGLAxis.cxx:255
Double_t fAngle3
Definition: TGLAxis.h:51
void SetLabelsOffset(Double_t offset)
Definition: TGLAxis.h:70
void DoLabels()
Do labels.
Definition: TGLAxis.cxx:430
void PaintGLAxisBody()
Paint horizontal axis body at position (0,0,0)
Definition: TGLAxis.cxx:168
double Double_t
Definition: RtypesCore.h:55
Double_t fAngle2
Definition: TGLAxis.h:50
Double_t fAxisLength
Definition: TGLAxis.h:40
TGLAxis & operator=(const TGLAxis &)
void PaintGLAxisTickMarks()
Paint axis tick marks.
Definition: TGLAxis.cxx:185
Double_t fWmin
Definition: TGLAxis.h:41
Double_t fTickMarksLength
Definition: TGLAxis.h:43
Int_t fNDiv3
Definition: TGLAxis.h:34
Double_t * fTicks1
Definition: TGLAxis.h:37
void TicksPositionsOpt()
Compute ticks positions. Linear and optimized.
Definition: TGLAxis.cxx:363
Double_t * fTicks2
Definition: TGLAxis.h:38
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.
Definition: TGLAxis.cxx:88
Int_t fNTicks2
Definition: TGLAxis.h:36
Int_t fNDiv1
Definition: TGLAxis.h:32
void SetLabelsSize(Double_t size)
Definition: TGLAxis.h:71
Line Attributes class.
Definition: TAttLine.h:24
virtual ~TGLAxis()
Destructor.
Definition: TGLAxis.cxx:66