ROOT logo
ROOT » GRAF3D » GL » TGLVertex3

class TGLVertex3


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:
TGLVertex3()
TGLVertex3(Double_t* v)
TGLVertex3(const TGLVertex3& other)
TGLVertex3(Double_t x, Double_t y, Double_t z)
virtual~TGLVertex3()
Double_t*Arr()
const Double_t*CArr() const
static TClass*Class()
voidDump() const
voidFill(Double_t val)
virtual TClass*IsA() const
voidMaximum(const TGLVertex3& other)
voidMinimum(const TGLVertex3& other)
voidNegate()
TGLVertex3&operator*=(Double_t f)
const TGLVertex3&operator+=(const TGLVector3& vec)
TGLVertex3operator-() const
const TGLVertex3&operator-=(const TGLVector3& vec)
TGLVertex3&operator=(const TGLVertex3& rhs)
Bool_toperator==(const TGLVertex3& rhs) const
Double_t&operator[](Int_t index)
const Double_t&operator[](Int_t index) const
voidSet(const TGLVertex3& other)
voidSet(Double_t x, Double_t y, Double_t z)
voidShift(TGLVector3& shift)
voidShift(Double_t xDelta, Double_t yDelta, Double_t zDelta)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
Double_tX() const
Double_t&X()
Double_tY() const
Double_t&Y()
Double_tZ() const
Double_t&Z()
protected:
Bool_tValidIndex(UInt_t index) const

Data Members

protected:
Double_tfVals[3]

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGLVertex3()
 Construct a default (0.0, 0.0, 0.0) vertex
TGLVertex3(Double_t x, Double_t y, Double_t z)
 Construct a vertex with components (x,y,z)
TGLVertex3(Double_t* v)
 Construct a vertex with components (v[0], v[1], v[2])
TGLVertex3(const TGLVertex3 & other)
 Construct a vertex from 'other'
~TGLVertex3()
 Destroy vertex object
void Shift(TGLVector3& shift)
 Offset a vertex by vector 'shift'
void Shift(Double_t xDelta, Double_t yDelta, Double_t zDelta)
 Offset a vertex by components (xDelta, yDelta, zDelta)
void Minimum(const TGLVertex3& other)
void Maximum(const TGLVertex3& other)
void Dump() const
 Output vertex component values to std::cout
void Negate()
void Fill(Double_t val)
void Set(Double_t x, Double_t y, Double_t z)
void Set(const TGLVertex3& other)
Bool_t ValidIndex(UInt_t index) const
 Fields
{ return (index < 3); }
Double_t X()
{ return fVals[0]; }
Double_t & X()
{ return fVals[0]; }
Double_t Y()
{ return fVals[1]; }
Double_t & Y()
{ return fVals[1]; }
Double_t Z()
{ return fVals[2]; }
Double_t & Z()
{ return fVals[2]; }
const Double_t * CArr() const
{ return fVals; }
Double_t * Arr()
{ return fVals; }
TGLMatrix & operator*=(Double_t f)
{ MultRight(rhs); return *this; }
TGLColor& operator=(const TGLVertex3& rhs)