class TGLPlane


TGLPlane

3D plane class - of format Ax + By + Cz + D = 0

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:
TGLPlane()
TGLPlane(const TGLPlane& other)
TGLPlane(Double_t* eq)
TGLPlane(const TGLVector3& norm, const TGLVertex3& point)
TGLPlane(const TGLVertex3& p1, const TGLVertex3& p2, const TGLVertex3& p3)
TGLPlane(Double_t a, Double_t b, Double_t c, Double_t d)
virtual~TGLPlane()
Double_tA() const
Double_t*Arr()
Double_tB() const
Double_tC() const
const Double_t*CArr() const
static TClass*Class()
Double_tD() const
Double_tDistanceTo(const TGLVertex3& vertex) const
voidDump() const
virtual TClass*IsA() const
TGLVertex3NearestOn(const TGLVertex3& point) const
voidNegate()
TGLVector3Norm() const
TGLPlane&operator=(const TGLPlane&)
voidSet(const TGLPlane& other)
voidSet(Double_t* eq)
voidSet(const TGLVector3& norm, const TGLVertex3& point)
voidSet(const TGLVertex3& p1, const TGLVertex3& p2, const TGLVertex3& p3)
voidSet(Double_t a, Double_t b, Double_t c, Double_t d)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& b)
private:
voidNormalise()

Data Members

private:
Double_tfVals[4]

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TGLPlane()
 Construct a default plane of x + y + z = 0
TGLPlane(const TGLPlane & other)
 Construct plane from 'other'
TGLPlane(Double_t a, Double_t b, Double_t c, Double_t d)
 Construct plane with equation a.x + b.y + c.z + d = 0
 with optional normalisation
TGLPlane(Double_t eq[4])
 Construct plane with equation eq[0].x + eq[1].y + eq[2].z + eq[3] = 0
 with optional normalisation
TGLPlane(const TGLVertex3& p1, const TGLVertex3& p2, const TGLVertex3& p3)
 Construct plane passing through 3 supplied points
 with optional normalisation
TGLPlane(const TGLVector3& norm, const TGLVertex3& point)
 Construct plane with supplied normal vector, passing through point
 with optional normalisation
~TGLPlane()
 Destroy plane object
void Dump()
 Output plane equation to std::out
void Set(const TGLPlane & other)
void Set(Double_t a, Double_t b, Double_t c, Double_t d)
void Set(Double_t eq[4])
void Set(const TGLVector3& norm, const TGLVertex3& point)
void Set(const TGLVertex3& p1, const TGLVertex3& p2, const TGLVertex3& p3)
void Negate()
void Normalise()
Double_t DistanceTo(const TGLVertex3& vertex) const
TGLVertex3 NearestOn(const TGLVertex3& point) const
const Double_t * CArr()
{ return fVals; }
Double_t * Arr()
{ return fVals; }
Double_t A()
 Accessors
{ return fVals[0]; }
Double_t B()
{ return fVals[1]; }
Double_t C()
{ return fVals[2]; }
TGLVector3 Norm()
{ return TGLVector3( fVals[0], fVals[1], fVals[2]); }
TGLUtil& operator=(const TGLPlane& )

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.