Method ConvertIndexUnit
ConvertIndexUnit<T>(T, float, PathIndexUnit)
Given a normalized interpolation ratio, calculate the associated interpolation value in another PathIndexUnit regarding a specific spline.
Declaration
public static float ConvertIndexUnit<T>(this T spline, float t, PathIndexUnit targetPathUnit) where T : ISpline
Parameters
| Type | Name | Description |
|---|---|---|
| T | spline | The Spline to use for the conversion. |
| float | t | Normalized interpolation ratio (0 to 1). |
| PathIndexUnit | targetPathUnit | The PathIndexUnit to which |
Returns
| Type | Description |
|---|---|
| float | The interpolation value converted to targetPathUnit. |
Type Parameters
| Name | Description |
|---|---|
| T | A type implementing ISpline. |
ConvertIndexUnit<T>(T, float, PathIndexUnit, PathIndexUnit)
Given an interpolation value using one of the various PathIndexUnit types, calculate the associated interpolation value in another PathIndexUnit regarding a specific spline.
Declaration
public static float ConvertIndexUnit<T>(this T spline, float value, PathIndexUnit fromPathUnit, PathIndexUnit targetPathUnit) where T : ISpline
Parameters
| Type | Name | Description |
|---|---|---|
| T | spline | The spline to use for the conversion. |
| float | value | Interpolation value in the original PathIndexUnit |
| PathIndexUnit | fromPathUnit | The PathIndexUnit for the original interpolation value type. |
| PathIndexUnit | targetPathUnit | The PathIndexUnit to which |
Returns
| Type | Description |
|---|---|
| float | The interpolation value converted to targetPathUnit. |
Type Parameters
| Name | Description |
|---|---|
| T | A type implementing ISpline. |