/** * Generates arc lengths which are required if you wish to have {@link #setConstantSpeed(boolean) constant speed} * interpolation. * * @param step * 'See Also:' method for more info. * @param reverse * <code>true</code> to also generate a reverse look up table. This is only required if you plan to use * the {@link ComplexSpatialController.RepeatType#CYCLE} repeat type. * @see ArcLengthTable#generate(int, boolean) */ public void generateArcLengths(final int step, final boolean reverse) { _arcLengths = new ArcLengthTable(getCurve()); _arcLengths.generate(step, false); if (reverse) { _arcLengthsReverse = new ArcLengthTable(getCurve()); _arcLengthsReverse.generate(step, true); } }
/** * Generates arc lengths which are required if you wish to have {@link #setConstantSpeed(boolean) constant speed} * interpolation. * * @param step * 'See Also:' method for more info. * @param reverse * <code>true</code> to also generate a reverse look up table. This is only required if you plan to use * the {@link ComplexSpatialController.RepeatType#CYCLE} repeat type. * @see ArcLengthTable#generate(int, boolean) */ public void generateArcLengths(final int step, final boolean reverse) { _arcLengths = new ArcLengthTable(getCurve()); _arcLengths.generate(step, false); if (reverse) { _arcLengthsReverse = new ArcLengthTable(getCurve()); _arcLengthsReverse.generate(step, true); } }
@Override protected Vector3 interpolateVectors(final ReadOnlyVector3 from, final ReadOnlyVector3 to, final double delta, final Vector3 target) { assert (null != from) : "parameter 'from' can not be null"; assert (null != to) : "parameter 'to' can not be null"; final ReadOnlyVector3 p0 = getControlPointStart(); final ReadOnlyVector3 p3 = getCotnrolPointEnd(); final Spline spline = getCurve().getSpline(); return spline.interpolate(p0, from, to, p3, delta, target); }
@Override protected Vector3 interpolateVectors(final ReadOnlyVector3 from, final ReadOnlyVector3 to, final double delta, final Vector3 target) { assert (null != from) : "parameter 'from' can not be null"; assert (null != to) : "parameter 'to' can not be null"; final ReadOnlyVector3 p0 = getControlPointStart(); final ReadOnlyVector3 p3 = getCotnrolPointEnd(); final Spline spline = getCurve().getSpline(); return spline.interpolate(p0, from, to, p3, delta, target); }