protected var __b:Array
protected var __delta:Number
protected var __h:Array
protected var __hInv:Array
protected var __invalidate:Boolean
knotCount:Number [read-only]Implementation
public function get knotCount():Number
protected var __knots:Number
knots:Array [read-only]Implementation
public function get knots():Array
protected var __t:Array
protected var __u:Array
protected var __v:Array
protected var __y:Array
protected var __z:Array
public function CubicSpline()
CubicSpline() Construct a new Cubic Spline instance.
protected function __computeZ():void
protected function __insert(_xKnot:Number, _yKnot:Number, _indx:Number):voidParameters
| _xKnot:Number |
| |
| _yKnot:Number |
| |
| _indx:Number |
protected function __remove(_indx:Number):voidParameters
public function addControlPoint(_xKnot:Number, _yKnot:Number):void
addControlPoint Add/Insert a knot in a manner that maintains non-overlapping intervals. This method rearranges knot order, if necessary, to
maintain non-overlapping intervals.
Parameters
| _xKnot:Number — - x-coordinate of knot to add
|
| |
| _yKnot:Number — - y-coordinate of knot to add
|
public function deleteAllKnots():void
deleteAllKnots Delete all knots
public function eval(_xKnot:Number):Number
eval Evaluate spline at a given x-coordinate
Parameters
| _xKnot:Number — - x-coordinate to evaluate spline
|
Returns
| Number — Number: - NaN if there are no knots
- y[0] if there is only one knot
- Spline value at the input x-coordinate, if there are two or more knots
|
public function moveControlPoint(_indx:uint, _xKnot:Number, _yKnot:Number):void
moveControlPoint Move knot at the specified index within its interval
Parameters
| _indx:uint — - index of knot to replace
|
| |
| _xKnot:Number — - new x-coordinate
|
| |
| _yKnot:Number — - new y-coordinate
|
public function removeKnotAtX(_xKnot:Number):void
removeKnotAtX Delete knot at a given x-coordinate
Parameters
| _xKnot:Number — - x-coordinate of knot to delete
|
public function removePointAt(_indx:uint):void
removePointAt Delete knot at the specified index
Parameters
| _indx:uint — - index of knot to delete
|
protected static const ONE_SIXTH:Number = 0.16666666666666666