library: libRGL
#include "TGLBoundingBox.h"

TGLBoundingBox


class description - source file - inheritance tree (.pdf)

class TGLBoundingBox

Inheritance Chart:
TGLBoundingBox
    private:
Double_t Max(UInt_t index) const Double_t Min(UInt_t index) const void UpdateCache() Bool_t ValidIndex(UInt_t index) const public:
TGLBoundingBox() TGLBoundingBox(const TGLVertex3* vertex) TGLBoundingBox(const Double_t** vertex) TGLBoundingBox(const TGLVertex3& lowVertex, const TGLVertex3& highVertex) TGLBoundingBox(const TGLBoundingBox& other) virtual ~TGLBoundingBox() const TGLVector3& Axis(UInt_t i, Bool_t normalised = kTRUE) const TGLVertex3 Center() const static TClass* Class() void Draw() const void Dump() const TGLVector3 Extents() const virtual TClass* IsA() const Bool_t IsEmpty() const TGLBoundingBox& operator=(const TGLBoundingBox& other) const TGLVertex3& operator[](UInt_t index) const EOverlap Overlap(const TGLPlane& plane) const EOverlap Overlap(const TGLBoundingBox& box) const void Scale(Double_t factor) void Scale(Double_t xFactor, Double_t yFactor, Double_t zFactor) void Set(const TGLVertex3* vertex) void Set(const Double_t** vertex) void Set(const TGLBoundingBox& other) void SetAligned(const TGLVertex3& lowVertex, const TGLVertex3& highVertex) void SetAligned(UInt_t nbPnts, const Double_t* pnts) void SetEmpty() virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) void Transform(const TGLMatrix& matrix) void Translate(const TGLVector3& offset) Double_t Volume() const Double_t XMax() const Double_t XMin() const Double_t YMax() const Double_t YMin() const Double_t ZMax() const Double_t ZMin() const

Data Members

    private:
TGLVertex3 fVertex[8] ! the 8 bounding box vertices Double_t fVolume ! box volume - cached for speed TGLVector3 fAxes[3] ! box axes in global frame - cached for speed TGLVector3 fAxesNorm[3] ! normalised box axes in global frame - cached for speed

Class Description


TGLBoundingBox()
 Construct an empty bounding box

TGLBoundingBox(const TGLVertex3 vertex[8])
 Construct a bounding box from provided 8 vertices

TGLBoundingBox(const Double_t vertex[8][3])
 Construct a bounding box from provided 8 vertices

TGLBoundingBox(const TGLVertex3 & lowVertex, const TGLVertex3 & highVertex)
 Construct an global axis ALIGNED bounding box from provided low/high vertex pair

TGLBoundingBox(const TGLBoundingBox & other)
 Construct a bounding box as copy of existing one

~TGLBoundingBox()
 Destroy bounding box

void UpdateCache()
 Update the internal cached volume and axes vectors

void Set(const TGLVertex3 vertex[8])
 Set a bounding box from provided 8 verticies

void Set(const Double_t vertex[8][3])
 Set a bounding box from provided 8 verticies

void Set(const TGLBoundingBox & other)
 Set a bounding box from verticies of other

void SetEmpty()
 Set bounding box empty - all vertexes at (0,0,0)

void SetAligned(const TGLVertex3 & lowVertex, const TGLVertex3 & highVertex)
 Set ALIGNED box from two low/high vertices. Box axes are aligned with
 global frame axes that verticies are specified in.

void SetAligned(UInt_t nbPnts, const Double_t * pnts)
 Set ALIGNED box from one or more points. Box axes are aligned with
 global frame axes that points are specified in.

void Scale(Double_t factor)
 Isotropically scale bounding box along it's LOCAL axes, preserving center

void Scale(Double_t xFactor, Double_t yFactor, Double_t zFactor)
 Asymetrically scale box along it's LOCAL x,y,z axes, preserving center

void Translate(const TGLVector3 & offset)
 Translate all vertexes by offset

void Transform(const TGLMatrix & matrix)
 Transform all vertexes with matrix

EOverlap Overlap(const TGLPlane & plane) const
 Find overlap (Inside, Outside, Partial) of plane c.f. bounding box

EOverlap Overlap(const TGLBoundingBox & other) const
 Find overlap (Inside, Outside, Partial) of other bounding box c.f. us

void Draw() const
 Draw the bounding box out using current GL color

Double_t Min(UInt_t index) const
 Find minimum vertex value for axis of index X(0), Y(1), Z(2)

Double_t Max(UInt_t index) const
 Find maximum vertex value for axis of index X(0), Y(1), Z(2)

void Dump() const
 Output to std::cout the vertexes, center and volume of box



Inline Functions


                   Bool_t ValidIndex(UInt_t index) const
          TGLBoundingBox& operator=(const TGLBoundingBox& other)
        const TGLVertex3& operator[](UInt_t index) const
                 Double_t XMin() const
                 Double_t XMax() const
                 Double_t YMin() const
                 Double_t YMax() const
                 Double_t ZMin() const
                 Double_t ZMax() const
               TGLVertex3 Center() const
               TGLVector3 Extents() const
        const TGLVector3& Axis(UInt_t i, Bool_t normalised = kTRUE) const
                 Double_t Volume() const
                   Bool_t IsEmpty() const
                  TClass* Class()
                  TClass* IsA() const
                     void ShowMembers(TMemberInspector& insp, char* parent)
                     void Streamer(TBuffer& b)
                     void StreamerNVirtual(TBuffer& b)


Author: Richard Maunder 25/05/2005
Last update: root/gl:$Name: $:$Id: TGLBoundingBox.cxx,v 1.12 2005/08/30 10:29:52 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

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.