public class QuadBezierDistance2d
extends java.lang.Object
Special thanks to Olivier Besson for providing the actual distance calculations: http://blog.gludion.com/2009/08/distance-to-quadratic-bezier-curve.html
Constructor and Description |
---|
QuadBezierDistance2d() |
QuadBezierDistance2d(NURBSCurve2d curve) |
Modifier and Type | Method and Description |
---|---|
double |
computeDistance(Vector2d near,
Vector2d pnt,
double maxd) |
double |
computeDistance(Vector2d near,
Vector2d pnt,
Vector4d p0,
Vector4d p1,
Vector4d p2)
This algorithim should work for 3d curves as well.
|
double |
computeInteriorDistance(Vector2d near,
Vector2d pnt) |
double |
computeMaxCurvature() |
double |
computeMaxCurvature(Vector4d p0,
Vector4d p1,
Vector4d p2)
Computes the maximum curvature for a single Bezier segment.
|
double |
getHullDistance(Point2d pnt,
Vector4d p0,
Vector4d p1,
Vector4d p2) |
void |
setCurve(NURBSCurve2d curve) |
public QuadBezierDistance2d()
public QuadBezierDistance2d(NURBSCurve2d curve)
public void setCurve(NURBSCurve2d curve)
public double computeMaxCurvature()
public double computeDistance(Vector2d near, Vector2d pnt, Vector4d p0, Vector4d p1, Vector4d p2)
public double computeMaxCurvature(Vector4d p0, Vector4d p1, Vector4d p2)