12 #ifndef ROOT_TGLBoundingBox
13 #define ROOT_TGLBoundingBox
140 if (
this != &other) {
215 #endif // ROOT_TGLBoundingBox
void SetAligned(const TGLVertex3 &lowVertex, const TGLVertex3 &highVertex)
Set ALIGNED box from two low/high 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----...
void Dump() const
Output to std::cout the vertices, center and volume of box.
TGLVertex3 MaxAAVertex() const
Find maximum vertex values.
void Set(const TGLVertex3 vertex[8])
Set a bounding box from provided 8 vertices.
Double_t Max(UInt_t index) const
Find maximum vertex value for axis of index X(0), Y(1), Z(2)
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 : .
TGLVertex3 Center() const
TGLVector3 fAxesNorm[3]
box axes in global frame - cached for speed
Int_t NumVertices() const
Bool_t ValidIndex(UInt_t index) const
Double_t Min(UInt_t index) const
Find minimum 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)
const TGLVertex3 * Vertices() const
Double_t Diagonal() const
void Transform(const TGLMatrix &matrix)
Transform all vertices with matrix.
3 component (x/y/z) vertex class.
3 component (x/y/z) vector class.
void UpdateCache()
normalised box axes in global frame - cached for speed
void Draw(Bool_t solid=kFALSE) const
Draw the bounding box as either wireframe (default) of solid using current GL color.
TGLVector3 Extents() const
void ExpandAligned(const TGLVertex3 &point)
Expand current bbox so that it includes the point.
const TGLVertex3 & Vertex(UInt_t index) const
Double_t fDiagonal
box volume - cached for speed
virtual ~TGLBoundingBox()
Destroy bounding box.
TGLPlane GetNearPlane() const
Return the near-plane.
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 SetEmpty()
Set bounding box empty - all vertices at (0,0,0)
ClassDef(TGLBoundingBox, 0)
const TGLVector3 & Axis(UInt_t i, Bool_t normalised=kTRUE) const
Double_t fVolume
the 8 bounding box vertices
Rgl::EOverlap Overlap(const TGLPlane &plane) const
Find overlap (Inside, Outside, Partial) of plane c.f. bounding box.
const TGLVertex3 & operator[](UInt_t index) const
Concrete class describing an orientated (free) or axis aligned box of 8 vertices. ...
void PlaneSet(TGLPlaneSet_t &planeSet) const
Fill out supplied plane set vector with TGLPlane objects representing six faces of box...
TGLBoundingBox & operator=(const TGLBoundingBox &other)
void Translate(const TGLVector3 &offset)
Translate all vertices by offset.
std::complex< float_v > Z
3D plane class - of format Ax + By + Cz + D = 0
TGLVertex3 MinAAVertex() const
Find minimum vertex values.