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


| Public Member Functions | |
| SDFBox (const coord_3d &length, const coord_3d ¢er) | |
| Constructor for box.  More... | |
| double | sdf (const coord_3d &pt) const | 
| Computes the normal distance.  More... | |
| coord_3d | grad_sdf (const coord_3d &pt) const | 
|  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 | lengths | 
| Half the length of each side of the box.  More... | |
| const coord_3d | center | 
| the center of the box  More... | |
A box (3 dimensions)
Constructor for box.
| length | The lengths of the box | 
| center | The center of the box | 
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. If far from the corners, the SDF is easy (similar to a plane), and is essentially what's implemented.
| pt | Point at which to compute the distance from the surface | 
References mpfr::fabs(), and max.
| 
 | protected | 
the center of the box
| 
 | protected | 
Half the length of each side of the box.
 1.8.8
 1.8.8