Class CamDistSort
java.lang.Object
java.util.AbstractCollection<RenderState<?,?>>
java.util.AbstractList<RenderState<?,?>>
java.util.ArrayList<RenderState<?,?>>
com.j3d.engine.scene.draw.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 GTri objects based on their distance from the camera.
GTri objects farther from the camera are placed before those closer to the camera.
- Author:
- Lehlogonolo Poole
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(RenderState<?, ?> gTri) voidclear()Clears the list and re-adds all non-dirty GTri objects from the registered listeners.doubleeuclideanDist(RenderState<?, ?> d) voidsort()Sorts the GTri objects in the list based on their distance from the camera.Methods inherited from class com.j3d.engine.scene.draw.SortMethod
backFaceCulledMethods inherited from class java.util.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 java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll, reversed
-
Constructor Details
-
CamDistSort
public CamDistSort()
-
-
Method Details
-
add
- Specified by:
addin interfaceCollection<RenderState<?,?>> - Specified by:
addin interfaceList<RenderState<?,?>> - Overrides:
addin classSortMethod
-
clear
public void clear()Clears the list and re-adds all non-dirty GTri 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 GTri objects in the list based on their distance from the camera. GTri objects farther from the camera are placed before those closer to the camera.- Specified by:
sortin classSortMethod
-
euclideanDist
-