Click or drag to resize
AB4D logo

LineSelectorData Methods

The LineSelectorData type exposes the following members.

Methods
 NameDescription
Public methodCalculateScreenSpacePositions(BaseCamera) CalculateScreenSpacePositions method converts the 3D line positions into 2D positions that can be used for calculating distance to specified 2D position. This method must be called before GetClosestDistance(Point) or GetClosestDistance(Point, Int32) can be called. This method can be called only on the UI thread. To call this method in multiple threads, use the method override that takes Matrix3D and Transform3D as parameters.
Public methodCalculateScreenSpacePositions(Matrix3D, Transform3D) CalculateScreenSpacePositions method converts the 3D line positions into 2D positions that can be used for calculating distance to specified 2D position. This method must be called before GetClosestDistance(Point) or GetClosestDistance(Point, Int32) can be called. This method takes a reference to a worldToViewport Matrix and an optional Transform3D and can be called on any thread.
Public methodGetClosestDistance(Point) 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.
Public methodGetClosestDistance(Point, Double) GetClosestDistance method calculates the closest distance of the line used to create this LineSelectorData to the specified position. In case CheckBoundingBox is true the method returns float.MaxValue when the screenPosition is outside the bounding box. This method also sets LastDistance, LastLinePositionIndex, LastClosestPositionOnLine and LastDistanceFromCamera properties. Before calling this method the CalculateScreenSpacePositions method must be called.
Public methodGetClosestDistance(Point, Int32) 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.
Public methodGetClosestDistance(Point, Double, Int32) GetClosestDistance method calculates the closest distance of the line used to create this LineSelectorData to the specified position. In case CheckBoundingBox is true (by default) the method returns float.MaxValue when the screenPosition is outside the bounding box. This method also sets LastDistance, LastLinePositionIndex and LastClosestPositionOnLine properties. Before calling this method the CalculateScreenSpacePositions method must be called.
Public methodUpdateLinePositions UpdateLinePositions method updates the 3D line positions that are used to calculate the distances. This method needs to be called when the 3D line positions are changed.
Top
See Also