CustusX
2023.01.05-dev+develop.0da12
An IGT application
|
Representation of a floating-point bounding box in 3D. The data are stored as {xmin,xmax,ymin,ymax,zmin,zmax}, in order to simplify communication with vtk. More...
#include <cxBoundingBox3D.h>
Public Member Functions | |
DoubleBoundingBox3D () | |
DoubleBoundingBox3D (double x0, double x1, double y0, double y1, double z0=0.0, double z1=0.0) | |
DoubleBoundingBox3D (const Vector3D &a, const Vector3D &b) | |
DoubleBoundingBox3D (const double *data) | |
DoubleBoundingBox3D (const IntBoundingBox3D &bb) | |
DoubleBoundingBox3D (const int *data) | |
Vector3D | bottomLeft () const |
Vector3D | topRight () const |
Vector3D | center () const |
Vector3D | range () const |
Vector3D | corner (int x, int y, int z) const |
bool | contains (const Vector3D &p) const |
DoubleBoundingBox3D | unionWith (const DoubleBoundingBox3D &other) const |
Static Public Member Functions | |
static DoubleBoundingBox3D | fromViewport (const double *data) |
static DoubleBoundingBox3D | fromCloud (std::vector< Vector3D > cloud) |
static DoubleBoundingBox3D | fromString (const QString &text) |
construct a bb from a string containing 6 whitespace-separated numbers More... | |
static DoubleBoundingBox3D | zero () |
Representation of a floating-point bounding box in 3D. The data are stored as {xmin,xmax,ymin,ymax,zmin,zmax}, in order to simplify communication with vtk.
Definition at line 63 of file cxBoundingBox3D.h.
cx::DoubleBoundingBox3D::DoubleBoundingBox3D | ( | ) |
Definition at line 133 of file cxBoundingBox3D.cpp.
|
explicit |
Definition at line 136 of file cxBoundingBox3D.cpp.
Create a bounding box describing the volume spanned by the two points a and b.
Definition at line 147 of file cxBoundingBox3D.cpp.
|
explicit |
Definition at line 163 of file cxBoundingBox3D.cpp.
|
explicit |
Definition at line 171 of file cxBoundingBox3D.cpp.
|
explicit |
Definition at line 167 of file cxBoundingBox3D.cpp.
Vector3D cx::DoubleBoundingBox3D::bottomLeft | ( | ) | const |
Definition at line 188 of file cxBoundingBox3D.cpp.
Vector3D cx::DoubleBoundingBox3D::center | ( | ) | const |
Definition at line 196 of file cxBoundingBox3D.cpp.
bool cx::DoubleBoundingBox3D::contains | ( | const Vector3D & | p | ) | const |
return true if p is inside or on the edge of the bounding box
Definition at line 220 of file cxBoundingBox3D.cpp.
Vector3D cx::DoubleBoundingBox3D::corner | ( | int | x, |
int | y, | ||
int | z | ||
) | const |
Return the coordinate value of a given corner. Insert 0 or 1 for each of the 3 axis in order to get start or stop corner along that axis.
Definition at line 208 of file cxBoundingBox3D.cpp.
|
static |
Definition at line 239 of file cxBoundingBox3D.cpp.
|
static |
construct a bb from a string containing 6 whitespace-separated numbers
Definition at line 258 of file cxBoundingBox3D.cpp.
|
static |
Create a bounding box based the following input: (xmin,ymin,xmax,ymax)
Definition at line 182 of file cxBoundingBox3D.cpp.
Vector3D cx::DoubleBoundingBox3D::range | ( | ) | const |
Definition at line 200 of file cxBoundingBox3D.cpp.
Vector3D cx::DoubleBoundingBox3D::topRight | ( | ) | const |
Definition at line 192 of file cxBoundingBox3D.cpp.
DoubleBoundingBox3D cx::DoubleBoundingBox3D::unionWith | ( | const DoubleBoundingBox3D & | other | ) | const |
Definition at line 266 of file cxBoundingBox3D.cpp.
|
inlinestatic |
Definition at line 75 of file cxBoundingBox3D.h.