![]() |
Vulpes
0.1.0
Versatile and parallel compUtational Library for high-order discontinuous Polytopal Element Simulations
|
Represents the difference of two signed distance functions. More...
#include <distance.hpp>
Public Member Functions | |
| DifferenceDistance (D1 const &u, D2 const &v) | |
| Constructor for the difference distance function. | |
| void | operator() (const Point< FloatType, Dim > &point, FloatType *distance_buffer) const |
| Compute the distance between a point and the difference of two shapes. | |
| std::array< Point< FloatType, Dim >, 2 > | bbox () const |
| Get the bounding box of the difference of two shapes. | |
Static Public Member Functions | |
| static constexpr size_t | size () |
| Get the size of the distance buffer for this difference operation. | |
Static Public Attributes | |
| static constexpr bool | is_leaf = false |
| A flag indicating that this is a non-leaf node in a composite expression. | |
Private Attributes | |
| std::conditional_t< D1::is_leaf, const D1 &, const D1 > | m_u |
| std::conditional_t< D2::is_leaf, const D2 &, const D2 > | m_v |
Represents the difference of two signed distance functions.
This class computes the signed distance between a point and the difference of two shapes, where the distance to the difference is defined as the maximum of the negative distance to the second shape and the distance to the first shape.
| FloatType | The type of floating-point value. |
| Dim | The dimensionality of the space (e.g., 2D or 3D). |
| D1 | The first distance function. |
| D2 | The second distance function. |
|
inline |
Constructor for the difference distance function.
| u | The first distance function. |
| v | The second distance function. |
|
inline |
Get the bounding box of the difference of two shapes.
The bounding box of the difference is the bounding box of the first shape.
|
inline |
Compute the distance between a point and the difference of two shapes.
The distance is defined as the maximum of the negative distance to the second shape and the distance to the first shape.
| point | The point for which the distance is to be computed. |
| distance_buffer | The buffer where the computed distances will be stored. |
|
inlinestaticconstexpr |
Get the size of the distance buffer for this difference operation.
The size is the sum of the sizes of the individual distance buffers for A and B.
|
staticconstexpr |
A flag indicating that this is a non-leaf node in a composite expression.
|
private |
The first distance function. If it is concrete we just need a reference, otherwise we copy the expression.
|
private |
The first distance function. If it is concrete we just need a reference, otherwise we copy the expression.