|
MADNESS
version 0.9
|
A cone (3 dimensions) More...
#include <sdf_shape_3D.h>


Public Member Functions | |
| SDFCone (const double c, const coord_3d &apex, const coord_3d &direc) | |
| Constructor for cone. More... | |
| double | sdf (const coord_3d &pt) const |
| Computes the normal distance. More... | |
| coord_3d | grad_sdf (const coord_3d &pt) const |
| Computes the gradient of the SDF. More... | |
Public Member Functions inherited from madness::SignedDFInterface< 3 > | |
| virtual double | sdf (const Vector< double, NDIM > &x) const =0 |
| Returns the signed distance from the surface,. More... | |
| virtual Vector< double, NDIM > | grad_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 | ~SignedDFInterface () |
Protected Attributes | |
| const coord_3d | apex |
| The apex. More... | |
| const double | c |
| The radius. More... | |
| const coord_3d | dir |
| The direction of the axis, from the apex INSIDE. More... | |
A cone (3 dimensions)
The cone is defined by
where
is along the cone's axis.
Constructor for cone.
| c | Parameter in the definition of the cone |
| apex | Apex of cone |
| direc | Oriented axis of the cone |
Computes the gradient of the SDF.
| pt | Point at which to compute the gradient |
References MADNESS_EXCEPTION.
|
inline |
Computes the normal distance.
This SDF naively uses contours, and should be improved before serious usage.
| pt | Point at which to compute the distance from the surface |
References sqrt().
|
protected |
The apex.
|
protected |
The radius.
|
protected |
The direction of the axis, from the apex INSIDE.
1.8.8