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.
Double_t | Max(UInt_t index) const |
Double_t | Min(UInt_t index) const |
void | UpdateCache() |
Bool_t | ValidIndex(UInt_t index) const |
TGLVector3 | fAxes[3] | ! box axes in global frame - cached for speed |
TGLVector3 | fAxesNorm[3] | ! normalised box axes in global frame - cached for speed |
Double_t | fDiagonal | ! max box diagonal - cached for speed |
vector<TGLVertex3> | fVertex | ! the 8 bounding box vertices |
Double_t | fVolume | ! box volume - cached for speed |
Construct an global axis ALIGNED bounding box from provided low/high vertex pair
Update the internally cached volume and axes vectors - these are retained for efficiency - many more reads than modifications
Set ALIGNED box from two low/high vertices. Box axes are aligned with global frame axes that vertices are specified in.
Set ALIGNED box from one or more points. Box axes are aligned with global frame axes that points are specified in.
Expand current bbox so that it includes other's bbox. This make the bbox axis-aligned.
Isotropically scale bounding box along it's LOCAL axes, preserving center
Asymetrically scale box along it's LOCAL x,y,z axes, preserving center
return a vector of face vertices y | | |________x / 3-------2 / /| /| z 7-------6 | | 0-----|-1 |/ | 4-------5
Fill out supplied plane set vector with TGLPlane objects representing six faces of box
Find overlap (Inside, Outside, Partial) of plane c.f. bounding box.
Find overlap (Inside, Outside, Partial) of other bounding box c.f. us.
Draw the bounding box as either wireframe (default) of solid using current GL color.