Class CamDistSort

All Implemented Interfaces:
Serializable, Cloneable, Iterable<RenderState<?,?>>, Collection<RenderState<?,?>>, List<RenderState<?,?>>, RandomAccess, SequencedCollection<RenderState<?,?>>

public final class CamDistSort extends SortMethod
CamDistSort is a sorting method that sorts objects based on their distance from the camera. Objects farther from the camera are placed before those closer to the camera.
Author:
Lehlogonolo Poole
See Also:
  • Constructor Details

    • CamDistSort

      public CamDistSort()
  • Method Details

    • clear

      public void clear()
      Clears the list and re-adds all non-dirty objects from the registered listeners.
      Specified by:
      clear in interface Collection<RenderState<?,?>>
      Specified by:
      clear in interface List<RenderState<?,?>>
      Overrides:
      clear in class ArrayList<RenderState<?,?>>
    • sort

      public void sort()
      Sorts the objects in the list based on their distance from the camera. Objects farther from the camera are placed before those closer to the camera.
      Specified by:
      sort in class SortMethod
    • euclideanDist

      public double euclideanDist(@NotNull RenderState<?,?> d)