Class DefaultIntRenderableSorter

java.lang.Object
gaiasky.util.gdx.DefaultIntRenderableSorter
All Implemented Interfaces:
IntRenderableSorter, java.util.Comparator<IntRenderable>

public class DefaultIntRenderableSorter
extends java.lang.Object
implements IntRenderableSorter, java.util.Comparator<IntRenderable>
  • Constructor Summary

    Constructors
    Constructor Description
    DefaultIntRenderableSorter()  
  • Method Summary

    Modifier and Type Method Description
    int compare​(IntRenderable o1, IntRenderable o2)  
    void sort​(com.badlogic.gdx.graphics.Camera camera, com.badlogic.gdx.utils.Array<IntRenderable> renderables)
    Sorts the array of IntRenderable 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

    • DefaultIntRenderableSorter

      public DefaultIntRenderableSorter()
  • Method Details

    • sort

      public void sort​(com.badlogic.gdx.graphics.Camera camera, com.badlogic.gdx.utils.Array<IntRenderable> renderables)
      Description copied from interface: IntRenderableSorter
      Sorts the array of IntRenderable instances based on some criteria, e.g. material, distance to camera etc.
      Specified by:
      sort in interface IntRenderableSorter
      renderables - the array of renderables to be sorted
    • compare

      public int compare​(IntRenderable o1, IntRenderable o2)
      Specified by:
      compare in interface java.util.Comparator<IntRenderable>