com.graphbuilder.curve
Class CatmullRomSpline
java.lang.Object
com.graphbuilder.curve.Curve
com.graphbuilder.curve.ParametricCurve
com.graphbuilder.curve.CatmullRomSpline
- public class CatmullRomSpline
- extends ParametricCurve
The CatmullRomSpline is equal to the CardinalSpline with the value of alpha fixed at 0.5.
The implementation for the CatmullRomSpline is about 10% faster then the CardinalSpline
implementation.
- See Also:
CardinalSpline
Method Summary |
void |
appendTo(MultiPath mp)
The requirements for this curve are the group-iterator must be in-range and have a group size of at least 4. |
protected void |
eval(double[] p)
The eval method evaluates a point on a curve given a parametric value "t". |
int |
getSampleLimit()
Returns a value of 1. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CatmullRomSpline
public CatmullRomSpline(ControlPath cp,
GroupIterator gi)
eval
protected void eval(double[] p)
- Description copied from class:
ParametricCurve
- The eval method evaluates a point on a curve given a parametric value "t". The parametric
value "t" is stored in the last index location of the specified double array. This value
should not be changed. The dimension of the point to evaluate is p.length - 1. The result
of the evaluation is placed in index locations 0 .. p.length - 2 (inclusive).
The eval method should remain protected except for those curves that do no need any
preparation to be done in the appendTo method.
- Specified by:
eval
in class ParametricCurve
getSampleLimit
public int getSampleLimit()
- Returns a value of 1.
- Specified by:
getSampleLimit
in class ParametricCurve
appendTo
public void appendTo(MultiPath mp)
- The requirements for this curve are the group-iterator must be in-range and have a group size of at least 4.
If these requirements are not met then this method returns quietly.
- Specified by:
appendTo
in class Curve
- See Also:
MultiPath
,
BinaryCurveApproximationAlgorithm