Click or drag to resize
AB4D logo

LineSelectorDataGetClosestDistance(Point) 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, LastClosestPositionOnLine and LastDistanceFromCamera 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
)

Parameters

screenPosition  Point
2D position that will be used to calculate the distance to this line

Return Value

Double
distance of this line to the specified position
See Also