![]() |
Vulpes
0.1.0
Versatile and parallel compUtational Library for high-order discontinuous Polytopal Element Simulations
|
Signed distance function for a sphere in 3D space. More...
#include <distance.hpp>
Public Member Functions | |
| SphereDistance (const Point< FloatType, 3 > ¢er, FloatType radius) | |
| Constructor for the sphere distance function. | |
| void | operator() (const Point< FloatType, 3 > &point, FloatType *distance_buffer) const |
| Compute the signed distance between a point and the sphere. | |
| std::array< Point< FloatType, 3 >, 2 > | bbox () const |
| Get the bounding box of the sphere. | |
| 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_center |
| The center of the sphere. | |
| const FloatType | m_radius |
| The radius of the sphere. | |
Signed distance function for a sphere in 3D space.
This class computes the signed distance between a point and a sphere defined by its center and radius.
| FloatType | The type of floating-point value. |
|
inline |
Constructor for the sphere distance function.
| center | The center of the sphere. |
| radius | The radius of the sphere. |
|
inline |
Get the bounding box of the sphere.
|
inline |
Compute the signed distance between a point and the sphere.
| 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 |
The center of the sphere.
|
private |
The radius of the sphere.