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

Signed distance field for a cylinder. More...

#include <EBGeometry_AnalyticDistanceFunctions.hpp>

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

Public Member Functions

 CylinderSDF ()=delete
 Disallowed weak construction. Use one of the full constructors.
 
 CylinderSDF (const Vec3T< T > &a_center1, const Vec3T< T > &a_center2, const T &a_radius) noexcept
 Full constructor. More...
 
virtual ~CylinderSDF () noexcept
 Destructor (does nothing).
 
const Vec3T< T > & getCenter1 () const noexcept
 Get one endpoint. More...
 
const Vec3T< T > & getCenter2 () const noexcept
 Get the other endpoint. More...
 
const T & getRadius () const noexcept
 Get 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_center1
 One endpoint.
 
Vec3T< T > m_center2
 The other endpoint.
 
Vec3T< T > m_center
 Halfway between center1 and m_center2.
 
Vec3T< T > m_axis
 "Axis", pointing from m_center1 to m_center2.
 
m_length
 Cylinder length.
 
m_radius
 radius.
 

Detailed Description

template<class T>
class CylinderSDF< T >

Signed distance field for a cylinder.

Constructor & Destructor Documentation

◆ CylinderSDF()

template<class T >
CylinderSDF< T >::CylinderSDF ( const Vec3T< T > &  a_center1,
const Vec3T< T > &  a_center2,
const T &  a_radius 
)
inlinenoexcept

Full constructor.

Parameters
[in]a_center1One endpoint.
[in]a_center2Other endpoint.
[in]a_radiusCylinder radius.

Member Function Documentation

◆ getCenter1()

template<class T >
const Vec3T<T>& CylinderSDF< T >::getCenter1 ( ) const
inlinenoexcept

Get one endpoint.

Returns
m_center1

◆ getCenter2()

template<class T >
const Vec3T<T>& CylinderSDF< T >::getCenter2 ( ) const
inlinenoexcept

Get the other endpoint.

Returns
m_center2

◆ getRadius()

template<class T >
const T& CylinderSDF< T >::getRadius ( ) const
inlinenoexcept

Get radius.

Returns
m_radius.

◆ signedDistance()

template<class T >
virtual T CylinderSDF< 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: