Internal helpers shared by BVHUnion and BVHSmoothUnion.
More...
|
| struct | ArraysOf |
| | What a union of several types adds to the one-type layout: its per-type arrays. Empty for one type, whose leaves hold the primitives themselves, so that a union of one type holds nothing but its two BVHs. More...
|
| |
| struct | ArraysOf< P > |
| | A union of one type has no per-type arrays. More...
|
| |
| struct | BoxPrecision |
| | The precision of a primitive type: the T of the box its computeBoundingVolume() returns. More...
|
| |
| struct | BoxPrecision< BoundingVolumes::AABBT< T > > |
| | The precision of an AABBT<T>. More...
|
| |
| struct | LeafOf |
| | What a union's BVH leaves hold: the primitive itself for one type, a MemberRef for several. More...
|
| |
| struct | LeafOf< P > |
| | What a union of one type's BVH leaves hold: the primitive, as stored. More...
|
| |
| struct | MemberRef |
| | A leaf of a union of several primitive types: the primitive's type, and its index in that type's array. More...
|
| |
| struct | StoredAs |
| | How a BVH union stores a primitive of type P: as is, or, for a pool-resident handle, as the handle's layout. More...
|
| |
| struct | StoredAs< P, true > |
| | How a BVH union stores a pool-resident handle: as its layout. More...
|
| |
| struct | UnionArrays |
| | The arrays of a union of several primitive types, one per type in the order given: a recursive list, so that it stays trivially copyable and device-visible. More...
|
| |
| struct | UnionArrays< P, Ps... > |
| | The arrays of a union of several primitive types: the first type's, and the rest. More...
|
| |
| struct | UnionParts |
| | What a BVH union is built into: a BVH over the primitives whose bounding box is bounded, and a single leaf (or nothing) holding those whose box is unbounded in some direction. More...
|
| |
|
| template<class P > |
| using | Stored = typename StoredAs< P >::type |
| | Shorthand for the type a BVH union stores for a primitive of type P.
|
| |
| template<class... Ps> |
| using | Leaf = typename LeafOf< Ps... >::type |
| | Shorthand for what a union's BVH leaves hold.
|
| |
| template<class P > |
| using | PrimitivePrecision = typename BoxPrecision< std::decay_t< decltype(std::declval< const P & >().computeBoundingVolume())> >::type |
| | The precision of primitive type P, for the unions' deduction guides.
|
| |
|
| template<class P > |
| Stored< P > | toStored (const P &a_primitive) noexcept |
| | Convert a primitive to the form a BVH union stores.
|
| |
| template<class P > |
| P | fromStored (const Stored< P > &a_stored, const PoolLocation &a_location) noexcept |
| | The primitive a stored entry stands for, resolving against a_location.
|
| |
| template<class F , class P , class... Ps> |
| 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 order (the last is taken without a test).
|
| |
|
| template<class T , class... Ps> |
| constexpr bool | hasContainers = (hasSurfaces<Ps, T> || ...) |
| | Whether a union holds members that are containers themselves (see hasSurfaces), whose surfaces it numbers through a table of first surfaces.
|
| |
| template<class P , class T , class = void> |
| constexpr bool | hasPrecision = true |
| | Whether a primitive type is of precision T: true if its computeBoundingVolume() returns an AABBT<T>, and for a type without one (a one-type union given the caller's boxes), which says nothing.
|
| |
| template<class X > |
| constexpr bool | isBox = false |
| | Whether X is a box, which an array of primitives never holds: keeps the deduction guide for several types from taking a one-type union's box array for a second type.
|
| |
| template<class X > |
| constexpr bool | isVector = false |
| | Whether X is a std::vector: keeps the smooth unions' deduction guides that take a blend from taking the first array for one.
|
| |
| template<class... Ps> |
| constexpr DistanceQuality | unionQuality |
| | The weakest distance quality among primitive types: not a distance if any is not, else a bound.
|
| |
Internal helpers shared by BVHUnion and BVHSmoothUnion.
◆ Leaf
Shorthand for what a union's BVH leaves hold.
- Template Parameters
-
◆ PrimitivePrecision
The precision of primitive type P, for the unions' deduction guides.
- Template Parameters
-
◆ Stored
Shorthand for the type a BVH union stores for a primitive of type P.
- Template Parameters
-
◆ fromStored()
template<class P >
| P EBGeometry::CSGDetail::fromStored |
( |
const Stored< P > & |
a_stored, |
|
|
const PoolLocation & |
a_location |
|
) |
| |
|
inlinenoexcept |
The primitive a stored entry stands for, resolving against a_location.
A pool-resident primitive is rebuilt from its layout and the union's own location, so it resolves against the same pool the union does: the host pool, a host mirror or a device mirror. Any other primitive is returned as stored.
- Template Parameters
-
- Parameters
-
| [in] | a_stored | Primitive as stored in the union's BVH. |
| [in] | a_location | The union's pool location. |
- Returns
- The primitive.
◆ toStored()
template<class P >
| Stored< P > EBGeometry::CSGDetail::toStored |
( |
const P & |
a_primitive | ) |
|
|
inlinenoexcept |
Convert a primitive to the form a BVH union stores.
- Template Parameters
-
- Parameters
-
| [in] | a_primitive | Primitive. |
- Returns
- The primitive, or its layout if it is a pool-resident handle.
◆ visitArrays()
template<class F , class P , class... Ps>
| auto EBGeometry::CSGDetail::visitArrays |
( |
const UnionArrays< P, Ps... > & |
a_arrays, |
|
|
const uint32_t |
a_type, |
|
|
const uint32_t |
a_index, |
|
|
const PoolLocation & |
a_location, |
|
|
F && |
a_f |
|
) |
| |
|
inlinenoexcept |
Call a_f with the primitive a MemberRef stands for, testing its type against the arrays' types in order (the last is taken without a test).
Internal helper; not part of the public API.
- Template Parameters
-
| F | Callable on each primitive type, returning the same type for all. |
| P | First primitive type of the arrays. |
| Ps | The others. |
- Parameters
-
| [in] | a_arrays | The arrays, from the type a_type counts from. |
| [in] | a_type | The type's index among these arrays. |
| [in] | a_index | The primitive's index in its type's array. |
| [in] | a_location | The union's location, which its arrays and any pool-resident primitive resolve against. |
| [in] | a_f | What to call. |
- Returns
- What
a_f returns.
◆ hasContainers
template<class T , class... Ps>
| constexpr bool EBGeometry::CSGDetail::hasContainers = (hasSurfaces<Ps, T> || ...) |
|
inlineconstexpr |
Whether a union holds members that are containers themselves (see hasSurfaces), whose surfaces it numbers through a table of first surfaces.
Internal helper; not part of the public API.
- Template Parameters
-
| T | Floating-point precision. |
| Ps | Primitive types. |
◆ hasPrecision
template<class P , class T , class = void>
| constexpr bool EBGeometry::CSGDetail::hasPrecision = true |
|
inlineconstexpr |
Whether a primitive type is of precision T: true if its computeBoundingVolume() returns an AABBT<T>, and for a type without one (a one-type union given the caller's boxes), which says nothing.
- Template Parameters
-
| P | Primitive type. |
| T | Floating-point precision. |
◆ isBox
Whether X is a box, which an array of primitives never holds: keeps the deduction guide for several types from taking a one-type union's box array for a second type.
An AABBT is a box.
- Template Parameters
-
| X | Type to inspect. |
| T | Floating-point precision. |
◆ isVector
template<class X >
| constexpr bool EBGeometry::CSGDetail::isVector = false |
|
inlineconstexpr |
Whether X is a std::vector: keeps the smooth unions' deduction guides that take a blend from taking the first array for one.
- Template Parameters
-
◆ unionQuality
Initial value:=
((distanceQualityOf<Ps> == DistanceQuality::NotADistance) || ...) ? DistanceQuality::NotADistance
: DistanceQuality::Bound
The weakest distance quality among primitive types: not a distance if any is not, else a bound.
- Template Parameters
-