|
◆ quadSplinesHit()
float mgnear::quadSplinesHit |
( |
int |
n, |
|
|
const Point2d * |
knots, |
|
|
bool |
closed, |
|
|
const Point2d & |
pt, |
|
|
float |
tol, |
|
|
Point2d & |
nearpt, |
|
|
int & |
segment |
|
) |
| |
|
static |
计算点到二次样条曲线的最近距离
- 参数
-
[in] | n | 二次样条曲线的控制点的点数 |
[in] | knots | 控制点坐标数组,元素个数为n |
[in] | closed | 是否为闭合曲线 |
[in] | pt | 曲线段外给定的点 |
[in] | tol | 距离公差,正数,超出则不计算最近点 |
[out] | nearpt | 曲线上的最近点 |
[out] | segment | 最近点所在曲线段的序号,[0,n-2],闭合时为[0,n-1],负数表示失败 |
- 返回
- 给定的点到最近点的距离,失败时为极大数
|