EBGeometry  1.0
Public Member Functions | Protected Attributes | List of all members
TorusSDF< T > Class Template Reference

Signed distance field for a torus. More...

#include <EBGeometry_AnalyticDistanceFunctions.hpp>

Inheritance diagram for TorusSDF< T >:
Inheritance graph
[legend]
Collaboration diagram for TorusSDF< T >:
Collaboration graph
[legend]

Public Member Functions

 TorusSDF ()=delete
 Disallowed weak construction.
 
 TorusSDF (const Vec3T< T > &a_center, const T &a_majorRadius, const T &a_minorRadius) noexcept
 Full constructor. More...
 
virtual ~TorusSDF () noexcept
 Destructor (does nothing).
 
const Vec3T< T > & getCenter () const noexcept
 Get torus center. More...
 
Vec3T< T > & getCenter () noexcept
 Get torus center. More...
 
const T & getMajorRadius () const noexcept
 Get major radius. More...
 
T & getMajorRadius () noexcept
 Get major radius. More...
 
const T & getMinorRadius () const noexcept
 Get minor radius. More...
 
T & getMinorRadius () noexcept
 Get minor radius. More...
 
virtual T signedDistance (const Vec3T< T > &a_point) const noexcept override
 Signed distance function for a torus. More...
 
- Public Member Functions inherited from SignedDistanceFunction< T >
 SignedDistanceFunction ()=default
 Disallowed, use the full constructor.
 
virtual ~SignedDistanceFunction ()=default
 Destructor (does nothing)
 
virtual T value (const Vec3T< T > &a_point) const noexcept override final
 Implementation of ImplicitFunction::value. More...
 
virtual Vec3T< T > normal (const Vec3T< T > &a_point, const T &a_delta) const noexcept
 Signed distance normal vector. More...
 
- Public Member Functions inherited from ImplicitFunction< T >
 ImplicitFunction ()=default
 Disallowed, use the full constructor.
 
virtual ~ImplicitFunction ()=default
 Destructor (does nothing)
 
operator() (const Vec3T< T > &a_point) const noexcept
 Alternative signature for the value function. More...
 
template<class BV >
BV approximateBoundingVolumeOctree (const Vec3T< T > &a_initialLowCorner, const Vec3T< T > &a_initialHighCorner, const unsigned int a_maxTreeDepth, const T &a_safety=0.0) const noexcept
 Compute an approximation to the bounding volume for the implicit surface, using octrees. More...
 

Protected Attributes

Vec3T< T > m_center
 Torus center.
 
m_majorRadius
 Major torus radius.
 
m_minorRadius
 Minor torus radius.
 

Detailed Description

template<class T>
class TorusSDF< T >

Signed distance field for a torus.

This is constructed such that the donut lies in the xy-plane.

Constructor & Destructor Documentation

◆ TorusSDF()

template<class T >
TorusSDF< T >::TorusSDF ( const Vec3T< T > &  a_center,
const T &  a_majorRadius,
const T &  a_minorRadius 
)
inlinenoexcept

Full constructor.

Parameters
[in]a_centerTorus center.
[in]a_majorRadiusMajor torus radius.
[in]a_minorRadiusMinor torus radius.

Member Function Documentation

◆ getCenter() [1/2]

template<class T >
const Vec3T<T>& TorusSDF< T >::getCenter ( ) const
inlinenoexcept

Get torus center.

Returns
m_center

◆ getCenter() [2/2]

template<class T >
Vec3T<T>& TorusSDF< T >::getCenter ( )
inlinenoexcept

Get torus center.

Returns
m_center

◆ getMajorRadius() [1/2]

template<class T >
const T& TorusSDF< T >::getMajorRadius ( ) const
inlinenoexcept

Get major radius.

Returns
m_majorRadius

◆ getMajorRadius() [2/2]

template<class T >
T& TorusSDF< T >::getMajorRadius ( )
inlinenoexcept

Get major radius.

Returns
m_majorRadius

◆ getMinorRadius() [1/2]

template<class T >
const T& TorusSDF< T >::getMinorRadius ( ) const
inlinenoexcept

Get minor radius.

Returns
m_minorRadius

◆ getMinorRadius() [2/2]

template<class T >
T& TorusSDF< T >::getMinorRadius ( )
inlinenoexcept

Get minor radius.

Returns
m_minorRadius

◆ signedDistance()

template<class T >
virtual T TorusSDF< T >::signedDistance ( const Vec3T< T > &  a_point) const
inlineoverridevirtualnoexcept

Signed distance function for a torus.

Parameters
[in]a_pointPosition.

Implements SignedDistanceFunction< T >.


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