本文整理汇总了C#中ICurve.ClosestParameter方法的典型用法代码示例。如果您正苦于以下问题:C# ICurve.ClosestParameter方法的具体用法?C# ICurve.ClosestParameter怎么用?C# ICurve.ClosestParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICurve
的用法示例。
在下文中一共展示了ICurve.ClosestParameter方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExtendPolylineStartToClusterBoundary
static void ExtendPolylineStartToClusterBoundary(Polyline poly, ICurve curve) {
var par = curve.ClosestParameter(poly.Start);
poly.PrependPoint(curve[par]);
}
示例2: ClosestPoint
/// <summary>
/// gets the point on the curve that is closest to the given point
/// </summary>
/// <param name="curve">the curve to examine</param>
/// <param name="location">the target point</param>
/// <returns>the closest point</returns>
public static Point ClosestPoint(ICurve curve, Point location) {
ValidateArg.IsNotNull(curve, "curve");
return curve[curve.ClosestParameter(location)];
}
示例3: ExtendPolylineEndToClusterBoundary
static void ExtendPolylineEndToClusterBoundary(Polyline poly, ICurve curve) {
var par = curve.ClosestParameter(poly.End);
poly.AddPoint(curve[par]);
}
示例4: ClosestParameterWithPoint
public static double ClosestParameterWithPoint(ICurve curve, Point location, out Point pointOnCurve) {
ValidateArg.IsNotNull(curve, "curve");
double t = curve.ClosestParameter(location);
pointOnCurve = curve[t];
return t;
}