MathUtilities.DistanceOfPointToLine Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
DistanceOfPointToLine(Ray, Vector3) |
find unsigned distance of 3D point to an infinite line |
DistanceOfPointToLine(Vector3, Vector3, Vector3) |
Returns the distance between a point and an infinite line defined by two points; linePointA and linePointB |
find unsigned distance of 3D point to an infinite line
public:
static float DistanceOfPointToLine(UnityEngine::Ray ray, UnityEngine::Vector3 point);
public static float DistanceOfPointToLine (UnityEngine.Ray ray, UnityEngine.Vector3 point);
static member DistanceOfPointToLine : UnityEngine.Ray * UnityEngine.Vector3 -> single
Public Shared Function DistanceOfPointToLine (ray As Ray, point As Vector3) As Single
Parameters
- ray
- UnityEngine.Ray
ray that specifies an infinite line
- point
- UnityEngine.Vector3
3D point
Returns
unsigned perpendicular distance from point to line
Applies to
MRTK2 Unity 2018 2.7.0 és más verziók
Termék | Verziók |
---|---|
MRTK2 Unity 2018 | 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0 |
MRTK2 Unity 2019 | 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0 |
MRTK2 Unity 2020 | 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0 |
Returns the distance between a point and an infinite line defined by two points; linePointA and linePointB
public:
static float DistanceOfPointToLine(UnityEngine::Vector3 point, UnityEngine::Vector3 linePointA, UnityEngine::Vector3 linePointB);
public static float DistanceOfPointToLine (UnityEngine.Vector3 point, UnityEngine.Vector3 linePointA, UnityEngine.Vector3 linePointB);
static member DistanceOfPointToLine : UnityEngine.Vector3 * UnityEngine.Vector3 * UnityEngine.Vector3 -> single
Public Shared Function DistanceOfPointToLine (point As Vector3, linePointA As Vector3, linePointB As Vector3) As Single
Parameters
- point
- UnityEngine.Vector3
- linePointA
- UnityEngine.Vector3
- linePointB
- UnityEngine.Vector3
Returns
Applies to
MRTK2 Unity 2018 2.7.0 és más verziók
Termék | Verziók |
---|---|
MRTK2 Unity 2018 | 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0 |
MRTK2 Unity 2019 | 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0 |
MRTK2 Unity 2020 | 2.5.2, 2.5.3, 2.5.4, 2.6.0, 2.7.0, 2.8.0 |