|
EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
|
The Morton grid over a box: a point's cell is (p / 2 - lo / 2) * scale, clamped to [0, SFC::ValidSpan]. More...
#include <EBGeometry_SFC.hpp>
Public Member Functions | |
| MortonKey | key (const Vec3T< T > &a_point, const uint32_t a_index) const noexcept |
| A point's key. | |
Static Public Member Functions | |
| static MortonGrid | over (const Vec3T< T > &a_lo, const Vec3T< T > &a_hi) noexcept |
| The grid over a box. | |
Public Attributes | |
| Vec3T< T > | m_halfLo |
| Half the box's lower corner. | |
| T | m_scale |
| Cells per unit of halved length (0 for a box of one point). | |
The Morton grid over a box: a point's cell is (p / 2 - lo / 2) * scale, clamped to [0, SFC::ValidSpan].
Cubic cells, the box's longest side spanning the grid. The coordinates are halved before subtracting, so that a box wider than the largest finite value of T still has a finite extent; halving is exact, so the host and a device compute the same cells.
| T | Floating-point precision. |
|
inlinenoexcept |
A point's key.
| [in] | a_point | The point; finite. |
| [in] | a_index | Its index. |
|
inlinestaticnoexcept |
The grid over a box.
| [in] | a_lo | The box's lower corner. |
| [in] | a_hi | The box's upper corner. |