A cylinder (3 dimensions)
More...
#include <sdf_shape_3D.h>
|
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)
◆ SDFCylinder()
madness::SDFCylinder::SDFCylinder |
( |
const double |
radius, |
|
|
const double |
length, |
|
|
const coord_3d & |
axpt, |
|
|
const coord_3d & |
axis |
|
) |
| |
|
inline |
Constructor for cylinder.
- Parameters
-
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 |
◆ grad_sdf()
Computes the gradient of the SDF.
- Parameters
-
pt | Point at which to compute the gradient |
- Returns
- the gradient
References MADNESS_EXCEPTION.
◆ sdf()
double madness::SDFCylinder::sdf |
( |
const coord_3d & |
pt | ) |
const |
|
inline |
Computes the normal distance.
This SDF naively uses contours, and should be improved before serious usage.
- Parameters
-
pt | Point at which to compute the distance from the surface |
- Returns
- The signed distance from the surface
References a, axis, center, dist(), and radius.
double madness::SDFCylinder::a |
|
protected |
half the length of the cylinder
Referenced by sdf().
◆ axis
the axial direction of the cylinder
Referenced by sdf().
◆ center
the central axial point of the cylinder (distance a from both ends)
Referenced by sdf().
◆ radius
double madness::SDFCylinder::radius |
|
protected |
the radius of the cylinder
Referenced by sdf().
The documentation for this class was generated from the following file: