library: libRGL #include "TGLBoundingBox.h" |
TGLBoundingBox
class description - header file - source file - inheritance tree (.pdf)
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(Bool_t solid = kFALSE) const
void Dump() const
TGLVector3 Extents() const
const vector<UInt_t>& FaceVertices(TGLBoundingBox::EFace face) 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 PlaneSet(TGLPlaneSet_t& planeSet) 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)
const TGLVertex3& Vertex(UInt_t index) const
const vector<TGLVertex3>& Vertices() const
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
private:
vector<TGLVertex3> fVertex ! 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
public:
static const TGLBoundingBox::EFace kFaceLowX
static const TGLBoundingBox::EFace kFaceHighX
static const TGLBoundingBox::EFace kFaceLowY
static const TGLBoundingBox::EFace kFaceHighY
static const TGLBoundingBox::EFace kFaceLowZ
static const TGLBoundingBox::EFace kFaceHighZ
static const TGLBoundingBox::EFace kFaceCount
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.
void UpdateCache()
Update the internally cached volume and axes vectors - these are retained
for efficiency - many more reads than modifications
void Set(const TGLVertex3 vertex[8])
Set a bounding box from provided 8 vertices
void Set(const Double_t vertex[8][3])
Set a bounding box from provided 8 vertices
void SetEmpty()
Set bounding box empty - all vertices 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 vertices 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
const std::vector<UInt_t> & FaceVertices(EFace face)
return a vector of face vertices
y
|
|
|________x
/ 3-------2
/ /| /|
z 7-------6 |
| 0-----|-1
|/ |
4-------5
EOverlap Overlap(const TGLPlane & plane)
Find overlap (Inside, Outside, Partial) of plane c.f. bounding box
EOverlap Overlap(const TGLBoundingBox & other)
Find overlap (Inside, Outside, Partial) of other bounding box c.f. us
void Draw(Bool_t solid)
Draw the bounding box as either wireframe (default) of solid using current GL color
Double_t Min(UInt_t index)
Find minimum vertex value for axis of index X(0), Y(1), Z(2)
Double_t Max(UInt_t index)
Find maximum vertex value for axis of index X(0), Y(1), Z(2)
void Dump()
Output to std::cout the vertices, center and volume of box
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Author: Richard Maunder 25/05/2005
Last update: root/gl:$Name: $:$Id: TGLBoundingBox.cxx,v 1.19 2006/05/26 09:12:37 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.