Class CamDistSort
java.lang.Object
java.util.AbstractCollection<RenderState<?,?>>
java.util.AbstractList<RenderState<?,?>>
java.util.ArrayList<RenderState<?,?>>
com.j3d.engine.scene.draw.methods.SortMethod
com.j3d.engine.scene.draw.methods.CamDistSort
- All Implemented Interfaces:
Serializable, Cloneable, Iterable<RenderState<?,?>>, Collection<RenderState<?, ?>>, List<RenderState<?, ?>>, RandomAccess, SequencedCollection<RenderState<?, ?>>
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:
-
Field Summary
Fields inherited from class AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Clears the list and re-adds all non-dirty objects from the registered listeners.doubleeuclideanDist(RenderState<?, ?> d) voidsort()Sorts the objects in the list based on their distance from the camera.Methods inherited from class SortMethod
add, backFaceCulledMethods inherited from class ArrayList
add, addAll, addAll, addFirst, addLast, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class AbstractCollection
containsAll, toStringMethods inherited from interface Collection
parallelStream, stream, toArrayMethods inherited from interface List
containsAll, reversed
-
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:
clearin interfaceCollection<RenderState<?,?>> - Specified by:
clearin interfaceList<RenderState<?,?>> - Overrides:
clearin classArrayList<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:
sortin classSortMethod
-
euclideanDist
-