Method RayLineDistance
RayLineDistance(float3, float3, float3, float3)
Returns the shortest distance between a ray and line segment as a direction and magnitude.
Declaration
public static float3 RayLineDistance(float3 ro, float3 rd, float3 a, float3 b)
Parameters
Type | Name | Description |
---|---|---|
float3 | ro | The ray origin point. |
float3 | rd | The ray direction (normalized vector). |
float3 | a | The line start point. |
float3 | b | The line end point. |
Returns
Type | Description |
---|---|
float3 | Returns the shortest distance between a ray and line segment as a direction and magnitude. |