Click or drag to resize
AB4D logo

LineSelectorDataGetClosestDistance(Point, Int32) Method

GetClosestDistance method calculates the closest distance of the line used to create this LineSelectorData to the specified position. This method also sets LastDistance, LastLinePositionIndex and LastClosestPositionOnLine properties. Before calling this method the CalculateScreenSpacePositions method must be called. This method must not be called when CheckBoundingBox is true. In this case use the method that also takes maxSelectionDistance as parameter.

Namespace: Ab3d.Utilities
Assembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.1.8864.1045
Syntax
C#
public double GetClosestDistance(
	Point screenPosition,
	out int linePositionIndex
)

Parameters

screenPosition  Point
2D position that will be used to calculate the distance to this line
linePositionIndex  Int32
returns the index of the line segments that is closest to the specified position

Return Value

Double
distance of this line to the specified position
See Also