Package com.badlogic.gdx.graphics.g3d
Class ModelCache.Sorter
- java.lang.Object
-
- com.badlogic.gdx.graphics.g3d.ModelCache.Sorter
-
- All Implemented Interfaces:
RenderableSorter,java.util.Comparator<Renderable>
- Enclosing class:
- ModelCache
public static class ModelCache.Sorter extends java.lang.Object implements RenderableSorter, java.util.Comparator<Renderable>
ARenderableSorterthat sorts by vertex attributes, material attributes and primitive types (in that order), so that meshes can be easily merged.
-
-
Constructor Summary
Constructors Constructor Description Sorter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompare(Renderable arg0, Renderable arg1)voidsort(Camera camera, Array<Renderable> renderables)Sorts the array ofRenderableinstances based on some criteria, e.g.
-
-
-
Method Detail
-
sort
public void sort(Camera camera, Array<Renderable> renderables)
Description copied from interface:RenderableSorterSorts the array ofRenderableinstances based on some criteria, e.g. material, distance to camera etc.- Specified by:
sortin interfaceRenderableSorterrenderables- the array of renderables to be sorted
-
compare
public int compare(Renderable arg0, Renderable arg1)
- Specified by:
comparein interfacejava.util.Comparator<Renderable>
-
-