MADNESS  0.10.1
Public Member Functions | Protected Attributes | List of all members
madness::SDFEllipsoid Class Reference

An ellipsoid (3 dimensions) More...

#include <sdf_shape_3D.h>

Inheritance diagram for madness::SDFEllipsoid:
Inheritance graph
[legend]
Collaboration diagram for madness::SDFEllipsoid:
Collaboration graph
[legend]

Public Member Functions

 SDFEllipsoid (const coord_3d &radii, const coord_3d &center)
 Constructor for ellipsoid. More...
 
coord_3d grad_sdf (const coord_3d &pt) const
 
double sdf (const coord_3d &pt) const
 Computes the normal distance. More...
 
- Public Member Functions inherited from madness::SignedDFInterface< 3 >
virtual ~SignedDFInterface ()
 
virtual Vector< double, NDIMgrad_sdf (const Vector< double, NDIM > &x) const=0
 Returns the gradient of the signed distance from the surface (i.e., dsdf(x)/dx[i] ) More...
 
virtual double sdf (const Vector< double, NDIM > &x) const=0
 Returns the signed distance from the surface,. More...
 

Protected Attributes

coord_3d center
 the center More...
 
coord_3d radii
 the directional radii More...
 

Detailed Description

An ellipsoid (3 dimensions)

Note
LIMIT – the 3 primary axes must be x, y, and z

Constructor & Destructor Documentation

◆ SDFEllipsoid()

madness::SDFEllipsoid::SDFEllipsoid ( const coord_3d radii,
const coord_3d center 
)
inline

Constructor for ellipsoid.

Parameters
radiiThe directional radii of the ellipsoid
centerThe center of the ellipsoid

Member Function Documentation

◆ grad_sdf()

coord_3d madness::SDFEllipsoid::grad_sdf ( const coord_3d pt) const
inline

Computes the gradient of the SDF.

Parameters
ptPoint at which to compute the gradient
Returns
the gradient

References MADNESS_EXCEPTION.

◆ sdf()

double madness::SDFEllipsoid::sdf ( const coord_3d pt) const
inline

Computes the normal distance.

This SDF naively uses contours, and should be improved before serious usage.

Parameters
ptPoint at which to compute the distance from the surface
Returns
The signed distance from the surface

References center, radii, and madness::sum().

Member Data Documentation

◆ center

coord_3d madness::SDFEllipsoid::center
protected

the center

Referenced by sdf().

◆ radii

coord_3d madness::SDFEllipsoid::radii
protected

the directional radii

Referenced by sdf().


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