The SkdBox class defines a box. More...
Public Member Functions | |
SkdBox () | |
SkdBox (const std::array< double, 3 > &boxMin, const std::array< double, 3 > &boxMax) | |
bool | boxContainsPoint (const std::array< double, 3 > &point, double offset) const |
bool | boxIntersectsSphere (const std::array< double, 3 > ¢er, double radius) const |
double | evalPointMaxDistance (const std::array< double, 3 > &point) const |
double | evalPointMaxDistance (const std::array< double, 3 > &point, double emptyDistance) const |
double | evalPointMaxSquareDistance (const std::array< double, 3 > &point) const |
double | evalPointMaxSquareDistance (const std::array< double, 3 > &point, double emptySquareDistance) const |
double | evalPointMinDistance (const std::array< double, 3 > &point) const |
double | evalPointMinDistance (const std::array< double, 3 > &point, double emptyDistance) const |
double | evalPointMinSquareDistance (const std::array< double, 3 > &point) const |
double | evalPointMinSquareDistance (const std::array< double, 3 > &point, double emptySquareDistance) const |
const std::array< double, 3 > & | getBoxMax () const |
const std::array< double, 3 > & | getBoxMin () const |
bool | isEmpty () const |
Protected Attributes | |
std::array< double, 3 > | m_boxMax |
std::array< double, 3 > | m_boxMin |
The SkdBox class defines a box.
Definition at line 66 of file patch_skd_tree.hpp.
bitpit::SkdBox::SkdBox | ( | ) |
Default constructor.
Definition at line 171 of file patch_skd_tree.cpp.
bitpit::SkdBox::SkdBox | ( | const std::array< double, 3 > & | boxMin, |
const std::array< double, 3 > & | boxMax ) |
Constructor
boxMin | is the minimum coordinate of the box |
boxMax | is the maximum coordinate of the box |
Definition at line 183 of file patch_skd_tree.cpp.
bool bitpit::SkdBox::boxContainsPoint | ( | const std::array< double, 3 > & | point, |
double | offset ) const |
Checks if the specified point is inside the box .
The box size will be expanded by the specified offset value.
point | is the point |
offset | is the offset that will be used to expand the box |
Definition at line 383 of file patch_skd_tree.cpp.
bool bitpit::SkdBox::boxIntersectsSphere | ( | const std::array< double, 3 > & | center, |
double | radius ) const |
Checks if the box intersects the sphere with given center and radius.
[in] | center | is the center of the sphere |
[in] | radius | is the radius of the sphere |
Definition at line 410 of file patch_skd_tree.cpp.
double bitpit::SkdBox::evalPointMaxDistance | ( | const std::array< double, 3 > & | point | ) | const |
Evaluates the maximum distance between the specified point and the box.
If the box is empty, the result is undefined.
point | is the point |
Definition at line 328 of file patch_skd_tree.cpp.
double bitpit::SkdBox::evalPointMaxDistance | ( | const std::array< double, 3 > & | point, |
double | emptyDistance ) const |
Evaluates the maximum distance between the specified point and the box.
If the box is not valid, the specified default distance is returned.
point | is the point |
emptyDistance | is the distance that will be return when the box is empty |
Definition at line 311 of file patch_skd_tree.cpp.
double bitpit::SkdBox::evalPointMaxSquareDistance | ( | const std::array< double, 3 > & | point | ) | const |
Evaluates the square of the maximum distance between the specified point and the box.
If the box is empty, the result is undefined.
point | is the point |
Definition at line 364 of file patch_skd_tree.cpp.
double bitpit::SkdBox::evalPointMaxSquareDistance | ( | const std::array< double, 3 > & | point, |
double | emptySquareDistance ) const |
Evaluates the square of the maximum distance between the specified point and the box.
If the box is not valid, the specified default square distance is returned.
point | is the point |
emptySquareDistance | is the square distance that will be return when the box is empty |
Definition at line 345 of file patch_skd_tree.cpp.
double bitpit::SkdBox::evalPointMinDistance | ( | const std::array< double, 3 > & | point | ) | const |
Evaluates the minimum distance between the specified point and the box.
If the box is empty, the result is undefined.
point | is the point |
Definition at line 255 of file patch_skd_tree.cpp.
double bitpit::SkdBox::evalPointMinDistance | ( | const std::array< double, 3 > & | point, |
double | emptyDistance ) const |
Evaluates the minimum distance between the specified point and the box.
If the box is not valid, the specified defualt distance is returned.
point | is the point |
emptyDistance | is the distance that will be return when the box is empty |
Definition at line 238 of file patch_skd_tree.cpp.
double bitpit::SkdBox::evalPointMinSquareDistance | ( | const std::array< double, 3 > & | point | ) | const |
Evaluates the square of the minimum distance between the specified point and the box.
If the box is empty, the result is undefined.
point | is the point |
Definition at line 291 of file patch_skd_tree.cpp.
double bitpit::SkdBox::evalPointMinSquareDistance | ( | const std::array< double, 3 > & | point, |
double | emptySquareDistance ) const |
Evaluates the square of the minimum distance between the specified point and the box.
If the box is not valid, the specified default square distance is returned.
point | is the point |
emptySquareDistance | is the distance that will be return when the box is empty |
Definition at line 272 of file patch_skd_tree.cpp.
const std::array< double, 3 > & bitpit::SkdBox::getBoxMax | ( | ) | const |
Get the maximum coordinate of the box.
Definition at line 223 of file patch_skd_tree.cpp.
const std::array< double, 3 > & bitpit::SkdBox::getBoxMin | ( | ) | const |
Get the minimum coordinate of the box.
Definition at line 213 of file patch_skd_tree.cpp.
bool bitpit::SkdBox::isEmpty | ( | ) | const |
Check if the box is empty.
An empty box has a minimum coordinates that is greater than the maximum coordinate.
Definition at line 197 of file patch_skd_tree.cpp.
|
protected |
Definition at line 92 of file patch_skd_tree.hpp.
|
protected |
Definition at line 91 of file patch_skd_tree.hpp.