public static class ModelCache.Sorter extends java.lang.Object implements RenderableSorter, java.util.Comparator<Renderable>
RenderableSorter
that sorts by vertex attributes, material attributes and primitive types (in that order), so that
meshes can be easily merged.Constructor and Description |
---|
Sorter() |
Modifier and Type | Method and Description |
---|---|
int |
compare(Renderable arg0,
Renderable arg1) |
void |
sort(Camera camera,
Array<Renderable> renderables)
Sorts the array of
Renderable instances based on some criteria, e.g. |
public void sort(Camera camera, Array<Renderable> renderables)
RenderableSorter
Renderable
instances based on some criteria, e.g. material, distance to camera etc.sort
in interface RenderableSorter
renderables
- the array of renderables to be sortedpublic int compare(Renderable arg0, Renderable arg1)
compare
in interface java.util.Comparator<Renderable>