com.jme3.renderer
Class IDList

java.lang.Object
  extended by com.jme3.renderer.IDList

public class IDList
extends java.lang.Object

A specialized data-structure used to optimize state changes of "slot" based state.


Field Summary
 int newLen
           
 int[] newList
           
 int oldLen
           
 int[] oldList
           
 
Constructor Summary
IDList()
           
 
Method Summary
 void copyNewToOld()
          Copies the new list to the old list, and clears the new list.
 boolean moveToNew(int idx)
          Adds an index to the new list.
 void print()
          Prints the contents of the lists
 void reset()
          Reset all states to zero
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

newList

public int[] newList

oldList

public int[] oldList

newLen

public int newLen

oldLen

public int oldLen
Constructor Detail

IDList

public IDList()
Method Detail

reset

public void reset()
Reset 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