Fast Simple Class for dealing with 3D bounds.
More...
#include <vtkBoundingBox.h>
|
| vtkBoundingBox (const vtkBoundingBox &bbox) |
|
vtkBoundingBox & | operator= (const vtkBoundingBox &bbox) |
|
void | AddBox (const vtkBoundingBox &bbox) |
|
void | AddBounds (const double bounds[]) |
|
int | IntersectBox (const vtkBoundingBox &bbox) |
|
int | Intersects (const vtkBoundingBox &bbox) const |
|
bool | IntersectPlane (double origin[3], double normal[3]) |
|
int | Contains (const vtkBoundingBox &bbox) const |
|
double | GetBound (int i) const |
|
void | GetCenter (double center[3]) const |
|
void | GetLengths (double lengths[3]) const |
|
double | GetLength (int i) const |
|
double | GetMaxLength () const |
|
double | GetDiagonalLength () const |
|
void | Inflate (double delta) |
|
void | Reset () |
|
|
| vtkBoundingBox () |
|
| vtkBoundingBox (double bounds[6]) |
|
| vtkBoundingBox (double xMin, double xMax, double yMin, double yMax, double zMin, double zMax) |
|
|
int | operator== (const vtkBoundingBox &bbox) const |
|
int | operator!= (const vtkBoundingBox &bbox) const |
|
|
void | SetBounds (const double bounds[6]) |
|
void | SetBounds (double xMin, double xMax, double yMin, double yMax, double zMin, double zMax) |
|
|
void | SetMinPoint (double x, double y, double z) |
|
void | SetMinPoint (double p[3]) |
|
|
void | SetMaxPoint (double x, double y, double z) |
|
void | SetMaxPoint (double p[3]) |
|
|
void | AddPoint (double p[3]) |
|
void | AddPoint (double px, double py, double pz) |
|
|
void | GetBounds (double bounds[6]) const |
|
void | GetBounds (double &xMin, double &xMax, double &yMin, double &yMax, double &zMin, double &zMax) const |
|
|
const double * | GetMinPoint () const |
|
void | GetMinPoint (double &x, double &y, double &z) const |
|
|
const double * | GetMaxPoint () const |
|
void | GetMaxPoint (double &x, double &y, double &z) const |
|
|
int | ContainsPoint (double p[3]) const |
|
int | ContainsPoint (double px, double py, double pz) const |
|
|
void | Scale (double s[3]) |
|
void | Scale (double sx, double sy, double sz) |
|
Fast Simple Class for dealing with 3D bounds.
vtkBoundingBox maintains a 3D axis aligned bounding box. It is very lite weight and many of the member functions are in-lined so its very fast It is not derived from vtkObject so it can be allocated on the stack
- See Also
- vtkBox
- Tests:
- vtkBoundingBox (Tests)
Definition at line 34 of file vtkBoundingBox.h.
vtkBoundingBox::vtkBoundingBox |
( |
| ) |
|
|
inline |
Construct a bounding box with the min point set to VTK_DOUBLE_MAX and the max point set to VTK_DOUBLE_MIN
Definition at line 271 of file vtkBoundingBox.h.
vtkBoundingBox::vtkBoundingBox |
( |
double |
bounds[6] | ) |
|
|
inline |
Construct a bounding box with the min point set to VTK_DOUBLE_MAX and the max point set to VTK_DOUBLE_MIN
Definition at line 276 of file vtkBoundingBox.h.
vtkBoundingBox::vtkBoundingBox |
( |
double |
xMin, |
|
|
double |
xMax, |
|
|
double |
yMin, |
|
|
double |
yMax, |
|
|
double |
zMin, |
|
|
double |
zMax |
|
) |
| |
|
inline |
Construct a bounding box with the min point set to VTK_DOUBLE_MAX and the max point set to VTK_DOUBLE_MIN
Definition at line 282 of file vtkBoundingBox.h.
void vtkBoundingBox::SetBounds |
( |
const double |
bounds[6] | ) |
|
|
inline |
Set the bounds explicitly of the box (vtk Style) Returns 1 if the box was changed else 0
Definition at line 259 of file vtkBoundingBox.h.
void vtkBoundingBox::SetBounds |
( |
double |
xMin, |
|
|
double |
xMax, |
|
|
double |
yMin, |
|
|
double |
yMax, |
|
|
double |
zMin, |
|
|
double |
zMax |
|
) |
| |
Set the bounds explicitly of the box (vtk Style) Returns 1 if the box was changed else 0
void vtkBoundingBox::SetMinPoint |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
| |
Set the minimum point of the bounding box - if the min point is greater than the max point then the max point will also be changed
void vtkBoundingBox::SetMinPoint |
( |
double |
p[3] | ) |
|
|
inline |
Set the minimum point of the bounding box - if the min point is greater than the max point then the max point will also be changed
Definition at line 328 of file vtkBoundingBox.h.
void vtkBoundingBox::SetMaxPoint |
( |
double |
x, |
|
|
double |
y, |
|
|
double |
z |
|
) |
| |
Set the maximum point of the bounding box - if the max point is less than the min point then the min point will also be changed
void vtkBoundingBox::SetMaxPoint |
( |
double |
p[3] | ) |
|
|
inline |
Set the maximum point of the bounding box - if the max point is less than the min point then the min point will also be changed
Definition at line 333 of file vtkBoundingBox.h.
void vtkBoundingBox::AddPoint |
( |
double |
p[3] | ) |
|
Change bounding box so it includes the point p Note that the bounding box may have 0 volume if its bounds were just initialized.
void vtkBoundingBox::AddPoint |
( |
double |
px, |
|
|
double |
py, |
|
|
double |
pz |
|
) |
| |
Change bounding box so it includes the point p Note that the bounding box may have 0 volume if its bounds were just initialized.
Change the bouding box to be the union of itself and bbox
void vtkBoundingBox::AddBounds |
( |
const double |
bounds[] | ) |
|
Change the bounding box so it includes bounds (defined by vtk standard)
Returns 1 if the boxes intersect else returns 0
bool vtkBoundingBox::IntersectPlane |
( |
double |
origin[3], |
|
|
double |
normal[3] |
|
) |
| |
Returns 1 if the min and max points of bbox are contained within the bounds of this box, else returns 0.
void vtkBoundingBox::GetBounds |
( |
double |
bounds[6] | ) |
const |
|
inline |
Get the bounds of the box (defined by vtk style)
Definition at line 265 of file vtkBoundingBox.h.
void vtkBoundingBox::GetBounds |
( |
double & |
xMin, |
|
|
double & |
xMax, |
|
|
double & |
yMin, |
|
|
double & |
yMax, |
|
|
double & |
zMin, |
|
|
double & |
zMax |
|
) |
| const |
|
inline |
Get the bounds of the box (defined by vtk style)
Definition at line 196 of file vtkBoundingBox.h.
double vtkBoundingBox::GetBound |
( |
int |
i | ) |
const |
|
inline |
Return the ith bounds of the box (defined by vtk style)
Definition at line 208 of file vtkBoundingBox.h.
const double * vtkBoundingBox::GetMinPoint |
( |
| ) |
const |
|
inline |
void vtkBoundingBox::GetMinPoint |
( |
double & |
x, |
|
|
double & |
y, |
|
|
double & |
z |
|
) |
| const |
|
inline |
const double * vtkBoundingBox::GetMaxPoint |
( |
| ) |
const |
|
inline |
void vtkBoundingBox::GetMaxPoint |
( |
double & |
x, |
|
|
double & |
y, |
|
|
double & |
z |
|
) |
| const |
|
inline |
int vtkBoundingBox::ContainsPoint |
( |
double |
p[3] | ) |
const |
|
inline |
Returns 1 if the point is contained in the box else 0;
Definition at line 370 of file vtkBoundingBox.h.
int vtkBoundingBox::ContainsPoint |
( |
double |
px, |
|
|
double |
py, |
|
|
double |
pz |
|
) |
| const |
|
inline |
Returns 1 if the point is contained in the box else 0;
Definition at line 352 of file vtkBoundingBox.h.
void vtkBoundingBox::GetCenter |
( |
double |
center[3] | ) |
const |
|
inline |
void vtkBoundingBox::GetLengths |
( |
double |
lengths[3] | ) |
const |
|
inline |
double vtkBoundingBox::GetLength |
( |
int |
i | ) |
const |
|
inline |
double vtkBoundingBox::GetMaxLength |
( |
| ) |
const |
Return the Max Length of the box
double vtkBoundingBox::GetDiagonalLength |
( |
| ) |
const |
Return the length of the diagonal.
- Precondition
- not_empty: this->IsValid()
void vtkBoundingBox::Inflate |
( |
double |
delta | ) |
|
Expand the Box by delta on each side, the box will grow by 2*delta in x,y and z
int vtkBoundingBox::IsValid |
( |
| ) |
const |
|
inline |
Returns 1 if the bounds have been set and 0 if the box is in its initialized state which is an inverted state
Definition at line 226 of file vtkBoundingBox.h.
int vtkBoundingBox::IsValid |
( |
const double |
bounds[6] | ) |
|
|
inlinestatic |
Returns 1 if the bounds have been set and 0 if the box is in its initialized state which is an inverted state
Definition at line 233 of file vtkBoundingBox.h.
void vtkBoundingBox::Reset |
( |
| ) |
|
|
inline |
void vtkBoundingBox::Scale |
( |
double |
s[3] | ) |
|
Scale each dimension of the box by some given factor. If the box is not valid, it stays unchanged. If the scalar factor is negative, bounds are flipped: for example, if (xMin,xMax)=(-2,4) and sx=-3, (xMin,xMax) becomes (-12,6).
void vtkBoundingBox::Scale |
( |
double |
sx, |
|
|
double |
sy, |
|
|
double |
sz |
|
) |
| |
Scale each dimension of the box by some given factor. If the box is not valid, it stays unchanged. If the scalar factor is negative, bounds are flipped: for example, if (xMin,xMax)=(-2,4) and sx=-3, (xMin,xMax) becomes (-12,6).
double vtkBoundingBox::MinPnt[3] |
|
protected |
double vtkBoundingBox::MaxPnt[3] |
|
protected |
The documentation for this class was generated from the following file: