|
EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
|
The triangle distance kernels, written once for a scalar and for every SIMD::Pack. More...


Go to the source code of this file.
Classes | |
| struct | EBGeometry::TriangleDistance::Vec3V< V > |
| A 3D vector of V, where V is a scalar or a SIMD::Pack: x, y and z each hold one lane per triangle. More... | |
Namespaces | |
| namespace | EBGeometry |
| Namespace containing all of EBGeometry's functionality. | |
| namespace | EBGeometry::TriangleDistance |
| The triangle signed-distance kernel. | |
Functions | |
| template<class V , class Source > | |
| EBGEOMETRY_HOST_ALWAYS_INLINE V | EBGeometry::TriangleDistance::signedDistance (const Source &a_triangle, const Vec3V< V > &a_point) noexcept |
Signed distance from a_point to a triangle, or to one triangle per lane. | |
| template<class V , class Source > | |
| EBGEOMETRY_HOST_ALWAYS_INLINE V | EBGeometry::TriangleDistance::unsignedDistance2 (const Source &a_triangle, const Vec3V< V > &a_point) noexcept |
| The squared distance from a point to a triangle, without its sign: the candidates of signedDistance() (the face where the point projects inside it, else the nearest vertex or edge), none signed. | |
The triangle distance kernels, written once for a scalar and for every SIMD::Pack.
Triangle::signedDistance(), TriangleSoAT's lanes and TriangleSoAT's SIMD groups all call TriangleDistance::signedDistance(), with V = T for one triangle and V = SIMD::Pack<T, N> for N triangles at once. TriangleSoAT::nearestLane() calls TriangleDistance::unsignedDistance2(), its unsigned companion, the same way.