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 |
Detailed Description
The SkdBox class defines a box.
Definition at line 66 of file patch_skd_tree.hpp.
Constructor & Destructor Documentation
◆ SkdBox() [1/2]
bitpit::SkdBox::SkdBox | ( | ) |
Default constructor.
Definition at line 171 of file patch_skd_tree.cpp.
◆ SkdBox() [2/2]
bitpit::SkdBox::SkdBox | ( | const std::array< double, 3 > & | boxMin, |
const std::array< double, 3 > & | boxMax ) |
Constructor
- Parameters
-
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.
Member Function Documentation
◆ boxContainsPoint()
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.
- Parameters
-
point is the point offset is the offset that will be used to expand the box
- Returns
- Returns true if the point is inside the inflated box, false otherwise.
Definition at line 383 of file patch_skd_tree.cpp.
◆ boxIntersectsSphere()
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.
- Parameters
-
[in] center is the center of the sphere [in] radius is the radius of the sphere
- Returns
- Returns true if the box intersects the sphere with given center and radius, false otherwise.
Definition at line 410 of file patch_skd_tree.cpp.
◆ evalPointMaxDistance() [1/2]
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.
- Parameters
-
point is the point
- Returns
- The maximum distance between the specified point and the box.
Definition at line 328 of file patch_skd_tree.cpp.
◆ evalPointMaxDistance() [2/2]
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.
- Parameters
-
point is the point emptyDistance is the distance that will be return when the box is empty
- Returns
- The maximum distance between the specified point and the box.
Definition at line 311 of file patch_skd_tree.cpp.
◆ evalPointMaxSquareDistance() [1/2]
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.
- Parameters
-
point is the point
- Returns
- The square of the maximum distance between the specified point and the box.
Definition at line 364 of file patch_skd_tree.cpp.
◆ evalPointMaxSquareDistance() [2/2]
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.
- Parameters
-
point is the point emptySquareDistance is the square distance that will be return when the box is empty
- Returns
- The square of the maximum distance between the specified point and the box.
Definition at line 345 of file patch_skd_tree.cpp.
◆ evalPointMinDistance() [1/2]
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.
- Parameters
-
point is the point
- Returns
- The minimum distance between the specified point and the box.
Definition at line 255 of file patch_skd_tree.cpp.
◆ evalPointMinDistance() [2/2]
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.
- Parameters
-
point is the point emptyDistance is the distance that will be return when the box is empty
- Returns
- The minimum distance between the specified point and the box.
Definition at line 238 of file patch_skd_tree.cpp.
◆ evalPointMinSquareDistance() [1/2]
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.
- Parameters
-
point is the point
- Returns
- The square of the minimum distance between the specified point and the box.
Definition at line 291 of file patch_skd_tree.cpp.
◆ evalPointMinSquareDistance() [2/2]
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.
- Parameters
-
point is the point emptySquareDistance is the distance that will be return when the box is empty
- Returns
- The square of the minimum distance between the specified point and the box.
Definition at line 272 of file patch_skd_tree.cpp.
◆ getBoxMax()
const std::array< double, 3 > & bitpit::SkdBox::getBoxMax | ( | ) | const |
Get the maximum coordinate of the box.
- Returns
- The maximum coordinate of the box.
Definition at line 223 of file patch_skd_tree.cpp.
◆ getBoxMin()
const std::array< double, 3 > & bitpit::SkdBox::getBoxMin | ( | ) | const |
Get the minimum coordinate of the box.
- Returns
- The minimum coordinate of the box.
Definition at line 213 of file patch_skd_tree.cpp.
◆ isEmpty()
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.
- Returns
- Returns true if the box is empty, false otherwise.
Definition at line 197 of file patch_skd_tree.cpp.
Member Data Documentation
◆ m_boxMax
|
protected |
Definition at line 92 of file patch_skd_tree.hpp.
◆ m_boxMin
|
protected |
Definition at line 91 of file patch_skd_tree.hpp.
The documentation for this class was generated from the following files:
- src/patchkernel/patch_skd_tree.hpp
- src/patchkernel/patch_skd_tree.cpp
