MADNESS 0.10.1
|
A cylinder (3 dimensions) More...
#include <sdf_shape_3D.h>
Public Member Functions | |
SDFCylinder (const double radius, const double length, const coord_3d &axpt, const coord_3d &axis) | |
Constructor for cylinder. | |
coord_3d | grad_sdf (const coord_3d &pt) const |
double | sdf (const coord_3d &pt) const |
Computes the normal distance. | |
![]() | |
virtual | ~SignedDFInterface () |
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] ) | |
virtual double | sdf (const Vector< double, NDIM > &x) const=0 |
Returns the signed distance from the surface,. | |
Protected Attributes | |
double | a |
half the length of the cylinder | |
coord_3d | axis |
the axial direction of the cylinder | |
coord_3d | center |
the central axial point of the cylinder (distance a from both ends) | |
double | radius |
the radius of the cylinder | |
A cylinder (3 dimensions)
|
inline |
Constructor for cylinder.
radius | The radius of the cylinder |
length | The length of the cylinder |
axpt | The central axial point of the cylinder (equidistant from both ends) |
axis | The axial direction of the cylinder |
Computes the gradient of the SDF.
pt | Point at which to compute the gradient |
References MADNESS_EXCEPTION.
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 a, axis, center, dist(), madness::nonlinear_vector_solver(), and radius.
|
protected |
the axial direction of the cylinder
Referenced by sdf().
|
protected |
the central axial point of the cylinder (distance a from both ends)
Referenced by sdf().