private class TriangleMesh.Listener<T extends <any>>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected T |
array |
protected boolean |
dirty |
protected boolean |
dirtyInFull
Array was replaced
|
protected int |
dirtyRangeFrom |
protected int |
dirtyRangeLength |
Modifier and Type | Method and Description |
---|---|
protected void |
addDirtyRange(int from,
int length)
Adds a dirty range
|
protected void |
markDirty() |
void |
onChanged(T observableArray,
boolean sizeChanged,
int from,
int to) |
void |
setDirty(boolean dirty) |
float[] |
syncTo(float[] array,
int[] fromAndLengthIndices) |
int[] |
syncTo(int[] array,
int[] fromAndLengthIndices) |
protected final T extends <any> array
protected boolean dirty
protected boolean dirtyInFull
protected int dirtyRangeFrom
protected int dirtyRangeLength
public Listener(T array)
protected final void addDirtyRange(int from, int length)
from
- index of the first modified elementlength
- length of the modified rangeprotected void markDirty()
public void onChanged(T observableArray, boolean sizeChanged, int from, int to)
public final void setDirty(boolean dirty)
dirty
- if true, the whole collection is marked as dirty;
if false, the whole collection is marked as not-dirtypublic float[] syncTo(float[] array, int[] fromAndLengthIndices)
public int[] syncTo(int[] array, int[] fromAndLengthIndices)