EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
Loading...
Searching...
No Matches
Functions
EBGeometry::DCEL::VertexDetail Namespace Reference

Helpers shared by VertexT::computeVertexNormalAngleWeighted() and DCEL::reconcile(). More...

Functions

template<class T >
Vec3T< T > angleWeightedTerm (const Vec3T< T > &a_x0, const Vec3T< T > &a_x1, const Vec3T< T > &a_x2, const Vec3T< T > &a_normal) noexcept
 One face's term in a vertex's angle-weighted pseudonormal: the face's normal weighted by the angle the face subtends at the vertex.
 

Detailed Description

Helpers shared by VertexT::computeVertexNormalAngleWeighted() and DCEL::reconcile().

Internal; not part of the public API.

Function Documentation

◆ angleWeightedTerm()

template<class T >
Vec3T< T > EBGeometry::DCEL::VertexDetail::angleWeightedTerm ( const Vec3T< T > &  a_x0,
const Vec3T< T > &  a_x1,
const Vec3T< T > &  a_x2,
const Vec3T< T > &  a_normal 
)
inlineprotectednoexcept

One face's term in a vertex's angle-weighted pseudonormal: the face's normal weighted by the angle the face subtends at the vertex.

The host's reconcile and DCEL::reconcile() both take their terms from here, so that their arithmetic cannot drift apart. The positions must be distinct.

Template Parameters
TFloating-point precision.
Parameters
[in]a_x0The vertex's position.
[in]a_x1The position of the vertex before it on the face.
[in]a_x2The position of the vertex after it on the face.
[in]a_normalThe face's normal.
Returns
The angle at a_x0 between the edges to a_x1 and a_x2, times a_normal.