A group of up to W spheres carrying their cloud indices: a PointAoSoA<T, W> of the centers, and one more lane array of the radii.
More...
#include <EBGeometry_SphereAoSoA.hpp>
|
| void | pack (const SphereCloud::Sphere< T > *a_spheres, const uint32_t *a_sphereIds, uint32_t a_count) noexcept |
| | Pack a_count (sphere, id) pairs into this group.
|
| |
| void | packUnchecked (const SphereCloud::Sphere< T > *a_spheres, const uint32_t *a_sphereIds, uint32_t a_count) noexcept |
| | pack() without its always-on checks, for a build that runs on a device.
|
| |
| Array< T, W > | getSignedDistances (const Vec3T< T > &a_point) const noexcept |
| | Signed distances from a_point to the surface of every one of the W lane spheres, |p - c| - r.
|
| |
| uint32_t | getSphereId (size_t a_lane) const noexcept |
| | Get the id of the sphere in one lane of this group.
|
| |
| uint32_t | numValid () const noexcept |
| | Number of real (non-padded) spheres in this group.
|
| |
| template<class BV > |
| BV | computeBoundingVolume () const noexcept |
| | Compute the bounding volume enclosing all valid spheres in this group, each grown by its radius.
|
| |
|
|
PointAoSoA< T, W > | m_centers |
| | The centers and ids. It also holds the valid-sphere count.
|
| |
|
Array< T, W > | m_radii |
| | Per-lane radii. m_radii[j] = radius of sphere j.
|
| |
template<class T, size_t W = PointSoA::DefaultWidth<T>()>
struct EBGeometry::SphereAoSoA< T, W >
A group of up to W spheres carrying their cloud indices: a PointAoSoA<T, W> of the centers, and one more lane array of the radii.
The leaf primitive of SphereCloudBVH. The centers and ids are a PointAoSoA, so the distance to every center is PointSoAT's SIMD-wide computation, and the radii sit in their own array beside it.
- Template Parameters
-
◆ computeBoundingVolume()
template<class T , size_t W = PointSoA::DefaultWidth<T>()>
template<class BV >
Compute the bounding volume enclosing all valid spheres in this group, each grown by its radius.
- Template Parameters
-
| BV | Bounding volume type; must be constructible from a low and a high corner (AABBT<T>, say). |
- Returns
- Bounding volume enclosing every valid sphere.
◆ getSignedDistances()
template<class T , size_t W = PointSoA::DefaultWidth<T>()>
Signed distances from a_point to the surface of every one of the W lane spheres, |p - c| - r.
Negative inside a sphere. Padded lanes repeat the last real sphere's value.
- Parameters
-
| [in] | a_point | Query point. Must be finite. |
- Returns
- Per-lane signed distances, one per W lanes.
◆ getSphereId()
template<class T , size_t W = PointSoA::DefaultWidth<T>()>
Get the id of the sphere in one lane of this group.
- Parameters
-
| [in] | a_lane | Lane index. Must satisfy 0 <= a_lane < W (padded lanes return the last real sphere's id; see pack()). |
- Returns
- The id of the sphere at a_lane.
◆ numValid()
template<class T , size_t W = PointSoA::DefaultWidth<T>()>
Number of real (non-padded) spheres in this group.
- Returns
- The count passed to pack(), 1..W (0 before pack()).
◆ pack()
template<class T , size_t W = PointSoA::DefaultWidth<T>()>
Pack a_count (sphere, id) pairs into this group.
Pads lanes a_count..W-1 by repeating the last real sphere and id, as PointAoSoA::pack() does, so all W lanes hold valid data.
- Parameters
-
| [in] | a_spheres | Source sphere array with at least a_count elements. Must not be null; every center and radius finite, every radius at least 0. |
| [in] | a_sphereIds | Source id array (typically cloud indices), same order and length as a_spheres. Must not be null. |
| [in] | a_count | Number of valid (sphere, id) pairs to pack. Must satisfy 1 <= a_count <= W. |
◆ packUnchecked()
template<class T , size_t W = PointSoA::DefaultWidth<T>()>
pack() without its always-on checks, for a build that runs on a device.
The caller guarantees what pack() checks (checked here only with assertions on).
- Parameters
-
| [in] | a_spheres | Source sphere array with at least a_count elements. |
| [in] | a_sphereIds | Source id array, same order and length as a_spheres. |
| [in] | a_count | Number of valid (sphere, id) pairs to pack. |
The documentation for this struct was generated from the following file: