Click or drag to resize
Ab4d.SharpEngine logo

LineSelectorDataCalculateViewPositions Method

CalculateViewPositions method converts the 3D line positions into 2D positions on the screen that can be used for calculating distance to specified 2D position. This method must be called before GetClosestDistance(Vector2, Single) or GetClosestPositionOnLine(Vector3, Vector3) methods can be called. The SceneView property must be set before calling this method. When calling CalculateViewPositions on multiple instances of LineSelectorData, it is recommended to use CalculateViewPositions that takes worldToViewMatrix and dpi scale. This is faster because SceneView.GetWorldToViewportMatrix is called only once.

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 3.0.9208+3b2441d6a11f923f2600f40f4296bdc3d8b46035
Syntax
C#
public void CalculateViewPositions()
See Also