A++ » INCLUDE » TGLBoundingBox

class TGLBoundingBox


TGLBoundingBox

Concrete class describing an orientated (free) or axis aligned box
of 8 verticies. Supports methods for setting aligned or orientated
boxes, find volume, axes, extents, centers, face planes etc.
Also tests for overlap testing of planes and other bounding boxes,
with fast sphere approximation.

Function Members (Methods)

public:
virtual~TGLBoundingBox()
const TGLVector3&Axis(UInt_t i, Bool_t normalised = kTRUE) const
TGLVertex3Center() const
static TClass*Class()
Double_tDiagonal() const
voidDraw(Bool_t solid = kFALSE) const
voidDump() const
voidExpandAligned(const TGLVertex3& point)
TGLVector3Extents() const
const vector<UInt_t>&FaceVertices(TGLBoundingBox::EFace face) const
TGLPlaneGetNearPlane() const
virtual TClass*IsA() const
Bool_tIsEmpty() const
TGLVertex3MaxAAVertex() const
voidMergeAligned(const TGLBoundingBox& other)
TGLVertex3MinAAVertex() const
Int_tNumVertices() const
TGLBoundingBox&operator=(const TGLBoundingBox& other)
const TGLVertex3&operator[](UInt_t index) const
Rgl::EOverlapOverlap(const TGLPlane& plane) const
Rgl::EOverlapOverlap(const TGLBoundingBox& box) const
voidPlaneSet(TGLPlaneSet_t& planeSet) const
voidScale(Double_t factor)
voidScale(Double_t xFactor, Double_t yFactor, Double_t zFactor)
voidSet(const TGLVertex3[8] vertex)
voidSet(const Double_t[8][3] vertex)
voidSet(const TGLBoundingBox& other)
voidSetAligned(const TGLVertex3& lowVertex, const TGLVertex3& highVertex)
voidSetAligned(UInt_t nbPnts, const Double_t* pnts)
voidSetEmpty()
virtual voidShowMembers(TMemberInspector& insp) const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
TGLBoundingBox()
TGLBoundingBox(const TGLVertex3[8] vertex)
TGLBoundingBox(const Double_t[8][3] vertex)
TGLBoundingBox(const TGLBoundingBox& other)
TGLBoundingBox(const TGLVertex3& lowVertex, const TGLVertex3& highVertex)
voidTransform(const TGLMatrix& matrix)
voidTranslate(const TGLVector3& offset)
const TGLVertex3&Vertex(UInt_t index) const
const TGLVertex3*Vertices() const
Double_tVolume() const
Double_tXMax() const
Double_tXMin() const
Double_tYMax() const
Double_tYMin() const
Double_tZMax() const
Double_tZMin() const
private:
Double_tMax(UInt_t index) const
Double_tMin(UInt_t index) const
voidUpdateCache()
Bool_tValidIndex(UInt_t index) const

Data Members

public:
static TGLBoundingBox::EFacekFaceCount
static TGLBoundingBox::EFacekFaceHighX
static TGLBoundingBox::EFacekFaceHighY
static TGLBoundingBox::EFacekFaceHighZ
static TGLBoundingBox::EFacekFaceLowX
static TGLBoundingBox::EFacekFaceLowY
static TGLBoundingBox::EFacekFaceLowZ
private:
TGLVector3fAxes[3]! box axes in global frame - cached for speed
TGLVector3fAxesNorm[3]! normalised box axes in global frame - cached for speed
Double_tfDiagonal! max box diagonal - cached for speed
TGLVertex3fVertex[8]! the 8 bounding box vertices
Double_tfVolume! box volume - cached for speed

Class Charts

Inheritance Chart:
TGLBoundingBox

Function documentation

const TGLVertex3 & Vertex(UInt_t index) const
const TGLVertex3* Vertices() const
TGLVector3 Extents() const
TGLVertex3 Center() const
const TGLVector3 & Axis(UInt_t i, Bool_t normalised = kTRUE) const
Bool_t IsEmpty() const
void UpdateCache()
 Methods
Bool_t ValidIndex(UInt_t index) const
{ return (index < 8); }
Double_t Min(UInt_t index) const
Double_t Max(UInt_t index) const
TGLBoundingBox()
TGLBoundingBox(const TGLVertex3 vertex[8])
TGLBoundingBox(const Double_t vertex[8][3])
TGLBoundingBox(const TGLVertex3& lowVertex, const TGLVertex3& highVertex)
TGLBoundingBox(const TGLBoundingBox& other)
virtual ~TGLBoundingBox()
void Set(const TGLVertex3 vertex[8])
void Set(const Double_t vertex[8][3])
void Set(const TGLBoundingBox& other)
void SetEmpty()
void SetAligned(const TGLVertex3& lowVertex, const TGLVertex3& highVertex)
 Set axis aligned box
void SetAligned(UInt_t nbPnts, const Double_t* pnts)
void MergeAligned(const TGLBoundingBox& other)
void ExpandAligned(const TGLVertex3& point)
void Transform(const TGLMatrix& matrix)
 Manipulation
void Scale(Double_t factor)
void Scale(Double_t xFactor, Double_t yFactor, Double_t zFactor)
void Translate(const TGLVector3& offset)
Double_t XMin() const
{ return Min(0); }
Double_t XMax() const
{ return Max(0); }
Double_t YMin() const
{ return Min(1); }
Double_t YMax() const
{ return Max(1); }
Double_t ZMin() const
{ return Min(2); }
Double_t ZMax() const
{ return Max(2); }
TGLVertex3 MinAAVertex() const
TGLVertex3 MaxAAVertex() const
Int_t NumVertices() const
{ return 8; }
const std::vector<UInt_t> & FaceVertices(TGLBoundingBox::EFace face) const
Double_t Volume() const
{ return fVolume; }
Double_t Diagonal() const
{ return fDiagonal; }
void PlaneSet(TGLPlaneSet_t& planeSet) const
TGLPlane GetNearPlane() const
void Draw(Bool_t solid = kFALSE) const
void Dump() const