Package com.jme3.renderer.queue
Class GeometryList
java.lang.Object
com.jme3.renderer.queue.GeometryList
This class is a special purpose list of
Geometry
objects for render
queuing.-
Constructor Summary
ConstructorDescriptionGeometryList
(GeometryComparator comparator) Initializes the GeometryList to use the givenGeometryComparator
to use for comparing geometries. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a geometry to the list.void
clear()
Resets list size to 0.get
(int index) Returns the element at the given index.Returns the GeometryComparator that this Geometry list uses for sorting.iterator()
void
Sets the element at the given index.void
Set the camera that will be set on the geometry comparators viaGeometryComparator.setCamera(com.jme3.renderer.Camera)
.void
setComparator
(GeometryComparator comparator) int
size()
Returns the number of elements in this GeometryList.void
sort()
Sorts the elements in the list according to their Comparator.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
GeometryList
Initializes the GeometryList to use the givenGeometryComparator
to use for comparing geometries.- Parameters:
comparator
- The comparator to use.
-
-
Method Details
-
setComparator
-
getComparator
Returns the GeometryComparator that this Geometry list uses for sorting.- Returns:
- the pre-existing instance
-
setCamera
Set the camera that will be set on the geometry comparators viaGeometryComparator.setCamera(com.jme3.renderer.Camera)
.- Parameters:
cam
- Camera to use for sorting.
-
size
public int size()Returns the number of elements in this GeometryList.- Returns:
- Number of elements in the list
-
set
Sets the element at the given index.- Parameters:
index
- The index to setvalue
- The value
-
get
Returns the element at the given index.- Parameters:
index
- The index to lookup- Returns:
- Geometry at the index
-
add
Adds a geometry to the list. List size is doubled if there is no room.- Parameters:
g
- The geometry to add.
-
clear
public void clear()Resets list size to 0. -
sort
public void sort()Sorts the elements in the list according to their Comparator. -
iterator
-