![]() |
Vulpes
0.1.0
Versatile and parallel compUtational Library for high-order discontinuous Polytopal Element Simulations
|
Signed distance function for a hexahedron (cuboid) in 3D space. More...
#include <distance.hpp>
Public Member Functions | |
| HexahedronDistance (const Point< FloatType, 3 > &corner_a, const Point< FloatType, 3 > &corner_b) | |
| Constructor for the hexahedron distance function. | |
| void | operator() (const Point< FloatType, 3 > &point, FloatType *distance_buffer) const |
| Compute the signed distance between a point and the hexahedron. | |
| std::array< Point< FloatType, 3 >, 2 > | bbox () const |
| Get the bounding box of the hexahedron. | |
| void | operator() (const Point< FloatType, Dim > &point, FloatType *distance_buffer) const |
| Evaluate the distance function for the given point. | |
Static Public Member Functions | |
| static constexpr size_t | size () |
| Get the size of the distance buffer for this distance function. | |
Static Public Attributes | |
| static constexpr bool | is_leaf = true |
| A flag indicating that this is a leaf node in a composite expression. Indeed we give an explicit formula to compute the distance. | |
Private Attributes | |
| const Point< FloatType, 3 > | m_corner_a |
| Smallest corner of the hexahedron. | |
| const Point< FloatType, 3 > | m_corner_b |
| Largest corner of the hexahedron. | |
Signed distance function for a hexahedron (cuboid) in 3D space.
This class computes the signed distance between a point and a hexahedron defined by two corner points.
| FloatType | The type of floating-point value. |
|
inline |
Constructor for the hexahedron distance function.
| corner_a | smallest corner. |
| corner_b | largest corner. |
|
inline |
Get the bounding box of the hexahedron.
|
inline |
Compute the signed distance between a point and the hexahedron.
| point | The point for which the distance is to be computed. |
| distance_buffer | The buffer where the computed distances will be stored. |
|
inlineinherited |
Evaluate the distance function for the given point.
This function computes the signed distance between a point and the shape defined by the Distance type. The result is stored in the provided distance_buffer.
| point | The point for which the distance needs to be computed. |
| distance_buffer | The buffer where the computed distances will be stored. |
|
inlinestaticconstexpr |
Get the size of the distance buffer for this distance function.
|
staticconstexpr |
A flag indicating that this is a leaf node in a composite expression. Indeed we give an explicit formula to compute the distance.
|
private |
Smallest corner of the hexahedron.
|
private |
Largest corner of the hexahedron.