11#ifndef EBGEOMETRY_POINTCLOUDDETAIL_HPP
12#define EBGEOMETRY_POINTCLOUDDETAIL_HPP
36namespace PointCloudDetail {
53 "%s: too many points for 32-bit indices (%zu points, limit %zu)",
58 for (std::size_t i = 0; i < a_positions.size(); i++) {
62 "%s: point %zu of %zu has a non-finite coordinate",
80 uint32_t n = (a_n == 0) ? 0 : 1;
105template <
class T,
class Source>
109 const uint32_t a_numPoints,
110 const bool a_parallel,
113 const char* a_noun =
"point")
115 if (a_numPoints == 0) {
125 EBGEOMETRY_REQUIRE(std::isfinite(lo[0]) && std::isfinite(lo[1]) && std::isfinite(lo[2]) && std::isfinite(hi[0]) &&
126 std::isfinite(hi[1]) && std::isfinite(hi[2]),
127 "%s: a %s has a non-finite coordinate",
137 for (uint32_t i = 0; i < a_numPoints; i++) {
141 "%s: %s %u of %u has a non-finite coordinate",
145 unsigned(a_numPoints));
Declarations of bounding volume types used in bounding volume hierarchies.
Building blocks for builds that run with GPU::parallelFor(): a bounding-box reduction,...
GPU portability layer: host/device decoration macros and backend detection.
#define EBGEOMETRY_HOST
Mark a function as callable from host code only (no-op on host compilers).
Definition EBGeometry_GPU.hpp:83
Utility macros for EBGeometry.
#define EBGEOMETRY_REQUIRE(cond,...)
Always-on check of user input and one-time host setup.
Definition EBGeometry_Macros.hpp:84
Scalar helpers and numeric limits that compile for both host and device.
Query results and helpers shared by the point-cloud search structures.
Declaration of 2D and 3D point/vector classes with templated precision, and free functions on them.
Axis-aligned bounding box (AABB) enclosing a set of 3D points.
Definition EBGeometry_BoundingVolumes.hpp:37
Vec3T< T > & getLowCorner() noexcept
Get a modifiable reference to the low corner of the AABB.
Vec3T< T > & getHighCorner() noexcept
Get a modifiable reference to the high corner of the AABB.
Three-dimensional vector class with arithmetic operators.
Definition EBGeometry_Vec.hpp:258
static constexpr Vec3T< T > max() noexcept
Return the most-positive representable vector.
void requireValidCloud(const char *a_who, const std::vector< Vec3T< T > > &a_positions) noexcept
Abort with a message unless a point cloud can be indexed.
Definition EBGeometry_PointCloudDetail.hpp:50
uint32_t keyCount(const uint32_t a_n) noexcept
The smallest power of two at least a_n, and 0 for 0: how many keys a build sorts with GPU::bitonicSor...
Definition EBGeometry_PointCloudDetail.hpp:78
BoundingVolumes::AABBT< T > boxOf(const Source &a_source, const uint32_t a_numPoints, const bool a_parallel, Vec3T< T > *a_scratch, const char *a_who, const char *a_noun="point")
The box of a cloud, found where a build runs, and every coordinate checked finite.
Definition EBGeometry_PointCloudDetail.hpp:108
constexpr uint32_t InvalidIndex
The cloud index of "no point": a miss, or a result slot a query could not fill.
Definition EBGeometry_PointCloud.hpp:41
Namespace containing all of EBGeometry's functionality.
Definition EBGeometry_Affine.hpp:26
Vec2T< T > min(const Vec2T< T > &u, const Vec2T< T > &v) noexcept
Component-wise minimum of two vectors.
Vec2T< T > max(const Vec2T< T > &u, const Vec2T< T > &v) noexcept
Component-wise maximum of two vectors.