Ray forms of smooth unions and intersections: traced exactly where they cannot differ from the plain operation, and marched only where they can.
More...
|
| struct | EBGeometry::RayDetail::MarchedView< S > |
| | A shape seen only through its value, with no ray form: what a smooth operation is marched as where it may differ from the plain operation. More...
|
| |
| struct | EBGeometry::RayDetail::IsComposition< MarchedView< S > > |
| | A marched view is called out of line on a device where its shape is. More...
|
| |
| struct | EBGeometry::RayDetail::BlendZoneView< T, Cs > |
| | A fused smooth union restricted to where it can differ from the plain union of its operands: the value max(u, m2 - w), u the smooth union's and m2 its second smallest operand's, w its blend length plus how far the blend deepens (s + s/4). A polynomial blend of length s changes the minimum only where the two smallest operands are within s of each other, and changes its sign only where the smallest is within s/4 of 0: both within w. Where this value is negative, the smooth union is inside; everywhere else it is inside exactly where the plain union is. More...
|
| |
| struct | EBGeometry::RayDetail::IsComposition< BlendZoneView< T, Cs... > > |
| | A blend zone view is called out of line on a device. More...
|
| |
| struct | EBGeometry::RayForm< Fused::Node< Fused::SmoothCombineOp< T, IsUnion >, Cs... > > |
| | The ray form of a fused smooth union, intersection or difference (an intersection with a complement): the plain operation traced exactly where its operands allow, and the smooth one marched only where it may differ from it. Callable on a device. More...
|
| |
|
| template<class T > |
| T | EBGeometry::RayDetail::blendDepth (const T a_smooth, const bool a_exponential) noexcept |
| | How far a smooth union's blend can deepen its operands' minimum: s/4 for the polynomial blend, s ln 2 for the exponential one.
|
| |
| template<class T , class Op , class... Cs, size_t... Is> |
| void | EBGeometry::RayDetail::pairOverlaps (const Fused::Node< Op, Cs... > &a_node, const T a_grow, BoundingVolumes::AABBT< T > &a_box, bool &a_any, std::index_sequence< Is... >) noexcept |
| | Where two of a fused node's operands' boxes, grown by a_grow, overlap: the box of each pair's overlap, united into a_box (a_any says whether there is one yet).
|
| |
Ray forms of smooth unions and intersections: traced exactly where they cannot differ from the plain operation, and marched only where they can.
A smooth union with the polynomial blend of length s changes its operands' minimum only where the two smallest are within s of each other, and changes its sign only where the smallest is within s/4 of 0. So it is inside wherever the plain union is, and differs from it only in its blend zone, where the two smallest operands are both within w = s + s/4 of their surfaces. A ray traces the plain union exactly from its operands' spans, and marches the blend zone view (RayDetail::BlendZoneView) only inside the box where two operands' boxes, grown by w, overlap, and only up to what the plain union is known up to; the two are united. An exponential blend differs from the plain union everywhere and is marched whole. A smooth intersection only raises its operands' maximum, so it lies within their plain intersection, traced exactly, and is marched within its spans. The fused SmoothUnion, SmoothIntersection and SmoothDifference trace this way; a tape marches its smooth operations whole.
- Author
- Robert Marskar
template<class T , class Op , class... Cs, size_t... Is>
| void EBGeometry::RayDetail::pairOverlaps |
( |
const Fused::Node< Op, Cs... > & |
a_node, |
|
|
const T |
a_grow, |
|
|
BoundingVolumes::AABBT< T > & |
a_box, |
|
|
bool & |
a_any, |
|
|
std::index_sequence< Is... > |
|
|
) |
| |
|
inlinenoexcept |
Where two of a fused node's operands' boxes, grown by a_grow, overlap: the box of each pair's overlap, united into a_box (a_any says whether there is one yet).
Internal helper; not part of the public API.
- Template Parameters
-
| T | Floating-point precision. |
| Op | Operation. |
| Cs | Operand types. |
| Is | Operand indices. |
- Parameters
-
| [in] | a_node | The node. |
| [in] | a_grow | How much each box is grown. |
| [in,out] | a_box | The box so far. |
| [in,out] | a_any | Whether there is one. |