| PiecewiseCurveFTPoint, TCurveKeyGetKeyIndex Method |
Gets the index of the curve key before or at the given parameter value.
Namespace: DigitalRune.Mathematics.InterpolationAssembly: DigitalRune.Mathematics (in DigitalRune.Mathematics.dll) Version: 1.14.0.0 (1.14.0.14427)
Syntax public override int GetKeyIndex(
float parameter
)
Public Overrides Function GetKeyIndex (
parameter As Single
) As Integer
public:
virtual int GetKeyIndex(
float parameter
) override
abstract GetKeyIndex :
parameter : float32 -> int
override GetKeyIndex :
parameter : float32 -> int
Parameters
- parameter
- Type: SystemSingle
The parameter value.
Return Value
Type:
Int32
The index of the curve key or
-1 if no suitable curve key exists.
Remarks
This method assumes that the curve keys are sorted and returns index of the key with the
largest
Parameter value that is less than or equal to
the given parameter value. The parameter will lie between the key at the returned index and
the key at index + 1. If
parameter is beyond the start or end of the
path, a key index according to
PreLoop
and
PostLoop is returned.
See Also