Class AnimGroup.SineLerp

  • All Implemented Interfaces:
    AnimGroup.LerpFunc
    Enclosing class:
    AnimGroup

    public static class AnimGroup.SineLerp
    extends Object
    implements AnimGroup.LerpFunc
    Sine target AnimGroup.LerpFunc, approaching AnimGroup.ShapeData's target position utilizing the angular value for sine amplitude towards the given normalized direction vector.

    The sine amplitude is flattened towards target.

    Implementation uses the current shape position and relative time duration since last call to interpolate, hence allows rugged utilization even if shapes are dragged around.

    • Constructor Detail

      • SineLerp

        public SineLerp​(com.jogamp.math.Vec3f sineDir,
                        float sineScale,
                        float shapeStep)
        New sine AnimGroup.LerpFunc instance
        Parameters:
        sineDir - normalized vector for sine amplitude direction
        sineScale - sine scale factor to amplify effect
        shapeStep - shape index idx factor for dt_s, amplifying angular distance between each shape. Golden ratio 1.618f reveals dynamic characteristics.