T - The data the buffer accepts to be fed with.public abstract class AbstractBuffer<T>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
float[] |
buffer
float-buffer that holds the data points to draw, order: x,y,x,y,...
|
protected int |
index
index in the buffer
|
protected int |
mFrom
indicates from which x-index the visible data begins
|
protected int |
mTo
indicates to which x-index the visible data ranges
|
protected float |
phaseX
animation phase x-axis
|
protected float |
phaseY
animation phase y-axis
|
| Constructor and Description |
|---|
AbstractBuffer(int size)
Initialization with buffer-size.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
feed(T data)
Builds up the buffer with the provided data and resets the buffer-index
after feed-completion.
|
void |
limitFrom(int from)
limits the drawing on the x-axis
|
void |
limitTo(int to)
limits the drawing on the x-axis
|
void |
reset()
Resets the buffer index to 0 and makes the buffer reusable.
|
void |
setPhases(float phaseX,
float phaseY)
Set the phases used for animations.
|
int |
size()
Returns the size (length) of the buffer array.
|
protected int index
public final float[] buffer
protected float phaseX
protected float phaseY
protected int mFrom
protected int mTo
public AbstractBuffer(int size)
size - public void limitFrom(int from)
public void limitTo(int to)
public void reset()
public int size()
public void setPhases(float phaseX,
float phaseY)
phaseX - phaseY - public abstract void feed(T data)
data -