Class DefaultRenderableSorter
java.lang.Object
com.badlogic.gdx.graphics.g3d.utils.DefaultRenderableSorter
- All Implemented Interfaces:
RenderableSorter
,Comparator<Renderable>
public class DefaultRenderableSorter
extends Object
implements RenderableSorter, Comparator<Renderable>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
compare
(Renderable o1, Renderable o2) void
sort
(Camera camera, Array<Renderable> renderables) Sorts the array ofRenderable
instances based on some criteria, e.g.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
DefaultRenderableSorter
public DefaultRenderableSorter()
-
-
Method Details
-
sort
Description copied from interface:RenderableSorter
Sorts the array ofRenderable
instances based on some criteria, e.g. material, distance to camera etc.- Specified by:
sort
in interfaceRenderableSorter
renderables
- the array of renderables to be sorted
-
compare
- Specified by:
compare
in interfaceComparator<Renderable>
-