ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes | List of all members
TGLAxis Class Reference

GL Axis.

To draw a 3D axis in a GL window. The labels are drawn using FTGL.

Definition at line 26 of file TGLAxis.h.

Public Member Functions

 TGLAxis ()
 
virtual ~TGLAxis ()
 Destructor. More...
 
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. More...
 
void Init ()
 Default initialization. More...
 
void PaintGLAxisBody ()
 Paint horizontal axis body at position (0,0,0) More...
 
void PaintGLAxisTickMarks ()
 Paint axis tick marks. More...
 
void PaintGLAxisLabels ()
 Paint axis labels on the main tick marks. More...
 
void TicksPositions (Option_t *opt="")
 Compute ticks positions. More...
 
void TicksPositionsNoOpt ()
 Compute ticks positions. Linear and not optimized. More...
 
void TicksPositionsOpt ()
 Compute ticks positions. Linear and optimized. More...
 
void DoLabels ()
 Do labels. More...
 
void SetTickMarksLength (Double_t length)
 
void SetTickMarksOrientation (Int_t tmo)
 
void SetLabelsOffset (Double_t offset)
 
void SetLabelsSize (Double_t size)
 
void SetGridLength (Double_t grid)
 
void SetLabelsAngles (Double_t a1, Double_t a2, Double_t a3)
 Set labels' angles. More...
 
- Public Member Functions inherited from TAttLine
 TAttLine ()
 AttLine default constructor. More...
 
 TAttLine (Color_t lcolor, Style_t lstyle, Width_t lwidth)
 AttLine normal constructor. More...
 
virtual ~TAttLine ()
 AttLine destructor. More...
 
void Copy (TAttLine &attline) const
 Copy this line attributes to a new TAttLine. More...
 
Int_t DistancetoLine (Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
 Compute distance from point px,py to a line. More...
 
virtual Color_t GetLineColor () const
 
virtual Style_t GetLineStyle () const
 
virtual Width_t GetLineWidth () const
 
virtual void Modify ()
 Change current line attributes if necessary. More...
 
virtual void ResetAttLine (Option_t *option="")
 Reset this line attributes to default values. More...
 
virtual void SaveLineAttributes (std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
 Save line attributes as C++ statement(s) on output stream out. More...
 
virtual void SetLineAttributes ()
 Invoke the DialogCanvas Line attributes. More...
 
virtual void SetLineColor (Color_t lcolor)
 
virtual void SetLineColorAlpha (Color_t lcolor, Float_t lalpha)
 Set a transparent line color. More...
 
virtual void SetLineStyle (Style_t lstyle)
 
virtual void SetLineWidth (Width_t lwidth)
 
 ClassDef (TAttLine, 2)
 
- Public Member Functions inherited from TAttText
 TAttText ()
 
 TAttText (Int_t align, Float_t angle, Color_t color, Style_t font, Float_t tsize)
 AttText normal constructor. More...
 
virtual ~TAttText ()
 AttText destructor. More...
 
void Copy (TAttText &atttext) const
 Copy this text attributes to a new TAttText. More...
 
virtual Short_t GetTextAlign () const
 
virtual Float_t GetTextAngle () const
 
virtual Color_t GetTextColor () const
 
virtual Font_t GetTextFont () const
 
virtual Float_t GetTextSize () const
 
virtual void Modify ()
 Change current text attributes if necessary. More...
 
virtual void ResetAttText (Option_t *toption="")
 Reset this text attributes to default values. More...
 
virtual void SaveTextAttributes (std::ostream &out, const char *name, Int_t alidef=12, Float_t angdef=0, Int_t coldef=1, Int_t fondef=61, Float_t sizdef=1)
 Save text attributes as C++ statement(s) on output stream out. More...
 
virtual void SetTextAttributes ()
 Invoke the DialogCanvas Text attributes. More...
 
virtual void SetTextAlign (Short_t align=11)
 
virtual void SetTextAngle (Float_t tangle=0)
 
virtual void SetTextColor (Color_t tcolor=1)
 
virtual void SetTextColorAlpha (Color_t tcolor, Float_t talpha)
 Set a transparent marker color. More...
 
virtual void SetTextFont (Font_t tfont=62)
 
virtual void SetTextSize (Float_t tsize=1)
 
virtual void SetTextSizePixels (Int_t npixels)
 Set the text size in pixels. More...
 

Private Member Functions

 TGLAxis (const TGLAxis &)
 
TGLAxisoperator= (const TGLAxis &)
 

Private Attributes

Int_t fNDiv
 
Int_t fNDiv1
 
Int_t fNDiv2
 
Int_t fNDiv3
 
Int_t fNTicks1
 
Int_t fNTicks2
 
Double_tfTicks1
 
Double_tfTicks2
 
TStringfLabels
 
Double_t fAxisLength
 
Double_t fWmin
 
Double_t fWmax
 
Double_t fTickMarksLength
 
Int_t fTickMarksOrientation
 
Double_t fLabelsOffset
 
Double_t fLabelsSize
 
Double_t fGridLength
 
TGLTextfText
 
Double_t fAngle1
 
Double_t fAngle2
 
Double_t fAngle3
 

Additional Inherited Members

- Protected Attributes inherited from TAttLine
Color_t fLineColor
 
Style_t fLineStyle
 
Width_t fLineWidth
 
- Protected Attributes inherited from TAttText
Float_t fTextAngle
 
Float_t fTextSize
 
Short_t fTextAlign
 
Color_t fTextColor
 
Font_t fTextFont
 

#include <TGLAxis.h>

Inheritance diagram for TGLAxis:
[legend]

Constructor & Destructor Documentation

TGLAxis::TGLAxis ( const TGLAxis )
private
TGLAxis::TGLAxis ( )
TGLAxis::~TGLAxis ( )
virtual

Destructor.

Definition at line 66 of file TGLAxis.cxx.

Member Function Documentation

void TGLAxis::DoLabels ( )

Do labels.

Definition at line 430 of file TGLAxis.cxx.

Referenced by PaintGLAxis().

void TGLAxis::Init ( )

Default initialization.

Definition at line 43 of file TGLAxis.cxx.

TGLAxis& TGLAxis::operator= ( const TGLAxis )
private
void TGLAxis::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.

  • p1, p2 : Axis position in the 3D space.
  • wmin, wmax : Minimum and maximum values along the axis. wmin < wmax.
  • ndiv : Number of axis divisions. It is an integer in the form "ttsspp" where "tt" is the number of tertiary divisions, "ss" is the number of secondary divisions and "pp" the number of primary divisions.
  • opt : Options. "N" - By default the number of divisions is optimized to get a nice labeling. When option "N" is given, the number of divisions is not optimized.

Definition at line 88 of file TGLAxis.cxx.

void TGLAxis::PaintGLAxisBody ( )

Paint horizontal axis body at position (0,0,0)

Definition at line 168 of file TGLAxis.cxx.

Referenced by PaintGLAxis().

void TGLAxis::PaintGLAxisLabels ( )

Paint axis labels on the main tick marks.

Definition at line 255 of file TGLAxis.cxx.

Referenced by PaintGLAxis().

void TGLAxis::PaintGLAxisTickMarks ( )

Paint axis tick marks.

Definition at line 185 of file TGLAxis.cxx.

Referenced by PaintGLAxis().

void TGLAxis::SetGridLength ( Double_t  grid)
inline

Definition at line 72 of file TGLAxis.h.

void TGLAxis::SetLabelsAngles ( Double_t  a1,
Double_t  a2,
Double_t  a3 
)

Set labels' angles.

Definition at line 446 of file TGLAxis.cxx.

void TGLAxis::SetLabelsOffset ( Double_t  offset)
inline

Definition at line 70 of file TGLAxis.h.

void TGLAxis::SetLabelsSize ( Double_t  size)
inline

Definition at line 71 of file TGLAxis.h.

void TGLAxis::SetTickMarksLength ( Double_t  length)
inline

Definition at line 68 of file TGLAxis.h.

void TGLAxis::SetTickMarksOrientation ( Int_t  tmo)
inline

Definition at line 69 of file TGLAxis.h.

void TGLAxis::TicksPositions ( Option_t opt = "")

Compute ticks positions.

Definition at line 298 of file TGLAxis.cxx.

Referenced by PaintGLAxis().

void TGLAxis::TicksPositionsNoOpt ( )

Compute ticks positions. Linear and not optimized.

Definition at line 331 of file TGLAxis.cxx.

Referenced by TicksPositions().

void TGLAxis::TicksPositionsOpt ( )

Compute ticks positions. Linear and optimized.

Definition at line 363 of file TGLAxis.cxx.

Referenced by TicksPositions().

Member Data Documentation

Double_t TGLAxis::fAngle1
private

Definition at line 49 of file TGLAxis.h.

Referenced by Init(), PaintGLAxisLabels(), and SetLabelsAngles().

Double_t TGLAxis::fAngle2
private

Definition at line 50 of file TGLAxis.h.

Referenced by Init(), PaintGLAxisLabels(), and SetLabelsAngles().

Double_t TGLAxis::fAngle3
private

Definition at line 51 of file TGLAxis.h.

Referenced by Init(), PaintGLAxisLabels(), and SetLabelsAngles().

Double_t TGLAxis::fAxisLength
private
Double_t TGLAxis::fGridLength
private

Definition at line 47 of file TGLAxis.h.

Referenced by Init(), PaintGLAxisTickMarks(), and SetGridLength().

TString* TGLAxis::fLabels
private

Definition at line 39 of file TGLAxis.h.

Referenced by DoLabels(), Init(), PaintGLAxisLabels(), and ~TGLAxis().

Double_t TGLAxis::fLabelsOffset
private

Definition at line 45 of file TGLAxis.h.

Referenced by Init(), PaintGLAxisLabels(), and SetLabelsOffset().

Double_t TGLAxis::fLabelsSize
private

Definition at line 46 of file TGLAxis.h.

Referenced by Init(), PaintGLAxisLabels(), and SetLabelsSize().

Int_t TGLAxis::fNDiv
private

Definition at line 31 of file TGLAxis.h.

Referenced by Init(), PaintGLAxis(), and TicksPositions().

Int_t TGLAxis::fNDiv1
private
Int_t TGLAxis::fNDiv2
private

Definition at line 33 of file TGLAxis.h.

Referenced by Init(), TicksPositions(), TicksPositionsNoOpt(), and TicksPositionsOpt().

Int_t TGLAxis::fNDiv3
private

Definition at line 34 of file TGLAxis.h.

Referenced by Init(), and TicksPositions().

Int_t TGLAxis::fNTicks1
private
Int_t TGLAxis::fNTicks2
private

Definition at line 36 of file TGLAxis.h.

Referenced by Init(), PaintGLAxisTickMarks(), TicksPositionsNoOpt(), and TicksPositionsOpt().

TGLText* TGLAxis::fText
private

Definition at line 48 of file TGLAxis.h.

Referenced by Init(), PaintGLAxisLabels(), and ~TGLAxis().

Double_t TGLAxis::fTickMarksLength
private

Definition at line 43 of file TGLAxis.h.

Referenced by Init(), PaintGLAxisTickMarks(), and SetTickMarksLength().

Int_t TGLAxis::fTickMarksOrientation
private

Definition at line 44 of file TGLAxis.h.

Referenced by Init(), PaintGLAxisLabels(), PaintGLAxisTickMarks(), and SetTickMarksOrientation().

Double_t* TGLAxis::fTicks1
private
Double_t* TGLAxis::fTicks2
private
Double_t TGLAxis::fWmax
private

Definition at line 42 of file TGLAxis.h.

Referenced by DoLabels(), Init(), PaintGLAxis(), and TicksPositionsOpt().

Double_t TGLAxis::fWmin
private

Definition at line 41 of file TGLAxis.h.

Referenced by DoLabels(), Init(), PaintGLAxis(), and TicksPositionsOpt().

Collaboration diagram for TGLAxis:
[legend]

The documentation for this class was generated from the following files: