Signed Distance Fields 1.0
|
Base planar signed distance node. ,. More...
#include <sdf.h>
Public Member Functions | |
SDFNode2 () | |
Create a generic node. More... | |
virtual | ~SDFNode2 () |
Destructor. | |
virtual double | Signed (const Vector2 &) const |
Compute the signed distance. More... | |
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. | |
Protected Attributes | |
Box2 | box |
Box bounding the surface. | |
double | k |
Lipschitz constant. | |
Static Protected Attributes | |
static constexpr double | Epsilon = 0.01 |
Small constant used for bounding volumes. | |
Base planar signed distance node. ,.
|
explicit |
Create a generic node.
Internally set Lipschitz bound to 1.0.
|
virtual |
Return the Lipschitz constant of the node.
By default, nodes are considered as signed Euclidean distance functions, and the Lipschitz consistant is λ=1.
Reimplemented in SDFUnary2.
|
virtual |
Compute the signed distance.
p | Point. |
Reimplemented in SDFPrimitive2, SDFEuclidean2, SDFDisc2, SDFHexagon2, SDFPentagon2, SDFBox2, SDFQuadricCurveSet2, SDFCubicCurveSet2, SDFEllipse2, SDFPolygon2, SDFConvex2, SDFCircleArc2, SDFIsoceleTrapezoid2, SDFCapsule2, SDFHemiDisc2, SDFCircle2, SDFQuadricCurveSetThick2, SDFUnary2, SDFNoise2, SDFTurbulence2, SDFThickSurface2, SDFRound2, SDFRotate2, SDFTranslate2, SDFScale2, SDFUniformScale2, SDFPlanarSymmetry2, SDFSmoothIntersection2, SDFSmoothDifference2, SDFSmoothUnion2, SDFDifference2, SDFUnion2, and SDFIntersection2.