public static class ModelCache.Sorter extends Object implements RenderableSorter, 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. |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reversed, reverseOrder, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
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 Comparator<Renderable>
Copyright © 2016. All rights reserved.