Documentation of 'medusa.georgios.color_factory.CubicBezierCurve3f' Java class
CubicBezierCurve3f
medusa.georgios.color_factory

Class CubicBezierCurve3f



  • public final class CubicBezierCurve3f
    extends AbstractCurve3f
    Provides an interpolation mechanism using cubic bezier segments to compose a curve. The appropriate segments are not pre-calculated. Instead they are computed on demand. Simply plug in a vector of coordinates using setCoordinate( Vector coordinates ) . The curve is parameterized from 0 to 1. Provide additional parameters to control the curve. The members prePoint and postPoint are used for computing C1 continuous transitions between neighboring segments. You can explicitly set the initial and final tangent to force the curves tangent at parameter 0 and 1. Note that the tangent setting is dominant over the pre- and post-point setting.
    • Field Detail

      • prePoint

        public Tuple3f prePoint
        Plug-in for a point that is appropriate for extrapolation
      • postPoint

        public Tuple3f postPoint
        Plug-in for a point that is appropriate for extrapolation
      • initialTangent

        public Tuple3f initialTangent
        Plug-in for a the initial tangent
      • finalTangent

        public Tuple3f finalTangent
        Plug-in for a the final tangent
      • tangentScale

        public float tangentScale
        Scale factor for the tangents computed for C1 continuity
    • Constructor Detail

      • CubicBezierCurve3f

        public CubicBezierCurve3f()
    • Method Detail

      • setTangents

        public void setTangents(java.util.ArrayList tangents)
        Sets the tangents vector of the cubic bezier curve. Note that the number of tangents must be at least the same as the numbers of points provided to the curve.
        Parameters:
        tangents - The new tangents value.
      • computeTangent

        public final Vector3f computeTangent(float parameter)
        Computes the tangent of the curve at parameter parameter .
        Specified by:
        computeTangent in class AbstractCurve3f
        Parameters:
        parameter - for the computation.
        Returns:
        Vector3f - the computed tangent.
      • computePoint

        public final Point3f computePoint(float parameter)
        Computes the point coordinate of the curve at parameter parameter .
        Specified by:
        computePoint in class AbstractCurve3f
        Parameters:
        parameter - for the computation.
        Returns:
        Point3f - the computed coordinate.

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.