Class representing axis-aligned bounding box.
More...
#include <AxisBox.hpp>
Class representing axis-aligned bounding box.
- Author
- Jason Kraftcheck (kraft.nosp@m.che@.nosp@m.cae.w.nosp@m.isc..nosp@m.edu)
- Date
- August, 2006
Definition at line 30 of file AxisBox.hpp.
◆ AxisBox() [1/3]
moab::AxisBox::AxisBox |
( |
| ) |
|
|
inline |
◆ AxisBox() [2/3]
moab::AxisBox::AxisBox |
( |
const double * |
min, |
|
|
const double * |
max |
|
) |
| |
|
inline |
◆ AxisBox() [3/3]
moab::AxisBox::AxisBox |
( |
const double * |
point | ) |
|
|
inline |
◆ calculate() [1/2]
Calculate a box bounding the vertices/elements in the passed Range
Definition at line 50 of file AxisBox.cpp.
57 rval = interface->get_adjacencies( elements, 0,
false, vertices );
62 std::vector< double > coords( 3 * vertices.size() );
63 rval = interface->get_coords( vertices, &coords[0] );
67 std::vector< double >::const_iterator i = coords.begin();
68 for( ; i != coords.end(); i += 3 )
References AxisBox(), entities, ErrorCode, moab::Interface::get_adjacencies(), moab::Interface::get_coords(), MB_SUCCESS, MBENTITYSET, MBVERTEX, moab::Range::merge(), and moab::Range::size().
◆ calculate() [2/2]
◆ center()
void moab::AxisBox::center |
( |
double * |
center_out | ) |
const |
|
inline |
◆ closest_position_within_box()
void moab::AxisBox::closest_position_within_box |
( |
const double * |
input_position, |
|
|
double * |
output_position |
|
) |
| const |
|
inline |
Find closest position on/within box to input position.
Find the closest position in the solid box to the input position. If the input position is on or within the box, then the output position will be the same as the input position. If the input position is outside the box, the outside position will be the closest point on the box boundary to the input position.
Definition at line 220 of file AxisBox.hpp.
222 for(
int i = 0; i < 3; ++i )
224 if( input_position[i] <
minVect[i] )
225 output_position[i] =
minVect[i];
226 else if( input_position[i] >
maxVect[i] )
227 output_position[i] =
maxVect[i];
229 output_position[i] = input_position[i];
References maxVect, and minVect.
◆ diagonal()
void moab::AxisBox::diagonal |
( |
double * |
diagonal_out | ) |
const |
|
inline |
◆ get_tag()
ErrorCode moab::AxisBox::get_tag |
( |
Tag & |
tag_handle_out, |
|
|
Interface * |
interface, |
|
|
const char * |
tag_name = 0 |
|
) |
| |
|
static |
◆ intersects() [1/2]
bool moab::AxisBox::intersects |
( |
const AxisBox & |
other, |
|
|
double |
tolerance |
|
) |
| const |
|
inline |
Check if two boxes intersect.
Check if two boxes are within the specified tolerance of each other. If tolerance is less than zero, then boxes must overlap by at least the magnitude of the tolerance to be considered intersecting.
Definition at line 201 of file AxisBox.hpp.
References maxVect, minVect, and moab::tolerance.
◆ intersects() [2/2]
bool moab::AxisBox::intersects |
( |
const double * |
point, |
|
|
double |
tolerance |
|
) |
| const |
|
inline |
◆ maximum() [1/2]
double* moab::AxisBox::maximum |
( |
| ) |
|
|
inline |
◆ maximum() [2/2]
const double* moab::AxisBox::maximum |
( |
| ) |
const |
|
inline |
◆ minimum() [1/2]
double* moab::AxisBox::minimum |
( |
| ) |
|
|
inline |
◆ minimum() [2/2]
const double* moab::AxisBox::minimum |
( |
| ) |
const |
|
inline |
◆ operator&=()
◆ operator|=() [1/2]
◆ operator|=() [2/2]
AxisBox & moab::AxisBox::operator|= |
( |
const double * |
point | ) |
|
|
inline |
◆ valid()
bool moab::AxisBox::valid |
( |
| ) |
const |
|
inline |
Check that box is valid.
Check that box is defined (contains at least a single point.)
Definition at line 215 of file AxisBox.hpp.
References maxVect, and minVect.
◆ maxVect
double moab::AxisBox::maxVect[3] |
|
private |
◆ minVect
double moab::AxisBox::minVect[3] |
|
private |
The documentation for this class was generated from the following files: