12 #ifndef ROOT_TGLBoundingBox 13 #define ROOT_TGLBoundingBox 138 if (
this != &other) {
213 #endif // ROOT_TGLBoundingBox void SetAligned(const TGLVertex3 &lowVertex, const TGLVertex3 &highVertex)
Set ALIGNED box from two low/high vertices.
TGLVertex3 Center() const
TGLVector3 Extents() const
void Dump() const
Output to std::cout the vertices, center and volume of box.
const TGLVertex3 & Vertex(UInt_t index) const
void Set(const TGLVertex3 vertex[8])
Set a bounding box from provided 8 vertices.
16 component (4x4) transform matrix - column MAJOR as per GL.
TGLVector3 fAxes[3]
max box diagonal - cached for speed
T Mag(const SVector< T, D > &rhs)
Vector magnitude (Euclidian norm) Compute : .
Int_t NumVertices() const
TGLVector3 fAxesNorm[3]
box axes in global frame - cached for speed
Double_t Max(UInt_t index) const
Find maximum vertex value for axis of index X(0), Y(1), Z(2)
void box(Int_t pat, Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Bool_t ValidIndex(UInt_t index) const
TGLVertex3 MinAAVertex() const
Find minimum vertex values.
#define ClassDef(name, id)
void Transform(const TGLMatrix &matrix)
Transform all vertices with matrix.
3 component (x/y/z) vertex class.
TGLPlane GetNearPlane() const
Return the near-plane.
3 component (x/y/z) vector class.
void UpdateCache()
normalised box axes in global frame - cached for speed
void PlaneSet(TGLPlaneSet_t &planeSet) const
Fill out supplied plane set vector with TGLPlane objects representing six faces of box...
Double_t Min(UInt_t index) const
Find minimum vertex value for axis of index X(0), Y(1), Z(2)
TGLBoundingBox()
Construct an empty bounding box.
Double_t Diagonal() const
TGLVertex3 MaxAAVertex() const
Find maximum vertex values.
const TGLVertex3 * Vertices() const
void ExpandAligned(const TGLVertex3 &point)
Expand current bbox so that it includes the point.
Double_t fDiagonal
box volume - cached for speed
virtual ~TGLBoundingBox()
Destroy bounding box.
const TGLVertex3 & operator[](UInt_t index) const
void MergeAligned(const TGLBoundingBox &other)
Expand current bbox so that it includes other's bbox.
void Scale(Double_t factor)
Isotropically scale bounding box along it's LOCAL axes, preserving center.
std::vector< TGLPlane > TGLPlaneSet_t
void Draw(Bool_t solid=kFALSE) const
Draw the bounding box as either wireframe (default) of solid using current GL color.
void SetEmpty()
Set bounding box empty - all vertices at (0,0,0)
Double_t fVolume
the 8 bounding box vertices
Concrete class describing an orientated (free) or axis aligned box of 8 vertices. ...
const std::vector< UInt_t > & FaceVertices(EFace face) const
return a vector of face vertices y | | |________x / 3----—2 / /| /| z 7----—6 | | 0--—|-1 |/ |/ 4-...
TGLBoundingBox & operator=(const TGLBoundingBox &other)
void Translate(const TGLVector3 &offset)
Translate all vertices by offset.
const TGLVector3 & Axis(UInt_t i, Bool_t normalised=kTRUE) const
Rgl::EOverlap Overlap(const TGLPlane &plane) const
Find overlap (Inside, Outside, Partial) of plane c.f. bounding box.
3D plane class - of format Ax + By + Cz + D = 0