13#ifndef EBGEOMETRY_BVHUNION_HPP
14#define EBGEOMETRY_BVHUNION_HPP
73template <
class P,
bool = isPoolHandle<P>>
92 using type =
typename P::Layout;
113 if constexpr (isPoolHandle<P>) {
114 return a_primitive.layout();
136 if constexpr (isPoolHandle<P>) {
137 return P(a_stored, a_location);
152template <
class T,
class P,
size_t K>
191template <
class T,
class... Ps>
200template <
class... Ps>
211template <
class P,
class... Ps>
233template <
class... Ps>
257template <
class... Ps>
284template <
class... Ps>
322template <
class P,
class T,
class =
void>
330template <
class P,
class T>
331inline constexpr bool hasPrecision<P, T, std::void_t<decltype(std::declval<const P&>().computeBoundingVolume())>> =
347inline constexpr bool isBox<BoundingVolumes::AABBT<T>> =
true;
362template <
class V,
class A>
363inline constexpr bool isVector<std::vector<V, A>> =
true;
369template <
class... Ps>
388template <
class F,
class P,
class... Ps>
392 const uint32_t a_type,
393 const uint32_t a_index,
397 if constexpr (
sizeof...(Ps) == 0) {
400 return CallableDetail::call(a_f, fromStored<P>(a_arrays.m_head.at(a_location.base(), a_index), a_location));
404 return CallableDetail::call(a_f, fromStored<P>(a_arrays.m_head.at(a_location.base(), a_index), a_location));
407 return visitArrays(a_arrays.m_tail, a_type - 1, a_index, a_location,
static_cast<F&&
>(a_f));
450template <
class T,
size_t K,
class... Ps>
454 static_assert(std::is_floating_point_v<T>,
"BVHUnion requires a floating-point type T");
455 static_assert(
sizeof...(Ps) > 0,
"BVHUnion requires at least one primitive type");
456 static_assert((CSGDetail::hasPrecision<Ps, T> && ...),
457 "BVHUnion requires every primitive type to have the union's precision T");
458 static_assert((std::is_trivially_copyable_v<Ps> && ...),
"BVHUnion requires trivially copyable primitive types");
459 static_assert(K > 1,
"BVHUnion BVH branching factor K must be at least 2");
481 static constexpr bool HasParts = (hasParts<Ps, T> || ...);
502 using First = std::tuple_element_t<0, std::tuple<Ps...>>;
531 explicit BVHUnion(
Pool& a_pool,
const std::vector<Ps>&... a_primitives);
553 template <
size_t N =
sizeof...(Ps), std::enable_if_t<N == 1, int> = 0>
556 const std::vector<First>& a_primitives,
557 const std::vector<BV>& a_boundingVolumes,
568 template <
size_t N =
sizeof...(Ps), std::enable_if_t<N == 1, int> = 0>
571 const std::vector<First>& a_primitives,
572 const std::vector<BV>& a_boundingVolumes,
706 struct
Layout : CSGDetail::ArraysOf<Ps...>
736 m_bvh(a_layout.m_bvh),
737 m_unbounded(a_layout.m_unbounded),
738 m_members(a_layout.m_members)
772 visitAt(
const Leaf& a_leaf,
const PoolLocation& a_location, F&& a_f)
const noexcept;
779 explicit BVHUnion(
const std::pair<Layout, PoolLocation>& a_built) noexcept :
BVHUnion(a_built.first, a_built.second)
785 typename Root::Layout m_bvh;
790 typename Root::Layout m_unbounded;
795 PODVector<uint32_t> m_members;
806template <
class P,
class... Ps, std::enable_if_t<!(CSGDetail::isBox<Ps> || ...),
int> = 0>
807BVHUnion(
Pool& a_pool,
const std::vector<P>& a_first,
const std::vector<Ps>&... a_primitives)
809 BVH::DefaultBranchingRatio<CSGDetail::PrimitivePrecision<P>>(),
822template <
class P,
class... Ps>
825 const std::vector<P>& a_first,
826 const std::vector<Ps>&... a_primitives)
828 BVH::DefaultBranchingRatio<CSGDetail::PrimitivePrecision<P>>(),
840template <
class P,
class B, std::enable_if_t<CSGDetail::isBox<B>,
int> = 0>
841BVHUnion(
Pool& a_pool,
const std::vector<P>& a_first,
const std::vector<B>& a_boxes)
854template <
class P,
class B,
class... Rest, std::enable_if_t<CSGDetail::isBox<B>,
int> = 0>
856 const std::vector<P>& a_first,
857 const std::vector<B>& a_boxes,
859 const Rest&... a_rest)
876template <
class T,
size_t K,
class Blend = SmoothMinOp<T>,
class... Ps>
880 static_assert(std::is_floating_point_v<T>,
"BVHSmoothUnion requires a floating-point type T");
881 static_assert(
sizeof...(Ps) > 0,
"BVHSmoothUnion requires at least one primitive type");
882 static_assert((CSGDetail::hasPrecision<Ps, T> && ...),
883 "BVHSmoothUnion requires every primitive type to have the union's precision T");
884 static_assert((std::is_trivially_copyable_v<Ps> && ...),
885 "BVHSmoothUnion requires trivially copyable primitive types");
886 static_assert(std::is_trivially_copyable_v<Blend>,
"BVHSmoothUnion requires a trivially copyable blend operator");
887 static_assert(K > 1,
"BVHSmoothUnion BVH branching factor K must be at least 2");
909 static constexpr bool HasParts = (hasParts<Ps, T> || ...);
929 using First = std::tuple_element_t<0, std::tuple<Ps...>>;
981 const std::vector<Ps>&... a_primitives);
993 template <
size_t N =
sizeof...(Ps), std::enable_if_t<N == 1, int> = 0>
996 const std::vector<First>& a_primitives,
997 const std::vector<BV>& a_boundingVolumes,
999 Blend a_blend = Blend{},
1013 template <
size_t N =
sizeof...(Ps), std::enable_if_t<N == 1, int> = 0>
1016 const std::vector<First>& a_primitives,
1017 const std::vector<BV>& a_boundingVolumes,
1180 m_bvh(a_layout.m_bvh),
1181 m_unbounded(a_layout.m_unbounded),
1182 m_smoothLen(a_layout.m_smoothLen),
1183 m_blend(a_layout.m_blend),
1184 m_members(a_layout.m_members)
1221 visitAt(
const Leaf& a_leaf,
const PoolLocation& a_location, F&& a_f)
const noexcept;
1231 BVHSmoothUnion(
const std::pair<Layout, PoolLocation>& a_built, T a_smoothLen, Blend a_blend) noexcept
1241 typename Root::Layout m_bvh;
1246 typename Root::Layout m_unbounded;
1261 PODVector<uint32_t> m_members;
1273template <
class P,
class... Ps, std::enable_if_t<!(CSGDetail::isBox<Ps> || ...),
int> = 0>
1276 const std::vector<P>& a_first,
1277 const std::vector<Ps>&... a_primitives)
1279 BVH::DefaultBranchingRatio<CSGDetail::PrimitivePrecision<P>>(),
1295template <
class B,
class P,
class... Ps, std::enable_if_t<!CSGDetail::isVector<B>,
int> = 0>
1299 const std::vector<P>& a_first,
1300 const std::vector<Ps>&... a_primitives)
1302 BVH::DefaultBranchingRatio<CSGDetail::PrimitivePrecision<P>>(),
1319template <
class B,
class P,
class... Ps, std::enable_if_t<!CSGDetail::isVector<B>,
int> = 0>
1324 const std::vector<P>& a_first,
1325 const std::vector<Ps>&... a_primitives)
1327 BVH::DefaultBranchingRatio<CSGDetail::PrimitivePrecision<P>>(),
1341template <
class P,
class V, std::enable_if_t<CSGDetail::isBox<V>,
int> = 0>
1343 const std::vector<P>& a_first,
1344 const std::vector<V>& a_boxes,
1347 BVH::DefaultBranchingRatio<CSGDetail::PrimitivePrecision<P>>(),
1364template <
class P,
class V,
class B,
class... Rest, std::enable_if_t<CSGDetail::isBox<V>,
int> = 0>
1366 const std::vector<P>& a_first,
1367 const std::vector<V>& a_boxes,
1371 BVH::DefaultBranchingRatio<CSGDetail::PrimitivePrecision<P>>(),
1377#include "EBGeometry_BVHUnionImplem.hpp"
Bounding volume hierarchies: everything in EBGeometry_PackedBVH.hpp, EBGeometry_TreeBVH....
The blend operators that smooth unions, intersections and differences use: ExpMinOp,...
How far a function's value can be trusted as a distance: DistanceQuality, and the distanceQualityOf t...
Fused CSG: the operations of the expression builder (EBGeometry_Expr.hpp) as types,...
GPU portability layer: host/device decoration macros and backend detection.
#define EBGEOMETRY_HOST_DEVICE
Mark a function as callable from both host and device code (no-op on host compilers).
Definition EBGeometry_GPU.hpp:80
#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_EXPECT(cond)
Runtime precondition assertion for EBGeometry.
Definition EBGeometry_Macros.hpp:269
Scalar helpers and numeric limits that compile for both host and device.
Placement-independent POD array views for the GPU memory foundation.
Growable bump arena for the GPU memory foundation.
SurfaceRef: which surface of a shape decides its value at a point, and the container protocol that na...
Declaration of 2D and 3D point/vector classes with templated precision, and free functions on them.
BVH-accelerated smooth union of many primitives of one or more types.
Definition EBGeometry_BVHUnion.hpp:878
uint32_t getMemberIndex(uint32_t a_position) const noexcept
A member's index in the order the constructor was given the primitives (type by type,...
auto visit(const Leaf &a_leaf, F &&a_f) const noexcept
Call a_f with the primitive a leaf stands for; see BVHUnion::visit().
uint32_t getNumSurfaces() const noexcept
How many surfaces the union numbers (see hasSurfaces): one per member, or a container member's own ge...
Layout layout() const noexcept
The union's arrays and parameters without its location, for storing it inside an outer union.
Definition EBGeometry_BVHUnion.hpp:1194
BVHSmoothUnion rebasedView(const Pool &a_pool) const noexcept
Produce a copy of this smooth union that resolves against a_pool; see BVHUnion.
BVHSmoothUnion(Pool &a_pool, T a_smoothLen, const std::vector< Ps > &... a_primitives)
Build the smooth union of the given primitives with a default-constructed Blend, SAH and the default ...
uint32_t getNumMembers() const noexcept
How many members (primitives) the union holds.
static constexpr bool HasParts
Whether a primitive type has parts (see hasParts), which closestSurface() reports.
Definition EBGeometry_BVHUnion.hpp:909
CSGDetail::Leaf< Ps... > Leaf
What the BVH's leaves hold; see BVHUnion::Leaf.
Definition EBGeometry_BVHUnion.hpp:914
SurfaceRef< T > closestSurface(const Vec3T< T > &a_point) const noexcept
The surface that decides the union's value at a point (see hasSurfaces): the member with the smallest...
BVHSmoothUnion(Pool &a_pool, const BVH::BuildSettings &a_settings, T a_smoothLen, Blend a_blend, const std::vector< Ps > &... a_primitives)
Build the smooth union with a construction method and, optionally, leaf sizes.
static BVH::ConstructionOptions defaultConstructionOptions() noexcept
The leaf-size settings the constructors without options use; the same as BVHUnion's.
Definition EBGeometry_BVHUnion.hpp:942
BVHSmoothUnion(Pool &a_pool, const std::vector< First > &a_primitives, const std::vector< BV > &a_boundingVolumes, T a_smoothLen, Blend a_blend=Blend{}, BVH::Construction a_construction=BVH::Construction::SAH)
Build a smooth union of one type with the caller's bounding boxes.
static constexpr bool HasContainers
Whether a primitive type is a container (see hasSurfaces), whose surfaces the union numbers too.
Definition EBGeometry_BVHUnion.hpp:904
BVHSmoothUnion(const Layout &a_layout, const PoolLocation &a_location) noexcept
Rebuild a handle from a stored layout and the location of the pool that holds it; see BVHUnion.
Definition EBGeometry_BVHUnion.hpp:1177
std::tuple_element_t< 0, std::tuple< Ps... > > First
The first primitive type: the only one for the constructors that take boxes.
Definition EBGeometry_BVHUnion.hpp:929
BV computeBoundingVolume() const noexcept
The axis-aligned bounding box enclosing all primitives.
BVHSmoothUnion(Pool &a_pool, const std::vector< First > &a_primitives, const std::vector< BV > &a_boundingVolumes, T a_smoothLen, Blend a_blend, BVH::Construction a_construction, const BVH::ConstructionOptions &a_options)
Build a smooth union of one type with the caller's bounding boxes and leaf-size settings.
Root getBVH() const noexcept
Get the packed BVH over the primitives whose bounding box is bounded.
BVHSmoothUnion deepCopy(Pool &a_dstPool) const
Duplicate this smooth union's storage, and that of any pool-resident primitive, into a_dstPool.
BVHSmoothUnion()=delete
Disallowed, use the full constructor.
static constexpr size_t NumTypes
How many primitive types the union holds.
Definition EBGeometry_BVHUnion.hpp:899
static constexpr DistanceQuality distanceQuality
How far signedDistance() can be trusted as a distance: a bound, or only a sign if any primitive type'...
Definition EBGeometry_BVHUnion.hpp:894
BVHSmoothUnion(Pool &a_pool, T a_smoothLen, Blend a_blend, const std::vector< Ps > &... a_primitives)
Build the smooth union of the given primitives with a smooth-minimum operator.
uint32_t getFirstSurface(uint32_t a_member) const noexcept
A member's first surface: member i covers [getFirstSurface(i), getFirstSurface(i + 1)).
T signedDistance(const Vec3T< T > &a_point) const noexcept
Evaluate the smooth union at a point.
PODSpan< const Leaf > getUnboundedPrimitives() const noexcept
Get the leaves of the primitives whose bounding box is unbounded, which every query evaluates.
BVH-accelerated union of many primitives of one or more types.
Definition EBGeometry_BVHUnion.hpp:452
BVHUnion(Pool &a_pool, const std::vector< First > &a_primitives, const std::vector< BV > &a_boundingVolumes, BVH::Construction a_construction, const BVH::ConstructionOptions &a_options)
Build a union of one type with the caller's bounding boxes and leaf-size settings.
CSGDetail::Leaf< Ps... > Leaf
What the BVH's leaves hold: with one type the primitive (or its layout, for a pool-resident one),...
Definition EBGeometry_BVHUnion.hpp:487
std::tuple_element_t< 0, std::tuple< Ps... > > First
The first primitive type: the only one for the constructors that take boxes.
Definition EBGeometry_BVHUnion.hpp:502
BV computeBoundingVolume() const noexcept
The axis-aligned bounding box enclosing all primitives.
uint32_t getNumMembers() const noexcept
How many members (primitives) the union holds.
BVHUnion(const Layout &a_layout, const PoolLocation &a_location) noexcept
Rebuild a handle from a stored layout and the location of the pool that holds it.
Definition EBGeometry_BVHUnion.hpp:733
static constexpr size_t NumTypes
How many primitive types the union holds.
Definition EBGeometry_BVHUnion.hpp:471
T signedDistance(const Vec3T< T > &a_point) const noexcept
Evaluate the union at a point.
BVHUnion deepCopy(Pool &a_dstPool) const
Duplicate this union's storage, and that of any pool-resident primitive, into a_dstPool.
static constexpr bool HasContainers
Whether a primitive type is a container (see hasSurfaces), whose surfaces the union numbers too.
Definition EBGeometry_BVHUnion.hpp:476
static BVH::ConstructionOptions defaultConstructionOptions() noexcept
The leaf-size settings the constructors without options use.
Definition EBGeometry_BVHUnion.hpp:518
BVHUnion(Pool &a_pool, const std::vector< First > &a_primitives, const std::vector< BV > &a_boundingVolumes, BVH::Construction a_construction=BVH::Construction::SAH)
Build a union of one type with the caller's bounding boxes, which may be tighter than the primitives'...
BVHUnion(Pool &a_pool, const BVH::BuildSettings &a_settings, const std::vector< Ps > &... a_primitives)
Build the union with a construction method and, optionally, leaf sizes.
PODSpan< const Leaf > getUnboundedPrimitives() const noexcept
Get the leaves of the primitives whose bounding box is unbounded, which every query evaluates.
uint32_t getNumSurfaces() const noexcept
How many surfaces the union numbers (see hasSurfaces): one per member, or a container member's own ge...
static constexpr DistanceQuality distanceQuality
How far signedDistance() can be trusted as a distance: a bound, or only a sign if any primitive type'...
Definition EBGeometry_BVHUnion.hpp:466
uint32_t getFirstSurface(uint32_t a_member) const noexcept
A member's first surface: member i covers [getFirstSurface(i), getFirstSurface(i + 1)).
auto visit(const Leaf &a_leaf, F &&a_f) const noexcept
Call a_f with the primitive a leaf stands for (one of the BVH's leaves, or of getUnboundedPrimitives(...
static constexpr bool HasParts
Whether a primitive type has parts (see hasParts), which closestSurface() reports.
Definition EBGeometry_BVHUnion.hpp:481
Root getBVH() const noexcept
Get the packed BVH over the primitives whose bounding box is bounded.
BVHUnion rebasedView(const Pool &a_pool) const noexcept
Produce a copy of this union that resolves against a_pool.
BVHUnion()=delete
Disallowed, use the full constructor.
SurfaceRef< T > closestSurface(const Vec3T< T > &a_point) const noexcept
The surface that decides the union's value at a point (see hasSurfaces): the member with the smallest...
Layout layout() const noexcept
The union's arrays without its location, for storing it inside an outer union.
Definition EBGeometry_BVHUnion.hpp:747
BVHUnion(Pool &a_pool, const std::vector< Ps > &... a_primitives)
Build the union of the given primitives, with SAH and the default leaf sizes.
uint32_t getMemberIndex(uint32_t a_position) const noexcept
A member's index in the order the constructor was given the primitives (type by type,...
Forward declaration of the linearised BVH, defined below.
Definition EBGeometry_PackedBVH.hpp:369
static BVH::ConstructionOptions defaultConstructionOptions() noexcept
The leaf-size settings build() uses when it is given none.
Definition EBGeometry_PackedBVH.hpp:616
Axis-aligned bounding box (AABB) enclosing a set of 3D points.
Definition EBGeometry_BoundingVolumes.hpp:37
Base of every pool-resident handle: the one PoolLocation its arrays resolve against.
Definition EBGeometry_Pool.hpp:563
PoolHandle() noexcept=default
An unset location; the first reservation attaches it.
Growable bump arena over a MemoryResource.
Definition EBGeometry_Pool.hpp:205
Three-dimensional vector class with arithmetic operators.
Definition EBGeometry_Vec.hpp:258
Construction
The preset BVH construction methods that the library's own BVH users accept.
Definition EBGeometry_PackedBVH.hpp:65
constexpr bool isVector
Whether X is a std::vector: keeps the smooth unions' deduction guides that take a blend from taking t...
Definition EBGeometry_BVHUnion.hpp:355
typename LeafOf< Ps... >::type Leaf
Shorthand for what a union's BVH leaves hold.
Definition EBGeometry_BVHUnion.hpp:285
constexpr bool hasContainers
Whether a union holds members that are containers themselves (see hasSurfaces), whose surfaces it num...
Definition EBGeometry_BVHUnion.hpp:192
typename BoxPrecision< std::decay_t< decltype(std::declval< const P & >().computeBoundingVolume())> >::type PrimitivePrecision
The precision of primitive type P, for the unions' deduction guides.
Definition EBGeometry_BVHUnion.hpp:314
Stored< P > toStored(const P &a_primitive) noexcept
Convert a primitive to the form a BVH union stores.
Definition EBGeometry_BVHUnion.hpp:111
typename StoredAs< P >::type Stored
Shorthand for the type a BVH union stores for a primitive of type P.
Definition EBGeometry_BVHUnion.hpp:100
constexpr DistanceQuality unionQuality
The weakest distance quality among primitive types: not a distance if any is not, else a bound.
Definition EBGeometry_BVHUnion.hpp:370
P fromStored(const Stored< P > &a_stored, const PoolLocation &a_location) noexcept
The primitive a stored entry stands for, resolving against a_location.
Definition EBGeometry_BVHUnion.hpp:134
constexpr bool hasPrecision
Whether a primitive type is of precision T: true if its computeBoundingVolume() returns an AABBT<T>,...
Definition EBGeometry_BVHUnion.hpp:323
auto visitArrays(const UnionArrays< P, Ps... > &a_arrays, const uint32_t a_type, const uint32_t a_index, const PoolLocation &a_location, F &&a_f) noexcept
Call a_f with the primitive a MemberRef stands for, testing its type against the arrays' types in ord...
Definition EBGeometry_BVHUnion.hpp:391
constexpr bool isBox
Whether X is a box, which an array of primitives never holds: keeps the deduction guide for several t...
Definition EBGeometry_BVHUnion.hpp:340
constexpr T max(const T &a_a, const T &a_b) noexcept
The larger of two values.
Definition EBGeometry_Math.hpp:61
Namespace containing all of EBGeometry's functionality.
Definition EBGeometry_Affine.hpp:26
DistanceQuality
How far the value of a signed distance function can be trusted, from strongest to weakest.
Definition EBGeometry_DistanceQuality.hpp:25
@ Bound
The value's magnitude never exceeds the distance to the surface: it may underestimate,...
@ NotADistance
Only the sign is meaningful, so the function describes a surface (its zero level set) but says nothin...
@ BVH
Through a BVH over the operands' boxes, however many there are.
The smooth union's arrays and parameters, with no location: what an outer union stores when this one ...
Definition EBGeometry_BVHUnion.hpp:1142
Blend m_blend
Smooth-minimum operator.
Definition EBGeometry_BVHUnion.hpp:1161
Root::Layout m_unbounded
The primitives with unbounded boxes, as one leaf.
Definition EBGeometry_BVHUnion.hpp:1151
PODVector< uint32_t > m_members
The members' table: with one type, each storage place's member index (see getMemberIndex()); then,...
Definition EBGeometry_BVHUnion.hpp:1167
T m_smoothLen
Smoothing length.
Definition EBGeometry_BVHUnion.hpp:1156
Root::Layout m_bvh
BVH over the primitives with bounded boxes.
Definition EBGeometry_BVHUnion.hpp:1146
The union's arrays as offsets into its pool, with no location: what an outer union stores when this u...
Definition EBGeometry_BVHUnion.hpp:707
Root::Layout m_unbounded
The primitives with unbounded boxes, as one leaf.
Definition EBGeometry_BVHUnion.hpp:716
PODVector< uint32_t > m_members
The members' table: with one type, each storage place's member index (see getMemberIndex()); then,...
Definition EBGeometry_BVHUnion.hpp:722
Root::Layout m_bvh
BVH over the primitives with bounded boxes.
Definition EBGeometry_BVHUnion.hpp:711
How a BVH union is built: the construction method and, optionally, its leaf sizes.
Definition EBGeometry_BVHUnion.hpp:47
Construction m_construction
Preset construction method; every BVH::Construction value is supported.
Definition EBGeometry_BVHUnion.hpp:51
std::optional< ConstructionOptions > m_options
Leaf-size settings; empty for the union's defaultConstructionOptions().
Definition EBGeometry_BVHUnion.hpp:56
Leaf-size settings for the preset construction methods, one per family of methods.
Definition EBGeometry_PackedBVH.hpp:115
The BVH's arrays as offsets into its pool, and its root box: a PackedBVH minus its location.
Definition EBGeometry_PackedBVH.hpp:1140
What a union of several types adds to the one-type layout: its per-type arrays. Empty for one type,...
Definition EBGeometry_BVHUnion.hpp:235
UnionArrays< Ps... > m_arrays
The per-type arrays.
Definition EBGeometry_BVHUnion.hpp:239
T type
The precision.
Definition EBGeometry_BVHUnion.hpp:305
The precision of a primitive type: the T of the box its computeBoundingVolume() returns.
Definition EBGeometry_BVHUnion.hpp:293
Stored< P > type
The stored primitive.
Definition EBGeometry_BVHUnion.hpp:277
What a union's BVH leaves hold: the primitive itself for one type, a MemberRef for several.
Definition EBGeometry_BVHUnion.hpp:259
A leaf of a union of several primitive types: the primitive's type, and its index in that type's arra...
Definition EBGeometry_BVHUnion.hpp:172
uint32_t m_type
Index of the primitive's type among the union's types.
Definition EBGeometry_BVHUnion.hpp:176
uint32_t m_index
Index of the primitive in its type's array.
Definition EBGeometry_BVHUnion.hpp:181
typename P::Layout type
The stored type: P's layout.
Definition EBGeometry_BVHUnion.hpp:92
How a BVH union stores a primitive of type P: as is, or, for a pool-resident handle,...
Definition EBGeometry_BVHUnion.hpp:75
P type
The stored type: P itself.
Definition EBGeometry_BVHUnion.hpp:79
UnionArrays< Ps... > m_tail
The other types' arrays.
Definition EBGeometry_BVHUnion.hpp:222
PODVector< Stored< P > > m_head
The first type's primitives, as stored (see Stored).
Definition EBGeometry_BVHUnion.hpp:217
The arrays of a union of several primitive types, one per type in the order given: a recursive list,...
Definition EBGeometry_BVHUnion.hpp:202
What a BVH union is built into: a BVH over the primitives whose bounding box is bounded,...
Definition EBGeometry_BVHUnion.hpp:154
BVH::PackedBVH< T, Stored< P >, K > unbounded
The primitives with unbounded boxes, as one leaf; empty if there are none.
Definition EBGeometry_BVHUnion.hpp:163
BVH::PackedBVH< T, Stored< P >, K > bvh
BVH over the primitives with bounded boxes.
Definition EBGeometry_BVHUnion.hpp:158
Numeric limits, with the meanings of the std::numeric_limits members of the same names.
Definition EBGeometry_Math.hpp:91
Raw pointer + size view into a Pool block, for hot inner loops.
Definition EBGeometry_PODVector.hpp:52
Placement-independent descriptor of a POD array inside a Pool.
Definition EBGeometry_PODVector.hpp:131
Where a pool-resident descriptor resolves its offsets, and the rules for moving it.
Definition EBGeometry_Pool.hpp:99
Quadratic polynomial smooth minimum for blending two signed-distance values.
Definition EBGeometry_Blend.hpp:99
The surface that decides a shape's value at a point, as closestSurface() reports it.
Definition EBGeometry_SurfaceRef.hpp:39