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

A fused composition: an operation applied to its operands, itself a shape (isShape). More...

#include <EBGeometry_Fused.hpp>

Inheritance diagram for EBGeometry::Fused::Node< Op, Cs >:
Inheritance graph
[legend]
Collaboration diagram for EBGeometry::Fused::Node< Op, Cs >:
Collaboration graph
[legend]

Classes

struct  Layout
 Everything the node holds: the operation's parameters and its operands (their layouts for pool-resident ones). It holds only offsets into a pool, so it is right in every mirror of the pool. More...
 

Public Types

using T = ShapePrecision< typename Detail::TypeAt< 0, Cs... >::type >
 Floating-point precision.
 

Public Member Functions

 Node ()=delete
 Disallowed: build a node with a Fused:: function.
 
template<bool H = isHandle, std::enable_if_t<!H, int > = 0>
 Node (const Layout &a_layout) noexcept
 A node from its layout, for a node with no pool-resident operand.
 
template<bool H = isHandle, std::enable_if_t< H, int > = 0>
 Node (const Layout &a_layout, const PoolLocation &a_location) noexcept
 A node from its layout and the location its pool-resident operands resolve against.
 
const Layout & layout () const noexcept
 The node's layout.
 
T signedDistance (const Vec3T< T > &a_point) const noexcept
 The composition's value at a point.
 
BoundingVolumes::AABBT< T > computeBoundingVolume () const
 The composition's bounding box, by the rules of the expression builder.
 
Node rebasedView (const Pool &a_pool) const noexcept
 The same node resolving against a mirror of its pool (see Pool::mirror()); a node with no pool-resident operand is returned as is.
 
Node deepCopy (Pool &a_dstPool) const
 A copy of the node whose pool-resident operands are copied into another pool; a node with no pool-resident operand is returned as is.
 
- Public Member Functions inherited from EBGeometry::Fused::Detail::Base< Detail::anyPoolHandle< Cs... > >
PoolLocation location () const noexcept
 An unset location: a value node resolves nothing against a pool.
 

Static Public Attributes

static constexpr bool isHandle = Detail::anyPoolHandle<Cs...>
 Whether the node lives in a pool: whether one of its operands does.
 
static constexpr DistanceQuality distanceQuality = Op::template quality<Cs...>()
 How far signedDistance() can be trusted as a distance (see DistanceQuality).
 

Detailed Description

template<class Op, class... Cs>
class EBGeometry::Fused::Node< Op, Cs >

A fused composition: an operation applied to its operands, itself a shape (isShape).

The type every Fused:: function returns. Op holds the operation's parameters and its arithmetic; the operands are stored as they are, or as their layouts if they live in a pool, in which case the node is a pool handle itself (see EBGeometry_Fused.hpp).

Template Parameters
OpOperation (Fused::UnionOp, Fused::AffineOp, ...).
CsOperand types, all shapes of one precision.

Constructor & Destructor Documentation

◆ Node() [1/2]

template<class Op , class... Cs>
template<bool H = isHandle, std::enable_if_t<!H, int > = 0>
EBGeometry::Fused::Node< Op, Cs >::Node ( const Layout &  a_layout)
inlineexplicitnoexcept

A node from its layout, for a node with no pool-resident operand.

Parameters
[in]a_layoutLayout.

◆ Node() [2/2]

template<class Op , class... Cs>
template<bool H = isHandle, std::enable_if_t< H, int > = 0>
EBGeometry::Fused::Node< Op, Cs >::Node ( const Layout &  a_layout,
const PoolLocation &  a_location 
)
inlinenoexcept

A node from its layout and the location its pool-resident operands resolve against.

Parameters
[in]a_layoutLayout.
[in]a_locationLocation.

Member Function Documentation

◆ computeBoundingVolume()

template<class Op , class... Cs>
BoundingVolumes::AABBT< T > EBGeometry::Fused::Node< Op, Cs >::computeBoundingVolume ( ) const
inline

The composition's bounding box, by the rules of the expression builder.

Returns
The box.

◆ deepCopy()

template<class Op , class... Cs>
Node EBGeometry::Fused::Node< Op, Cs >::deepCopy ( Pool &  a_dstPool) const
inline

A copy of the node whose pool-resident operands are copied into another pool; a node with no pool-resident operand is returned as is.

Parameters
[in,out]a_dstPoolPool to copy into.
Returns
The copy.

◆ layout()

template<class Op , class... Cs>
const Layout & EBGeometry::Fused::Node< Op, Cs >::layout ( ) const
inlinenoexcept

The node's layout.

Returns
The layout.

◆ rebasedView()

template<class Op , class... Cs>
Node EBGeometry::Fused::Node< Op, Cs >::rebasedView ( const Pool &  a_pool) const
inlinenoexcept

The same node resolving against a mirror of its pool (see Pool::mirror()); a node with no pool-resident operand is returned as is.

Parameters
[in]a_poolMirror of the pool the node's operands live in.
Returns
The view.

◆ signedDistance()

template<class Op , class... Cs>
T EBGeometry::Fused::Node< Op, Cs >::signedDistance ( const Vec3T< T > &  a_point) const
inlinenoexcept

The composition's value at a point.

Parameters
[in]a_pointPoint.
Returns
The value.

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