Signed Distance Fields 1.0
|
Generic planar primitives. ,. More...
#include <sdf.h>
Public Member Functions | |
SDFPrimitive2 () | |
Create a primitive. | |
virtual | ~SDFPrimitive2 () |
Destructor. | |
virtual double | Signed (const Vector2 &) const |
Compute the signed distance function. More... | |
Public Member Functions inherited from SDFNode2 | |
SDFNode2 () | |
Create a generic node. More... | |
virtual | ~SDFNode2 () |
Destructor. | |
virtual int | Memory () const |
Return the size of a sub-tree. | |
virtual double | K () const |
Return the Lipschitz constant of the node. More... | |
Box2 | GetBox () const |
Return the bounding box of the node. | |
virtual int | Nodes () const |
Compute the number of nodes in the sub-tree. | |
Additional Inherited Members | |
Protected Attributes inherited from SDFNode2 | |
Box2 | box |
Box bounding the surface. | |
double | k |
Lipschitz constant. | |
Static Protected Attributes inherited from SDFNode2 | |
static constexpr double | Epsilon = 0.01 |
Small constant used for bounding volumes. | |
Generic planar primitives. ,.
|
virtual |
Compute the signed distance function.
By default compute the signed distance to the bounding box of the primitive.
p | Point. |
Reimplemented from SDFNode2.
Reimplemented in SDFEuclidean2, SDFDisc2, SDFHexagon2, SDFPentagon2, SDFBox2, SDFQuadricCurveSet2, SDFCubicCurveSet2, SDFEllipse2, SDFPolygon2, SDFConvex2, SDFCircleArc2, SDFIsoceleTrapezoid2, SDFCapsule2, SDFHemiDisc2, SDFCircle2, and SDFQuadricCurveSetThick2.