Sets the interpolation delegate to be used
Namespace:
Equis.JanusToolkitAssembly: Janus (in Janus.dll)
Syntax
| C# |
|---|
protected virtual void SetInterpolationType( int type ) |
Parameters
- type
- Type: System..::..Int32
Interpolation type. Possible values are: InterpolationTypes.stepping, InterpolationTypes.linear and InterpolationTypes.quadratic
Remarks
Virtual method - classes inheriting from TimeLine<ValueType> must override this method
This method sets the interpolation delegate based on the interpolation parameter passed to it
Application programs invoke this method by setting the InterpolationType. For example: entity1.InterpolationType = (int) PositionTimeLine.InterpolationTypes.linear;
Examples
Example of overridden method
protected override void SetInterpolationType(int type)
{
switch (type)
{
case (int)InterpolationTypes.stepping:
Interpolate = new InterpolationDelegate(SteppingExtrapolation);
break;
case (int)ExtrapolationTypes.linear:
Interpolate = new InterpolationDelegate(LinearExtrapolation);
break;
default:
Interpolate = new InterpolationDelegate(SteppingExtrapolation);
break;
}
}
| |