Package com.jme3.renderer
Class IDList
java.lang.Object
com.jme3.renderer.IDList
A specialized data-structure used to optimize state changes of "slot"
based state.
-
Field Details
-
newList
public int[] newListIndices belonging to the "new list". Valid data in elements 0 through newLen-1 only! -
oldList
public int[] oldListIndices belonging to the "old list". Valid data in elements 0 through oldLen-1 only! -
newLen
public int newLenThe number of valid elements in the new list. -
oldLen
public int oldLenThe number of valid elements in the old list.
-
-
Constructor Details
-
IDList
public IDList()
-
-
Method Details
-
reset
public void reset()Resets all states to zero. -
moveToNew
public boolean moveToNew(int idx) Adds an index to the new list. If the index was not in the old list, false is returned, if the index was in the old list, it is removed from the old list and true is returned.- Parameters:
idx
- The index to move- Returns:
- True if it existed in old list and was removed from there, false otherwise.
-
copyNewToOld
public void copyNewToOld()Copies the new list to the old list, and clears the new list. -
print
public void print()Prints the contents of the lists.
-