+
class TGLUtil
-
library: libRGL
#include "TGLUtil.h"
Display options:
Show inherited
Show non-public

class TGLUtil


TGLVertex3

3 component (x/y/z) vertex class

This is part of collection of simple utility classes for GL only in
TGLUtil.h/cxx. These provide const and non-const accessors Arr() &
CArr() to a GL compatible internal field - so can be used directly
with OpenGL C API calls - which TVector3 etc cannot (easily).
They are not intended to be fully featured just provide minimum
required.

Function Members (Methods)

public:
virtual~TGLUtil()
static voidCheckError(const char* loc)
static TClass*Class()
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)
virtual TClass*IsA() const
static voidResetDrawQuality()
static voidSetDrawColors(const Float_t* rgba)
static voidSetDrawQuality(UInt_t dq)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
protected:
TGLUtil(const TGLUtil&)
TGLUtil&operator=(const TGLUtil& glu)

Data Members

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

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

void CheckError(const char* loc)
 Check current GL error state, outputing details via ROOT
 Error method if one
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& glu)
virtual ~TGLUtil()
{ }
void SetDrawQuality(UInt_t dq)
{ fgDrawQuality = dq; }
void ResetDrawQuality()
{ fgDrawQuality = 60; }

Author: Richard Maunder 25/05/2005
Last update: root/gl:$Name: $:$Id: TGLUtil.cxx,v 1.41 2007/06/24 18:48:11 brun Exp $
Copyright (C) 1995-2000, 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.