#include <TGLBoundingBox.h>
Public Types | |
enum | EFace |
enum | EFace |
Public Member Functions | |
TGLBoundingBox () | |
TGLBoundingBox (const TGLVertex3 vertex[8]) | |
TGLBoundingBox (const Double_t vertex[8][3]) | |
TGLBoundingBox (const TGLVertex3 &lowVertex, const TGLVertex3 &highVertex) | |
TGLBoundingBox (const TGLBoundingBox &other) | |
virtual | ~TGLBoundingBox () |
TGLBoundingBox & | operator= (const TGLBoundingBox &other) |
void | Set (const TGLVertex3 vertex[8]) |
void | Set (const Double_t vertex[8][3]) |
void | Set (const TGLBoundingBox &other) |
void | SetEmpty () |
void | SetAligned (const TGLVertex3 &lowVertex, const TGLVertex3 &highVertex) |
void | SetAligned (UInt_t nbPnts, const Double_t *pnts) |
void | MergeAligned (const TGLBoundingBox &other) |
void | ExpandAligned (const TGLVertex3 &point) |
void | Transform (const TGLMatrix &matrix) |
void | Scale (Double_t factor) |
void | Scale (Double_t xFactor, Double_t yFactor, Double_t zFactor) |
void | Translate (const TGLVector3 &offset) |
const TGLVertex3 & | operator[] (UInt_t index) const |
const TGLVertex3 & | Vertex (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 | MinAAVertex () const |
TGLVertex3 | MaxAAVertex () const |
const TGLVertex3 * | Vertices () const |
Int_t | NumVertices () const |
const std::vector< UInt_t > & | FaceVertices (EFace face) const |
TGLVertex3 | Center () const |
TGLVector3 | Extents () const |
const TGLVector3 & | Axis (UInt_t i, Bool_t normalised=kTRUE) const |
Bool_t | IsEmpty () const |
Double_t | Volume () const |
Double_t | Diagonal () const |
void | PlaneSet (TGLPlaneSet_t &planeSet) const |
TGLPlane | GetNearPlane () const |
EOverlap | Overlap (const TGLPlane &plane) const |
EOverlap | Overlap (const TGLBoundingBox &box) const |
void | Draw (Bool_t solid=kFALSE) const |
void | Dump () const |
ClassDef (TGLBoundingBox, 0) | |
TGLBoundingBox () | |
TGLBoundingBox (const TGLVertex3 vertex[8]) | |
TGLBoundingBox (const Double_t vertex[8][3]) | |
TGLBoundingBox (const TGLVertex3 &lowVertex, const TGLVertex3 &highVertex) | |
TGLBoundingBox (const TGLBoundingBox &other) | |
virtual | ~TGLBoundingBox () |
TGLBoundingBox & | operator= (const TGLBoundingBox &other) |
void | Set (const TGLVertex3 vertex[8]) |
void | Set (const Double_t vertex[8][3]) |
void | Set (const TGLBoundingBox &other) |
void | SetEmpty () |
void | SetAligned (const TGLVertex3 &lowVertex, const TGLVertex3 &highVertex) |
void | SetAligned (UInt_t nbPnts, const Double_t *pnts) |
void | MergeAligned (const TGLBoundingBox &other) |
void | ExpandAligned (const TGLVertex3 &point) |
void | Transform (const TGLMatrix &matrix) |
void | Scale (Double_t factor) |
void | Scale (Double_t xFactor, Double_t yFactor, Double_t zFactor) |
void | Translate (const TGLVector3 &offset) |
const TGLVertex3 & | operator[] (UInt_t index) const |
const TGLVertex3 & | Vertex (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 | MinAAVertex () const |
TGLVertex3 | MaxAAVertex () const |
const TGLVertex3 * | Vertices () const |
Int_t | NumVertices () const |
const std::vector< UInt_t > & | FaceVertices (EFace face) const |
TGLVertex3 | Center () const |
TGLVector3 | Extents () const |
const TGLVector3 & | Axis (UInt_t i, Bool_t normalised=kTRUE) const |
Bool_t | IsEmpty () const |
Double_t | Volume () const |
Double_t | Diagonal () const |
void | PlaneSet (TGLPlaneSet_t &planeSet) const |
TGLPlane | GetNearPlane () const |
EOverlap | Overlap (const TGLPlane &plane) const |
EOverlap | Overlap (const TGLBoundingBox &box) const |
void | Draw (Bool_t solid=kFALSE) const |
void | Dump () const |
ClassDef (TGLBoundingBox, 0) | |
Private Member Functions | |
void | UpdateCache () |
normalised box axes in global frame - cached for speed | |
Bool_t | ValidIndex (UInt_t index) const |
Double_t | Min (UInt_t index) const |
Double_t | Max (UInt_t index) const |
void | UpdateCache () |
normalised box axes in global frame - cached for speed | |
Bool_t | ValidIndex (UInt_t index) const |
Double_t | Min (UInt_t index) const |
Double_t | Max (UInt_t index) const |
Private Attributes | |
TGLVertex3 | fVertex [8] |
Double_t | fVolume |
the 8 bounding box vertices | |
Double_t | fDiagonal |
box volume - cached for speed | |
TGLVector3 | fAxes [3] |
max box diagonal - cached for speed | |
TGLVector3 | fAxesNorm [3] |
box axes in global frame - cached for speed |
Definition at line 32 of file TGLBoundingBox.h.
Definition at line 113 of file TGLBoundingBox.h.
Definition at line 113 of file TGLBoundingBox.h.
TGLBoundingBox::TGLBoundingBox | ( | ) |
TGLBoundingBox::TGLBoundingBox | ( | const TGLVertex3 | vertex[8] | ) |
TGLBoundingBox::TGLBoundingBox | ( | const Double_t | vertex[8][3] | ) |
TGLBoundingBox::TGLBoundingBox | ( | const TGLVertex3 & | lowVertex, | |
const TGLVertex3 & | highVertex | |||
) |
TGLBoundingBox::TGLBoundingBox | ( | const TGLBoundingBox & | other | ) |
TGLBoundingBox::~TGLBoundingBox | ( | ) | [virtual] |
Definition at line 66 of file TGLBoundingBox.cxx.
TGLBoundingBox::TGLBoundingBox | ( | ) |
TGLBoundingBox::TGLBoundingBox | ( | const TGLVertex3 | vertex[8] | ) |
TGLBoundingBox::TGLBoundingBox | ( | const Double_t | vertex[8][3] | ) |
TGLBoundingBox::TGLBoundingBox | ( | const TGLVertex3 & | lowVertex, | |
const TGLVertex3 & | highVertex | |||
) |
TGLBoundingBox::TGLBoundingBox | ( | const TGLBoundingBox & | other | ) |
virtual TGLBoundingBox::~TGLBoundingBox | ( | ) | [virtual] |
void TGLBoundingBox::UpdateCache | ( | ) | [private] |
normalised box axes in global frame - cached for speed
Definition at line 72 of file TGLBoundingBox.cxx.
References TMath::Abs(), Cross(), Extents(), fAxes, fAxesNorm, fDiagonal, fVertex, fVolume, i, kFALSE, kTRUE, TGLVector3::Mag(), TGLVertex3::Set(), TGLVertex3::X(), TGLVertex3::Y(), and TGLVertex3::Z().
Referenced by Scale(), Set(), SetAligned(), SetEmpty(), and Transform().
Definition at line 66 of file TGLBoundingBox.h.
Definition at line 712 of file TGLBoundingBox.cxx.
Referenced by MinAAVertex(), XMin(), YMin(), and ZMin().
Definition at line 725 of file TGLBoundingBox.cxx.
Referenced by MaxAAVertex(), XMax(), YMax(), and ZMax().
TGLBoundingBox & TGLBoundingBox::operator= | ( | const TGLBoundingBox & | other | ) | [inline] |
void TGLBoundingBox::Set | ( | const TGLVertex3 | vertex[8] | ) |
Definition at line 126 of file TGLBoundingBox.cxx.
References fVertex, and UpdateCache().
Referenced by MergeAligned(), operator=(), Set(), TGLParametricEquationGL::SetBBox(), TH2GL::SetBBox(), TH3GL::SetBBox(), TF2GL::SetBBox(), TGLBoundingBox(), TGLLogicalShape::TGLLogicalShape(), and TGLPhysicalShape::UpdateBoundingBox().
void TGLBoundingBox::Set | ( | const Double_t | vertex[8][3] | ) |
void TGLBoundingBox::Set | ( | const TGLBoundingBox & | other | ) |
void TGLBoundingBox::SetEmpty | ( | ) |
Definition at line 161 of file TGLBoundingBox.cxx.
References fVertex, and UpdateCache().
Referenced by TGLViewerBase::MergeSceneBBoxes(), TGLViewerBase::PreRender(), TGLCamera::ResetInterest(), and TEveTextGL::SetBBox().
void TGLBoundingBox::SetAligned | ( | const TGLVertex3 & | lowVertex, | |
const TGLVertex3 & | highVertex | |||
) |
Definition at line 172 of file TGLBoundingBox.cxx.
References Error, fVertex, UpdateCache(), TGLVertex3::X(), TGLVertex3::Y(), and TGLVertex3::Z().
Referenced by TGLScene::CalcBoundingBox(), TEveTextGL::DirectDraw(), ExpandAligned(), MergeAligned(), SetAligned(), TGLObject::SetAxisAlignedBBox(), TGLBoundingBox(), and TGLLogicalShape::TGLLogicalShape().
void TGLBoundingBox::MergeAligned | ( | const TGLBoundingBox & | other | ) |
Definition at line 237 of file TGLBoundingBox.cxx.
References high, IsEmpty(), low, MaxAAVertex(), MinAAVertex(), Set(), and SetAligned().
Referenced by TGLViewerBase::MergeSceneBBoxes(), and TGLViewerBase::PreRender().
void TGLBoundingBox::ExpandAligned | ( | const TGLVertex3 & | point | ) |
Definition at line 259 of file TGLBoundingBox.cxx.
References high, low, MaxAAVertex(), MinAAVertex(), and SetAligned().
void TGLBoundingBox::Transform | ( | const TGLMatrix & | matrix | ) |
Definition at line 330 of file TGLBoundingBox.cxx.
References fVertex, and UpdateCache().
Referenced by TGLPhysicalShape::UpdateBoundingBox().
void TGLBoundingBox::Scale | ( | Double_t | factor | ) |
Definition at line 274 of file TGLBoundingBox.cxx.
References UpdateCache().
Referenced by TGLCamera::UpdateInterest().
Definition at line 283 of file TGLBoundingBox.cxx.
References Axis(), fVertex, kFALSE, and UpdateCache().
void TGLBoundingBox::Translate | ( | const TGLVector3 & | offset | ) |
const TGLVertex3 & TGLBoundingBox::operator[] | ( | UInt_t | index | ) | const [inline] |
const TGLVertex3 & TGLBoundingBox::Vertex | ( | UInt_t | index | ) | const [inline] |
Double_t TGLBoundingBox::XMin | ( | ) | const [inline] |
Definition at line 100 of file TGLBoundingBox.h.
References Min().
Referenced by TGLScenePad::AddHistoPhysical(), TGLUtil::DrawSimpleAxes(), and TGLAxisPainterBox::PlotStandard().
Double_t TGLBoundingBox::XMax | ( | ) | const [inline] |
Definition at line 101 of file TGLBoundingBox.h.
References Max().
Referenced by TGLScenePad::AddHistoPhysical(), TGLUtil::DrawSimpleAxes(), and TGLAxisPainterBox::PlotStandard().
Double_t TGLBoundingBox::YMin | ( | ) | const [inline] |
Definition at line 102 of file TGLBoundingBox.h.
References Min().
Referenced by TGLUtil::DrawSimpleAxes(), and TGLAxisPainterBox::PlotStandard().
Double_t TGLBoundingBox::YMax | ( | ) | const [inline] |
Definition at line 103 of file TGLBoundingBox.h.
References Max().
Referenced by TGLUtil::DrawSimpleAxes(), and TGLAxisPainterBox::PlotStandard().
Double_t TGLBoundingBox::ZMin | ( | ) | const [inline] |
Definition at line 104 of file TGLBoundingBox.h.
References Min().
Referenced by TGLUtil::DrawSimpleAxes(), and TGLAxisPainterBox::PlotStandard().
Double_t TGLBoundingBox::ZMax | ( | ) | const [inline] |
Definition at line 105 of file TGLBoundingBox.h.
References Max().
Referenced by TGLUtil::DrawSimpleAxes(), and TGLAxisPainterBox::PlotStandard().
TGLVertex3 TGLBoundingBox::MinAAVertex | ( | ) | const |
Definition at line 738 of file TGLBoundingBox.cxx.
References Min().
Referenced by ExpandAligned(), and MergeAligned().
TGLVertex3 TGLBoundingBox::MaxAAVertex | ( | ) | const |
Definition at line 746 of file TGLBoundingBox.cxx.
References Max().
Referenced by ExpandAligned(), and MergeAligned().
const TGLVertex3 * TGLBoundingBox::Vertices | ( | ) | const [inline] |
Int_t TGLBoundingBox::NumVertices | ( | ) | const [inline] |
Definition at line 111 of file TGLBoundingBox.h.
Definition at line 343 of file TGLBoundingBox.cxx.
References init(), kFaceCount, kFaceHighX, kFaceHighY, kFaceHighZ, kFaceLowX, kFaceLowY, kFaceLowZ, kFALSE, and kTRUE.
TGLVertex3 TGLBoundingBox::Center | ( | ) | const [inline] |
Definition at line 174 of file TGLBoundingBox.h.
References fVertex, X, Y, and Z.
Referenced by TGLViewer::DrawDebugInfo(), TGLUtil::DrawSimpleAxes(), Dump(), TGLRotateManip::HandleButton(), TGLScaleManip::HandleMotion(), TGLTransManip::HandleMotion(), Overlap(), TGLViewer::PostSceneBuildSetup(), TGLPhysicalShape::Rotate(), TGLPhysicalShape::Scale(), TGLClipPlane::Set(), TGLClipSet::SetClipState(), TGLClipPlane::Setup(), TGLClipBox::Setup(), and TGLLightSet::StdSetupLights().
TGLVector3 TGLBoundingBox::Extents | ( | ) | const [inline] |
Definition at line 165 of file TGLBoundingBox.h.
References Axis(), kFALSE, and ROOT::Math::Mag().
Referenced by TGLViewer::DrawDebugInfo(), Dump(), Overlap(), TGLOrthoCamera::Reset(), TGLClipSet::SetClipState(), TGLClipPlane::Setup(), TGLClipBox::Setup(), TGLLightSet::StdSetupLights(), UpdateCache(), and TGLCamera::UpdateInterest().
const TGLVector3 & TGLBoundingBox::Axis | ( | UInt_t | i, | |
Bool_t | normalised = kTRUE | |||
) | const [inline] |
Definition at line 183 of file TGLBoundingBox.h.
References fAxes, and fAxesNorm.
Referenced by Extents(), TGLRotateManip::HandleButton(), TGLScaleManip::HandleMotion(), TGLTransManip::HandleMotion(), and Scale().
Bool_t TGLBoundingBox::IsEmpty | ( | ) | const [inline] |
Definition at line 207 of file TGLBoundingBox.h.
References Diagonal().
Referenced by TEveTextGL::DirectDraw(), MergeAligned(), TGLCamera::OfInterest(), TGLViewerBase::PreRender(), TGLLightSet::StdSetupLights(), and TGLCamera::UpdateInterest().
Double_t TGLBoundingBox::Volume | ( | ) | const [inline] |
Definition at line 121 of file TGLBoundingBox.h.
References fVolume.
Referenced by TGLScene::ComparePhysicalVolumes(), Dump(), and TGLCamera::UpdateInterest().
Double_t TGLBoundingBox::Diagonal | ( | ) | const [inline] |
Definition at line 122 of file TGLBoundingBox.h.
References fDiagonal.
Referenced by TGLScene::ComparePhysicalDiagonals(), IsEmpty(), and TGLCamera::OfInterest().
void TGLBoundingBox::PlaneSet | ( | TGLPlaneSet_t & | planeSet | ) | const |
Definition at line 396 of file TGLBoundingBox.cxx.
References fAxesNorm, and fVertex.
Referenced by TGLClipBox::PlaneSet().
TGLPlane TGLBoundingBox::GetNearPlane | ( | ) | const |
Definition at line 423 of file TGLBoundingBox.cxx.
References fAxesNorm, and fVertex.
Referenced by TGLClipPlane::PlaneSet(), and TGLClipPlane::Setup().
Definition at line 431 of file TGLBoundingBox.cxx.
References Center(), TGLPlane::DistanceTo(), Extents(), fVertex, kInside, kOutside, kPartial, and TGLVector3::Mag().
Referenced by TGLCamera::OfInterest(), and TGLCamera::UpdateInterest().
EOverlap TGLBoundingBox::Overlap | ( | const TGLBoundingBox & | box | ) | const |
Definition at line 459 of file TGLBoundingBox.cxx.
References a, b, Dot(), ROOT::Math::fabs(), i, k, kInside, kOutside, kPartial, TGLVector3::Mag(), norm(), sqrt(), and t.
Definition at line 630 of file TGLBoundingBox.cxx.
References fAxesNorm, fVertex, GL_LINE_LOOP, GL_LINES, GL_QUADS, glBegin(), glEnd(), glNormal3d(), glVertex3dv(), X, Y, and Z.
Referenced by TGLCamera::DrawDebugAids(), TGLViewer::DrawDebugInfo(), and TGLManipSet::Render().
void TGLBoundingBox::Dump | ( | ) | const |
TGLBoundingBox::ClassDef | ( | TGLBoundingBox | , | |
0 | ||||
) |
void TGLBoundingBox::UpdateCache | ( | ) | [private] |
normalised box axes in global frame - cached for speed
Definition at line 66 of file TGLBoundingBox.h.
TGLBoundingBox& TGLBoundingBox::operator= | ( | const TGLBoundingBox & | other | ) |
void TGLBoundingBox::Set | ( | const TGLVertex3 | vertex[8] | ) |
void TGLBoundingBox::Set | ( | const Double_t | vertex[8][3] | ) |
void TGLBoundingBox::Set | ( | const TGLBoundingBox & | other | ) |
void TGLBoundingBox::SetEmpty | ( | ) |
void TGLBoundingBox::SetAligned | ( | const TGLVertex3 & | lowVertex, | |
const TGLVertex3 & | highVertex | |||
) |
void TGLBoundingBox::MergeAligned | ( | const TGLBoundingBox & | other | ) |
void TGLBoundingBox::ExpandAligned | ( | const TGLVertex3 & | point | ) |
void TGLBoundingBox::Transform | ( | const TGLMatrix & | matrix | ) |
void TGLBoundingBox::Scale | ( | Double_t | factor | ) |
void TGLBoundingBox::Translate | ( | const TGLVector3 & | offset | ) |
const TGLVertex3& TGLBoundingBox::operator[] | ( | UInt_t | index | ) | const |
const TGLVertex3& TGLBoundingBox::Vertex | ( | UInt_t | index | ) | const |
Double_t TGLBoundingBox::XMin | ( | ) | const [inline] |
Double_t TGLBoundingBox::XMax | ( | ) | const [inline] |
Double_t TGLBoundingBox::YMin | ( | ) | const [inline] |
Double_t TGLBoundingBox::YMax | ( | ) | const [inline] |
Double_t TGLBoundingBox::ZMin | ( | ) | const [inline] |
Double_t TGLBoundingBox::ZMax | ( | ) | const [inline] |
TGLVertex3 TGLBoundingBox::MinAAVertex | ( | ) | const |
TGLVertex3 TGLBoundingBox::MaxAAVertex | ( | ) | const |
const TGLVertex3* TGLBoundingBox::Vertices | ( | ) | const |
Int_t TGLBoundingBox::NumVertices | ( | ) | const [inline] |
Definition at line 111 of file TGLBoundingBox.h.
TGLVertex3 TGLBoundingBox::Center | ( | ) | const |
TGLVector3 TGLBoundingBox::Extents | ( | ) | const |
const TGLVector3& TGLBoundingBox::Axis | ( | UInt_t | i, | |
Bool_t | normalised = kTRUE | |||
) | const |
Bool_t TGLBoundingBox::IsEmpty | ( | ) | const |
Double_t TGLBoundingBox::Volume | ( | ) | const [inline] |
Double_t TGLBoundingBox::Diagonal | ( | ) | const [inline] |
void TGLBoundingBox::PlaneSet | ( | TGLPlaneSet_t & | planeSet | ) | const |
TGLPlane TGLBoundingBox::GetNearPlane | ( | ) | const |
EOverlap TGLBoundingBox::Overlap | ( | const TGLBoundingBox & | box | ) | const |
void TGLBoundingBox::Dump | ( | ) | const |
TGLBoundingBox::ClassDef | ( | TGLBoundingBox | , | |
0 | ||||
) |
TGLVertex3 TGLBoundingBox::fVertex [private] |
Definition at line 58 of file TGLBoundingBox.h.
Referenced by Center(), Draw(), Dump(), GetNearPlane(), Max(), Min(), operator[](), Overlap(), PlaneSet(), Scale(), Set(), SetAligned(), SetEmpty(), Transform(), Translate(), UpdateCache(), Vertex(), and Vertices().
Double_t TGLBoundingBox::fVolume [private] |
the 8 bounding box vertices
Definition at line 59 of file TGLBoundingBox.h.
Referenced by UpdateCache(), and Volume().
Double_t TGLBoundingBox::fDiagonal [private] |
box volume - cached for speed
Definition at line 60 of file TGLBoundingBox.h.
Referenced by Diagonal(), and UpdateCache().
TGLVector3 TGLBoundingBox::fAxes [private] |
max box diagonal - cached for speed
Definition at line 61 of file TGLBoundingBox.h.
Referenced by Axis(), and UpdateCache().
TGLVector3 TGLBoundingBox::fAxesNorm [private] |
box axes in global frame - cached for speed
Definition at line 62 of file TGLBoundingBox.h.
Referenced by Axis(), Draw(), GetNearPlane(), PlaneSet(), and UpdateCache().