Class representing the bounding box of a number of points with box axes parallel to principal axes of inertia of points. More...
#include <DirectedBoundingBox.hxx>
Public Member Functions | |
| DirectedBoundingBox () | |
| Creates empty box intended to further initalization via setData() | |
| DirectedBoundingBox (const double *pts, const unsigned numPts, const unsigned dim) | |
| Creates bounding box of a mesh. | |
| DirectedBoundingBox (const double **pts, const unsigned numPts, const unsigned dim) | |
| Creates bounding box of an element. | |
| void | enlarge (const double tol) |
| Enlarge box size by given value. | |
| bool | isDisjointWith (const DirectedBoundingBox &box) const |
| Test if this box intersects with the other. | |
| bool | isDisjointWith (const double *box) const |
| Test if this box intersects with an non-directed box. | |
| bool | isOut (const double *point) const |
| Return true if given point is out of this box. | |
| std::vector< double > | getData () const |
| Return array of internal data. | |
| void | setData (const double *data) |
| Initializes self with data retrieved via getData() | |
Static Public Member Functions | |
| static int | dataSize (int dim) |
| Return size of internal data returned by getData() depending on space dim. | |
Private Member Functions | |
| void | addPointToBox (const double *coord) |
| Update box extremities. | |
| void | toLocalCS (const double *p, double *pLoc) const |
| Compute eigenvectors of inertia tensor. | |
| void | fromLocalCS (const double *p, double *pGlob) const |
| Convert point coordinates from local coordinate system of the box to global CS. | |
| bool | isLocalOut (const double *pLoc) const |
| Test point in local CS against box extremities. | |
| void | getCorners (std::vector< double > &corners, const double *minmax) const |
| Return coordinates of corners of bounding box. | |
Private Attributes | |
| unsigned | _dim |
| std::vector< double > | _axes |
| principal axes of inertia in full interlace | |
| std::vector< double > | _minmax |
| pairs of min an max coordinates along the axes | |
Class representing the bounding box of a number of points with box axes parallel to principal axes of inertia of points.
| INTERP_KERNEL.DirectedBoundingBox::DirectedBoundingBox | ( | ) |
Creates empty box intended to further initalization via setData()
| INTERP_KERNEL.DirectedBoundingBox::DirectedBoundingBox | ( | const double * | pts, |
| const unsigned | numPts, | ||
| const unsigned | dim | ||
| ) |
Creates bounding box of a mesh.
| pts | - coordinates of points in full interlace |
| numPts | - number of points in the mesh |
| dim | - space dimension |
References __DMP, __MYID, INTERP_KERNEL.DirectedBoundingBox._axes, INTERP_KERNEL.DirectedBoundingBox._dim, INTERP_KERNEL.DirectedBoundingBox._minmax, and INTERP_KERNEL.DirectedBoundingBox.addPointToBox().
| INTERP_KERNEL.DirectedBoundingBox::DirectedBoundingBox | ( | const double ** | pts, |
| const unsigned | numPts, | ||
| const unsigned | dim | ||
| ) |
Creates bounding box of an element.
| pts | - coordinates of points of element |
| numPts | - number of points in the element |
| dim | - space dimension |
References __DMP, __MYID, INTERP_KERNEL.DirectedBoundingBox._axes, INTERP_KERNEL.DirectedBoundingBox._dim, INTERP_KERNEL.DirectedBoundingBox._minmax, and INTERP_KERNEL.DirectedBoundingBox.addPointToBox().
| void INTERP_KERNEL.DirectedBoundingBox::enlarge | ( | const double | tol | ) |
Enlarge box size by given value.
References __MAX, __MIN, and INTERP_KERNEL.DirectedBoundingBox._dim.
| bool INTERP_KERNEL.DirectedBoundingBox::isDisjointWith | ( | const DirectedBoundingBox & | box | ) | const |
Test if this box intersects with the other.
| bool | - true if there is no intersection |
< empty box with CS == axisBox->_axes
References INTERP_KERNEL.DirectedBoundingBox._axes, INTERP_KERNEL.DirectedBoundingBox._dim, INTERP_KERNEL.DirectedBoundingBox._minmax, INTERP_KERNEL.DirectedBoundingBox.addPointToBox(), INTERP_KERNEL.DirectedBoundingBox.fromLocalCS(), and INTERP_KERNEL.DirectedBoundingBox.getCorners().
| bool INTERP_KERNEL.DirectedBoundingBox::isDisjointWith | ( | const double * | box | ) | const |
Test if this box intersects with an non-directed box.
| bool | - true if there is no intersection |
< empty box with CS == this->_axes
< initailized _minmax
References INTERP_KERNEL.DirectedBoundingBox._axes, INTERP_KERNEL.DirectedBoundingBox._dim, INTERP_KERNEL.DirectedBoundingBox._minmax, INTERP_KERNEL.DirectedBoundingBox.addPointToBox(), INTERP_KERNEL.DirectedBoundingBox.fromLocalCS(), and INTERP_KERNEL.DirectedBoundingBox.getCorners().
| bool INTERP_KERNEL.DirectedBoundingBox::isOut | ( | const double * | point | ) | const |
Return true if given point is out of this box.
References __DMP, __MYID, INTERP_KERNEL.DirectedBoundingBox._dim, INTERP_KERNEL.DirectedBoundingBox.isLocalOut(), and INTERP_KERNEL.DirectedBoundingBox.toLocalCS().
| vector< double > INTERP_KERNEL.DirectedBoundingBox::getData | ( | ) | const |
Return array of internal data.
References INTERP_KERNEL.DirectedBoundingBox._axes, INTERP_KERNEL.DirectedBoundingBox._dim, INTERP_KERNEL.DirectedBoundingBox._minmax, and INTERP_KERNEL.DirectedBoundingBox.dataSize().
| void INTERP_KERNEL.DirectedBoundingBox::setData | ( | const double * | data | ) |
Initializes self with data retrieved via getData()
References INTERP_KERNEL.DirectedBoundingBox._axes, INTERP_KERNEL.DirectedBoundingBox._dim, and INTERP_KERNEL.DirectedBoundingBox._minmax.
Return size of internal data returned by getData() depending on space dim.
| void INTERP_KERNEL.DirectedBoundingBox::addPointToBox | ( | const double * | coord | ) | [private] |
Update box extremities.
References INTERP_KERNEL.DirectedBoundingBox._axes, INTERP_KERNEL.DirectedBoundingBox._dim, and INTERP_KERNEL.DirectedBoundingBox._minmax.
| void INTERP_KERNEL.DirectedBoundingBox::toLocalCS | ( | const double * | p, |
| double * | pLoc | ||
| ) | const [private] |
Compute eigenvectors of inertia tensor.
Compute eigenvectors of inertia tensor
Convert point coordinates into local coordinate system of the box
References __AXIS, and INTERP_KERNEL.DirectedBoundingBox._dim.
| void INTERP_KERNEL.DirectedBoundingBox::fromLocalCS | ( | const double * | p, |
| double * | pGlob | ||
| ) | const [private] |
Convert point coordinates from local coordinate system of the box to global CS.
References __AXIS, and INTERP_KERNEL.DirectedBoundingBox._dim.
| bool INTERP_KERNEL.DirectedBoundingBox::isLocalOut | ( | const double * | pLoc | ) | const [private] |
Test point in local CS against box extremities.
References INTERP_KERNEL.DirectedBoundingBox._dim, and INTERP_KERNEL.DirectedBoundingBox._minmax.
| void INTERP_KERNEL.DirectedBoundingBox::getCorners | ( | std::vector< double > & | corners, |
| const double * | minmax | ||
| ) | const [private] |
Return coordinates of corners of bounding box.
References INTERP_KERNEL.DirectedBoundingBox._dim.
unsigned INTERP_KERNEL.DirectedBoundingBox._dim [private] |
std::vector<double> INTERP_KERNEL.DirectedBoundingBox._axes [private] |
principal axes of inertia in full interlace
std::vector<double> INTERP_KERNEL.DirectedBoundingBox._minmax [private] |
pairs of min an max coordinates along the axes