Constructor and Description |
---|
GeometryList(GeometryComparator comparator)
Initializes the GeometryList to use the given
GeometryComparator
to use for comparing geometries. |
Modifier and Type | Method and Description |
---|---|
void |
add(Geometry g)
Adds a geometry to the list.
|
void |
clear()
Resets list size to 0.
|
Geometry |
get(int index)
Returns the element at the given index.
|
GeometryComparator |
getComparator()
Returns the GeometryComparator that this Geometry list uses
for sorting.
|
java.util.Iterator<Geometry> |
iterator() |
void |
set(int index,
Geometry value)
Sets the element at the given index.
|
void |
setCamera(Camera cam)
Set the camera that will be set on the geometry comparators
via
GeometryComparator.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.
|
public GeometryList(GeometryComparator comparator)
GeometryComparator
to use for comparing geometries.comparator
- The comparator to use.public void setComparator(GeometryComparator comparator)
public GeometryComparator getComparator()
public void setCamera(Camera cam)
GeometryComparator.setCamera(com.jme3.renderer.Camera)
.cam
- Camera to use for sorting.public int size()
public void set(int index, Geometry value)
index
- The index to setvalue
- The valuepublic Geometry get(int index)
index
- The index to lookuppublic void add(Geometry g)
g
- The geometry to add.public void clear()
public void sort()