Class representing the bounding box of a number of points. More...
#include <BoundingBox.hxx>
Public Types | |
| enum | BoxCoord { XMIN = 0, YMIN = 1, ZMIN = 2, XMAX = 3, YMAX = 4, ZMAX = 5 } |
Enumeration representing the six coordinates that define the bounding box. More... | |
Public Member Functions | |
| BoundingBox (const double **pts, const unsigned numPts) | |
| Constructor creating box from an array of the points corresponding to the vertices of the element. | |
| BoundingBox (const BoundingBox &box1, const BoundingBox &box2) | |
| Constructor creating box from union of two boxes, resulting in a box that encloses both of them. | |
| ~BoundingBox () | |
| Destructor. | |
| bool | isDisjointWith (const BoundingBox &box) const |
| Determines if the intersection with a given box is empty. | |
| void | setCoordinate (const BoxCoord coord, double value) |
| Sets a coordinate of the box to a given value. | |
| double | getCoordinate (const BoxCoord coord) const |
| Gets a coordinate of the box. | |
| void | updateWithPoint (const double *pt) |
| Updates the bounding box to include a given point. | |
| void | dumpCoords () const |
| Prints the coordinates of the box to std.cout. | |
Private Member Functions | |
| bool | isValid () const |
| Checks if the box is valid, which it is if its minimum coordinates are smaller than its maximum coordinates in all directions. | |
| BoundingBox (const BoundingBox &box) | |
| disallow copying | |
| BoundingBox & | operator= (const BoundingBox &box) |
| disallow assignment | |
Private Attributes | |
| double * | _coords |
| Vector containing the coordinates of the box interlaced in the order XMIN, YMIN, ZMIN, XMAX, YMAX, ZMAX. | |
Class representing the bounding box of a number of points.
| dn46 SALOME series6x631 MED Mandriva2010 MED_SRC src INTERP_KERNEL BoundingBox cxx INTERP_KERNEL.BoundingBox::BoundingBox | ( | const double ** | pts, |
| const unsigned | numPts | ||
| ) |
Constructor creating box from an array of the points corresponding to the vertices of the element.
Each point is represented by an array of three doubles.
| pts | array of points |
| numPts | number of vertices |
| INTERP_KERNEL.BoundingBox::BoundingBox | ( | const BoundingBox & | box1, |
| const BoundingBox & | box2 | ||
| ) |
Constructor creating box from union of two boxes, resulting in a box that encloses both of them.
| box1 | the first box |
| box2 | the second box |
References INTERP_KERNEL.BoundingBox._coords.
| INTERP_KERNEL.BoundingBox::~BoundingBox | ( | ) |
Destructor.
References INTERP_KERNEL.BoundingBox._coords.
| INTERP_KERNEL.BoundingBox.BoundingBox | ( | const BoundingBox & | box | ) | [private] |
disallow copying
| bool INTERP_KERNEL.BoundingBox::isDisjointWith | ( | const BoundingBox & | box | ) | const |
Determines if the intersection with a given box is empty.
| box | BoundingBox with which intersection is tested |
References INTERP_KERNEL.BoundingBox._coords, INTERP_KERNEL.BoundingBox.getCoordinate(), INTERP_KERNEL.BoundingBox.XMIN, and INTERP_KERNEL.BoundingBox.ZMIN.
Sets a coordinate of the box to a given value.
| coord | coordinate to set |
| value | new value for coordinate |
References INTERP_KERNEL.BoundingBox._coords, and batchmode_medcorba_test.value.
Gets a coordinate of the box.
| coord | coordinate to get |
References INTERP_KERNEL.BoundingBox._coords.
| void INTERP_KERNEL.BoundingBox::updateWithPoint | ( | const double * | pt | ) |
Updates the bounding box to include a given point.
| pt | point to be included |
References INTERP_KERNEL.BoundingBox._coords, INTERP_KERNEL.BoundingBox.XMIN, and INTERP_KERNEL.BoundingBox.ZMIN.
| void INTERP_KERNEL.BoundingBox::dumpCoords | ( | ) | const |
Prints the coordinates of the box to std.cout.
References INTERP_KERNEL.BoundingBox._coords, INTERP_KERNEL.BoundingBox.XMAX, INTERP_KERNEL.BoundingBox.XMIN, INTERP_KERNEL.BoundingBox.YMAX, INTERP_KERNEL.BoundingBox.YMIN, INTERP_KERNEL.BoundingBox.ZMAX, and INTERP_KERNEL.BoundingBox.ZMIN.
| bool INTERP_KERNEL.BoundingBox::isValid | ( | ) | const [private] |
Checks if the box is valid, which it is if its minimum coordinates are smaller than its maximum coordinates in all directions.
References INTERP_KERNEL.BoundingBox._coords, INTERP_KERNEL.BoundingBox.XMIN, and INTERP_KERNEL.BoundingBox.ZMIN.
| BoundingBox& INTERP_KERNEL.BoundingBox.operator= | ( | const BoundingBox & | box | ) | [private] |
disallow assignment
double* INTERP_KERNEL.BoundingBox._coords [private] |
Vector containing the coordinates of the box interlaced in the order XMIN, YMIN, ZMIN, XMAX, YMAX, ZMAX.