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

Where a ray first crosses a surface. More...

#include <EBGeometry_Ray.hpp>

Public Member Functions

bool hit () const noexcept
 Whether the ray crosses the surface.
 

Public Attributes

HitStatus m_status = HitStatus::Miss
 Whether the ray crosses the surface.
 
T m_t = Math::Limits<T>::infinity()
 Distance along the ray: of the crossing for a hit, of the last point reached for an unresolved query, and infinity for a miss.
 
Vec3T< T > m_point = Vec3T<T>::zeros()
 The point at m_t (for a hit or an unresolved query).
 
uint32_t m_primitive = 0
 The finest element the shape can name at the crossing: the face of a mesh SDF, the deciding leaf of a tape (see Tape::closestPrimitive()), the member of a BVHUnion (its place in the union's storage), and 0 for any other shape.
 
Vec3T< T > m_normal = Vec3T<T>::zeros()
 The outward unit normal at the crossing: from the shape's ray form, or the normalized gradient of its signed distance for a marched crossing.
 
bool m_entering = false
 Whether the ray enters the object there (it was outside just before), rather than leaving it.
 
bool m_exact = false
 Whether the crossing is exact (found by a ray form), rather than found to within RayOptions::m_tolerance by marching.
 

Detailed Description

template<class T>
struct EBGeometry::HitT< T >

Where a ray first crosses a surface.

Template Parameters
TFloating-point precision.

Member Function Documentation

◆ hit()

template<class T >
bool EBGeometry::HitT< T >::hit ( ) const
inlinenoexcept

Whether the ray crosses the surface.

Returns
m_status == HitStatus::Hit.

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