Logo ROOT   6.14/05
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 #include "TAttText.h"
16 
17 #include "TAttLine.h"
18 
19 class TString;
20 class TGLText;
21 
22 class TGLAxis : public TAttLine, public TAttText {
23 private:
24  TGLAxis(const TGLAxis&); // Not implemented
25  TGLAxis& operator=(const TGLAxis&); // Not implemented
26 
45  Double_t fAngle1; // 1st labels' angle.
46  Double_t fAngle2; // 2nd labels' angle.
47  Double_t fAngle3; // 3rd labels' angle.
48 
49 public:
50  TGLAxis();
51  virtual ~TGLAxis();
52 
53  void PaintGLAxis (const Double_t p1[3], const Double_t p2[3],
54  Double_t wmin , Double_t wmax , Int_t ndiv,
55  Option_t *opt="");
56  void Init ();
57  void PaintGLAxisBody ();
58  void PaintGLAxisTickMarks ();
59  void PaintGLAxisLabels ();
60  void TicksPositions (Option_t *opt="");
61  void TicksPositionsNoOpt ();
62  void TicksPositionsOpt ();
63  void DoLabels ();
64  void SetTickMarksLength (Double_t length){fTickMarksLength = length;}
65  void SetTickMarksOrientation (Int_t tmo){fTickMarksOrientation = tmo;}
66  void SetLabelsOffset (Double_t offset){fLabelsOffset = offset;}
67  void SetLabelsSize (Double_t size){fLabelsSize = size;}
68  void SetGridLength (Double_t grid){fGridLength = grid;}
69  void SetLabelsAngles (Double_t a1, Double_t a2, Double_t a3);
70 
71  ClassDef(TGLAxis,0) // a GL Axis
72 };
73 
74 #endif
Double_t fAngle1
Definition: TGLAxis.h:45
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:19
const char Option_t
Definition: RtypesCore.h:62
void SetTickMarksLength(Double_t length)
Definition: TGLAxis.h:64
Basic string class.
Definition: TString.h:131
Int_t fTickMarksOrientation
Definition: TGLAxis.h:40
int Int_t
Definition: RtypesCore.h:41
Double_t fGridLength
Definition: TGLAxis.h:43
Int_t fNTicks1
Definition: TGLAxis.h:31
TGLAxis()
Constructor.
Definition: TGLAxis.cxx:35
Int_t fNDiv2
Definition: TGLAxis.h:29
void SetTickMarksOrientation(Int_t tmo)
Definition: TGLAxis.h:65
Double_t fLabelsSize
Definition: TGLAxis.h:42
GL Axis.
Definition: TGLAxis.h:22
#define ClassDef(name, id)
Definition: Rtypes.h:320
static double p2(double t, double a, double b, double c)
void Init()
Default initialization.
Definition: TGLAxis.cxx:43
TString * fLabels
Definition: TGLAxis.h:35
void SetLabelsAngles(Double_t a1, Double_t a2, Double_t a3)
Set labels' angles.
Definition: TGLAxis.cxx:446
TGLText * fText
Definition: TGLAxis.h:44
Int_t fNDiv
Definition: TGLAxis.h:27
Double_t fWmax
Definition: TGLAxis.h:38
Text Attributes class.
Definition: TAttText.h:18
static double p1(double t, double a, double b)
void SetGridLength(Double_t grid)
Definition: TGLAxis.h:68
Double_t fLabelsOffset
Definition: TGLAxis.h:41
void PaintGLAxisLabels()
Paint axis labels on the main tick marks.
Definition: TGLAxis.cxx:255
Double_t fAngle3
Definition: TGLAxis.h:47
void SetLabelsOffset(Double_t offset)
Definition: TGLAxis.h:66
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:46
Double_t fAxisLength
Definition: TGLAxis.h:36
TGLAxis & operator=(const TGLAxis &)
void PaintGLAxisTickMarks()
Paint axis tick marks.
Definition: TGLAxis.cxx:185
Double_t fWmin
Definition: TGLAxis.h:37
Double_t fTickMarksLength
Definition: TGLAxis.h:39
Int_t fNDiv3
Definition: TGLAxis.h:30
Double_t * fTicks1
Definition: TGLAxis.h:33
void TicksPositionsOpt()
Compute ticks positions. Linear and optimized.
Definition: TGLAxis.cxx:363
Double_t * fTicks2
Definition: TGLAxis.h:34
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:32
Int_t fNDiv1
Definition: TGLAxis.h:28
void SetLabelsSize(Double_t size)
Definition: TGLAxis.h:67
Line Attributes class.
Definition: TAttLine.h:18
virtual ~TGLAxis()
Destructor.
Definition: TGLAxis.cxx:66