Package 

Class AbstractBuffer


  • 
    public abstract class AbstractBuffer<T extends Object>
    
                        

    Buffer class to boost performance while drawing. Concept: Replace instead of recreate.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final FloatArray buffer
    • Method Summary

      Modifier and Type Method Description
      final Unit limitFrom(Integer fromGiven) limits the drawing on the x-axis
      final Unit limitTo(Integer toGiven) limits the drawing on the x-axis
      final Unit reset() Resets the buffer index to 0 and makes the buffer reusable.
      final Integer size() Returns the size (length) of the buffer array.
      final Unit setPhases(Float phaseX, Float phaseY) Set the phases used for animations.
      abstract Unit feed(T data) Builds up the buffer with the provided data and resets the buffer-index after feed-completion.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractBuffer

        AbstractBuffer(Integer size)
    • Method Detail

      • reset

         final Unit reset()

        Resets the buffer index to 0 and makes the buffer reusable.

      • size

         final Integer size()

        Returns the size (length) of the buffer array.

      • feed

         abstract Unit feed(T data)

        Builds up the buffer with the provided data and resets the buffer-index after feed-completion. This needs to run FAST.