|
EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
|
Metadata-carrying wrapper around a single PointSoAT<T, W>. More...
#include <EBGeometry_PointAoSoA.hpp>

Public Member Functions | |
| void | pack (const Vec3T< T > *a_positions, const Meta *a_metaData, uint32_t a_count) noexcept |
| Pack a_count (position, metadata) pairs into this group. | |
| std::array< T, W > | getDistances2 (const Vec3T< T > &a_point) const noexcept |
| Squared unsigned distances from a_point to every one of the W lane points. | |
| std::array< T, W > | getDistances (const Vec3T< T > &a_point) const noexcept |
| Unsigned distances from a_point to every one of the W lane points. | |
| T | getMinimumDistance2 (const Vec3T< T > &a_point) const noexcept |
| Shortest squared unsigned distance from a_point to the closest point in this group. | |
| T | getMinimumDistance (const Vec3T< T > &a_point) const noexcept |
| Shortest unsigned distance from a_point to the closest point in this group. | |
| T | getMaximumDistance2 (const Vec3T< T > &a_point) const noexcept |
| Largest squared unsigned distance from a_point to the farthest point in this group. | |
| T | getMaximumDistance (const Vec3T< T > &a_point) const noexcept |
| Largest unsigned distance from a_point to the farthest point in this group. | |
| const Meta & | getMetaData (size_t a_lane) const noexcept |
| Get the metadata for one lane of this group. | |
| template<class BV > | |
| BV | computeBoundingVolume () const noexcept |
| Compute the bounding volume enclosing all valid points in this group. | |
Protected Attributes | |
| PointSoAT< T, W > | m_positions |
| The wrapped, position-only SoA block. SIMD-hot: this is all getDistance()/ getDistance2() ever touch. | |
| std::array< Meta, W > | m_metaData |
| Per-lane metadata, physically separate from m_positions. m_metaData[j] = metadata of point j. Never read by getDistance()/getDistance2(). | |
| uint32_t | m_validCount = 0 |
| Number of valid (non-padded) points in this group (1..W). | |
Metadata-carrying wrapper around a single PointSoAT<T, W>.
Structurally this is an AoSoA (Array of Structures of Arrays): PointSoAT<T, W> itself is true SoA (one flat array per coordinate, no per-point structure at all), and PointAoSoA adds exactly one more member – a std::array<Meta, W> – alongside it. The two are never merged or interleaved: the distance queries (getMinimumDistance2(), getMaximumDistance2(), getDistances2(), and their sqrt forms – all delegated straight through to the embedded PointSoAT) never read m_metaData at all, so a pure position-only distance traversal over PointAoSoA-packed leaves touches exactly the same bytes it would touch over bare PointSoAT-packed leaves – metadata is only ever read afterward, once a query already knows which lane (and therefore which point) it cares about, via getMetaData().
| T | Floating-point precision. |
| Meta | User-defined metadata type stored with each point. |
| W | SIMD width; see PointSoAT. Defaults to PointSoA::DefaultWidth<T>(), matching PointSoAT's own default. |
|
noexcept |
Compute the bounding volume enclosing all valid points in this group.
Delegates entirely to the embedded PointSoAT<T, W>.
| BV | Bounding volume type (e.g. AABBT<T>); must be constructible from a std::vector<Vec3T<T>> of point positions. |
|
noexcept |
Unsigned distances from a_point to every one of the W lane points.
Delegates to PointSoAT<T, W>::getDistances(); the sqrt of each getDistances2() lane.
| [in] | a_point | Query point. Must be finite. |
|
noexcept |
Squared unsigned distances from a_point to every one of the W lane points.
Delegates entirely to the embedded PointSoAT<T, W>; never touches m_metaData. Padded lanes repeat the last real point's value – pair each lane with getMetaData() to identify (and de-duplicate) it, e.g. for a k-nearest-neighbor scan. See PointSoAT::getDistances2().
| [in] | a_point | Query point. Must be finite. |
|
noexcept |
Largest unsigned distance from a_point to the farthest point in this group.
Delegates to PointSoAT<T, W>::getMaximumDistance(); the sqrt of getMaximumDistance2().
| [in] | a_point | Query point. Must be finite. |
|
noexcept |
Largest squared unsigned distance from a_point to the farthest point in this group.
Delegates entirely to the embedded PointSoAT<T, W>; never touches m_metaData.
| [in] | a_point | Query point. Must be finite. |
|
noexcept |
Shortest unsigned distance from a_point to the closest point in this group.
Delegates to PointSoAT<T, W>::getMinimumDistance(); the sqrt of getMinimumDistance2().
| [in] | a_point | Query point. Must be finite. |
|
noexcept |
Shortest squared unsigned distance from a_point to the closest point in this group.
Delegates entirely to the embedded PointSoAT<T, W>; never touches m_metaData. Avoids the sqrt that getMinimumDistance() pays – prefer it whenever the caller only needs the distance for comparison, not its actual magnitude.
| [in] | a_point | Query point. Must be finite. |
|
noexcept |
Pack a_count (position, metadata) pairs into this group.
Pads lanes a_count..W-1 by repeating the last real position and metadata, matching PointSoAT::pack()'s own padding convention, so all W lanes hold valid data.
| [in] | a_positions | Source position array with at least a_count elements. Must not be null. |
| [in] | a_metaData | Source metadata array with at least a_count elements, same order and length as a_positions. Must not be null. |
| [in] | a_count | Number of valid (position, metadata) pairs to pack. Must satisfy 1 <= a_count <= W. |
|
protected |
Number of valid (non-padded) points in this group (1..W).
Zero-initialized so that a default-constructed (not-yet-packed) group reliably fails the EBGEOMETRY_EXPECT(m_validCount >= 1) precondition in getMetaData(), rather than reading whatever indeterminate value happened to be there. (getDistance()/getDistance2() get the same protection for free from the embedded PointSoAT's own m_validCount.)