class TGLUtil


 Wrapper class for various misc static functions - error checking,
 draw helpers etc.

Function Members (Methods)

public:
virtual~TGLUtil()
static voidBeginExtendPickRegion(Float_t scale)
static voidCheckError(const char* loc)
static TClass*Class()
static voidColor(Color_t color_index, Float_t alpha = 1)
static voidColor3f(Float_t r, Float_t g, Float_t b)
static voidColor3fv(const Float_t* rgb)
static voidColor3ub(UChar_t r, UChar_t g, UChar_t b)
static voidColor3ubv(const UChar_t* rgb)
static voidColor4f(Float_t r, Float_t g, Float_t b, Float_t a)
static voidColor4fv(const Float_t* rgba)
static voidColor4ub(UChar_t r, UChar_t g, UChar_t b, UChar_t a)
static voidColor4ubv(const UChar_t* rgba)
static voidColorTransparency(Color_t color_index, UChar_t transparency = 0)
static voidDrawLine(const TGLLine3& line, TGLUtil::ELineHeadShape head, Double_t size, const Float_t* rgba)
static voidDrawLine(const TGLVertex3& start, const TGLVector3& vector, TGLUtil::ELineHeadShape head, Double_t size, const Float_t* rgba)
static voidDrawNumber(const TString& num, const TGLVertex3& pos, Bool_t center = kFALSE)
static voidDrawReferenceMarker(const TGLCamera& camera, const TGLVertex3& pos, Float_t radius = 3, const Float_t* rgba = 0)
static voidDrawRing(const TGLVertex3& center, const TGLVector3& normal, Double_t radius, const Float_t* rgba)
static voidDrawSimpleAxes(const TGLCamera& camera, const TGLBoundingBox& bbox, Int_t axesType)
static voidDrawSphere(const TGLVertex3& position, Double_t radius, const Float_t* rgba)
static voidEndExtendPickRegion()
static UInt_tGetDefaultDrawQuality()
static UInt_tGetDrawQuality()
static GLUtesselator*GetDrawTesselator3dv()
static GLUtesselator*GetDrawTesselator3fv()
static GLUtesselator*GetDrawTesselator4dv()
static GLUtesselator*GetDrawTesselator4fv()
virtual TClass*IsA() const
static Bool_tIsColorLocked()
static UInt_tLockColor()
static voidRenderCrosses(const TAttMarker& marker, Float_t* p, Int_t n, Bool_t sec_selection = kFALSE)
static voidRenderPoints(const TAttMarker& marker, Float_t* p, Int_t n, Int_t pick_radius = 0, Bool_t selection = kFALSE, Bool_t sec_selection = kFALSE)
static voidRenderPolyLine(const TAttLine& al, Float_t* p, Int_t n, Int_t pick_radius = 0, Bool_t selection = kFALSE)
static voidRenderPolyMarkers(const TAttMarker& marker, Float_t* p, Int_t n, Int_t pick_radius = 0, Bool_t selection = kFALSE, Bool_t sec_selection = kFALSE)
static voidResetDrawQuality()
static voidSetDefaultDrawQuality(UInt_t dq)
static voidSetDrawColors(const Float_t* rgba)
static voidSetDrawQuality(UInt_t dq)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
static UInt_tUnlockColor()
private:
TGLUtil(const TGLUtil&)
TGLUtil&operator=(const TGLUtil&)

Data Members

public:
enum ELineHeadShape { kLineHeadNone
kLineHeadArrow
kLineHeadBox
};
enum EAxesType { kAxesNone
kAxesEdge
kAxesOrigin
};
private:
static UInt_tfgColorLockCount
static UInt_tfgDefaultDrawQuality
static UInt_tfgDrawQuality

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

GLUtesselator* GetDrawTesselator3fv()
 Returns a tesselator for direct drawing when using 3-vertices with
 single precision.
GLUtesselator* GetDrawTesselator4fv()
 Returns a tesselator for direct drawing when using 4-vertices with
 single precision.
GLUtesselator* GetDrawTesselator3dv()
 Returns a tesselator for direct drawing when using 3-vertices with
 double precision.
GLUtesselator* GetDrawTesselator4dv()
 Returns a tesselator for direct drawing when using 4-vertices with
 double precision.
UInt_t GetDrawQuality()
static: get draw quality
void SetDrawQuality(UInt_t dq)
static: set draw quality
void ResetDrawQuality()
static: reset draw quality
UInt_t GetDefaultDrawQuality()
static: get default draw quality
void SetDefaultDrawQuality(UInt_t dq)
static: set default draw quality
void CheckError(const char* loc)
 Check current GL error state, outputing details via ROOT
 Error method if one
UInt_t LockColor()
 Prevent further color changes.
UInt_t UnlockColor()
 Allow color changes.
Bool_t IsColorLocked()
static: return true if color lockcount is greater than 0
void Color(Color_t color_index, Float_t alpha = 1)
 Set color from color_index and GL-style alpha (default 1).
void ColorTransparency(Color_t color_index, UChar_t transparency = 0)
 Set color from color_index and ROOT-style transparency (default 0).
void Color3ub(UChar_t r, UChar_t g, UChar_t b)
 Wrapper for glColor3f.
void Color4ub(UChar_t r, UChar_t g, UChar_t b, UChar_t a)
 Wrapper for glColor4f.
void Color3ubv(const UChar_t* rgb)
 Wrapper for glColor3fv.
void Color4ubv(const UChar_t* rgba)
 Wrapper for glColor4fv.
void Color3f(Float_t r, Float_t g, Float_t b)
 Wrapper for glColor3f.
void Color4f(Float_t r, Float_t g, Float_t b, Float_t a)
 Wrapper for glColor4f.
void Color3fv(const Float_t* rgb)
 Wrapper for glColor3fv.
void Color4fv(const Float_t* rgba)
 Wrapper for glColor4fv.
void BeginExtendPickRegion(Float_t scale)
 Extend pick region for large point-sizes or line-widths.
void EndExtendPickRegion()
 End extension of the pick region.
void RenderPolyMarkers(const TAttMarker& marker, Float_t* p, Int_t n, Int_t pick_radius = 0, Bool_t selection = kFALSE, Bool_t sec_selection = kFALSE)
 Render polymarkers at points specified by p-array.
 Supports point and cross-like styles.
void RenderPoints(const TAttMarker& marker, Float_t* p, Int_t n, Int_t pick_radius = 0, Bool_t selection = kFALSE, Bool_t sec_selection = kFALSE)
 Render markers as circular or square points.
 Color is never changed.
void RenderCrosses(const TAttMarker& marker, Float_t* p, Int_t n, Bool_t sec_selection = kFALSE)
 Render markers as crosses.
 Color is never changed.
void RenderPolyLine(const TAttLine& al, Float_t* p, Int_t n, Int_t pick_radius = 0, Bool_t selection = kFALSE)
 Render poly-line as specified by the p-array.
void SetDrawColors(const Float_t* rgba)
 Set basic draw colors from 4 component 'rgba'
 Used by other TGLUtil drawing routines

 Sets basic (unlit) color - glColor
 and also GL materials (see OpenGL docs) thus:

 diffuse  : rgba
 ambient  : 0.0 0.0 0.0 1.0
 specular : 0.6 0.6 0.6 1.0
 emission : rgba/4.0
 shininess: 60.0

 emission is set so objects with no lights (but lighting still enabled)
 are partially visible
void DrawSphere(const TGLVertex3& position, Double_t radius, const Float_t* rgba)
 Draw sphere, centered on vertex 'position', with radius 'radius',
 color 'rgba'
void DrawLine(const TGLLine3& line, TGLUtil::ELineHeadShape head, Double_t size, const Float_t* rgba)
 Draw thick line (tube) defined by 'line', with head at end shape
 'head' - box/arrow/none, (head) size 'size', color 'rgba'
void DrawLine(const TGLVertex3& start, const TGLVector3& vector, TGLUtil::ELineHeadShape head, Double_t size, const Float_t* rgba)
 Draw thick line (tube) running from 'start', length 'vector',
 with head at end of shape 'head' - box/arrow/none,
 (head) size 'size', color 'rgba'
void DrawRing(const TGLVertex3& center, const TGLVector3& normal, Double_t radius, const Float_t* rgba)
 Draw ring, centered on 'center', lying on plane defined by 'center' & 'normal'
 of outer radius 'radius', color 'rgba'
void DrawReferenceMarker(const TGLCamera& camera, const TGLVertex3& pos, Float_t radius = 3, const Float_t* rgba = 0)
 Draw a sphere- marker on world-coordinate 'pos' with pixel
 radius 'radius'. Color argument is optional.
void DrawSimpleAxes(const TGLCamera& camera, const TGLBoundingBox& bbox, Int_t axesType)
 Draw simple xyz-axes for given bounding-box.
void DrawNumber(const TString& num, const TGLVertex3& pos, Bool_t center = kFALSE)
 Draw number in string 'num' via internal 8x8-pixel bitmap on
 vertex 'pos'. If 'center' is true, the number is centered on 'pos'.
 Only numbers, '.', '-' and ' ' are supported.
TGLUtil(const TGLUtil& )
TGLUtil& operator=(const TGLUtil& )
virtual ~TGLUtil()
{}

Author: Richard Maunder 25/05/2005
Last change: root/gl:$Id: TGLUtil.h 26148 2008-11-11 19:58:19Z matevz $
Last generated: 2008-11-14 16:34
Copyright (C) 1995-2004, Rene Brun and Fons Rademakers. *

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.