EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Static Public Attributes | List of all members
EBGeometry::RayDetail::BlendZoneView< T, Cs > Struct Template Reference

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...

#include <EBGeometry_SmoothRayForms.hpp>

Collaboration diagram for EBGeometry::RayDetail::BlendZoneView< T, Cs >:
Collaboration graph
[legend]

Public Types

using Node = Fused::Node< Fused::SmoothCombineOp< T, true >, Cs... >
 The node type.
 

Public Member Functions

T signedDistance (const Vec3T< T > &a_point) const noexcept
 The value.
 
BoundingVolumes::AABBT< T > computeBoundingVolume () const noexcept
 The blend zone's box.
 

Public Attributes

Node m_node
 The smooth union.
 
BoundingVolumes::AABBT< T > m_box
 Where two operands' boxes, grown by w, overlap: the blend zone lies within it.
 

Static Public Attributes

static constexpr DistanceQuality distanceQuality = distanceQualityOf<Node>
 The quality of its value: a bound at best.
 

Detailed Description

template<class T, class... Cs>
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.

Internal helper; not part of the public API. A distance bound, as the maximum of two: far from either of the two nearest operands its value is large, so a march of it takes long steps, even near the other.

Template Parameters
TFloating-point precision.
CsOperand types.

Member Function Documentation

◆ computeBoundingVolume()

template<class T , class... Cs>
BoundingVolumes::AABBT< T > EBGeometry::RayDetail::BlendZoneView< T, Cs >::computeBoundingVolume ( ) const
inlinenoexcept

The blend zone's box.

Returns
The box.

◆ signedDistance()

template<class T , class... Cs>
T EBGeometry::RayDetail::BlendZoneView< T, Cs >::signedDistance ( const Vec3T< T > &  a_point) const
inlinenoexcept

The value.

Parameters
[in]a_pointThe point.
Returns
The value.

The documentation for this struct was generated from the following file: