Method GetPointAtLinearDistance
GetPointAtLinearDistance<T>(T, float, float, out float)
Given a Spline and interpolation ratio, calculate the 3d point at a linear distance from point at spline.EvaluatePosition(t). Returns the corresponding time associated to this 3d position on the Spline.
Declaration
public static float3 GetPointAtLinearDistance<T>(this T spline, float fromT, float relativeDistance, out float resultPointT) where T : ISpline
Parameters
Type | Name | Description |
---|---|---|
T | spline | The Spline on which to compute the point. |
float | fromT | The Spline interpolation ratio |
float | relativeDistance | The relative distance at which the new point should be placed. A negative value will compute a point at a
|
float | resultPointT | The normalized interpolation ratio of the resulting point. |
Returns
Type | Description |
---|---|
float3 | The 3d point from the spline located at a linear distance from the point at t. |
Type Parameters
Name | Description |
---|---|
T | A type implementing ISpline. |