Class ParticleSorter.Distance
- java.lang.Object
-
- com.badlogic.gdx.graphics.g3d.particles.ParticleSorter
-
- com.badlogic.gdx.graphics.g3d.particles.ParticleSorter.Distance
-
- Enclosing class:
- ParticleSorter
public static class ParticleSorter.Distance extends ParticleSorter
This class will sort all the particles using the distance from camera.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.badlogic.gdx.graphics.g3d.particles.ParticleSorter
ParticleSorter.Distance, ParticleSorter.None
-
-
Field Summary
-
Fields inherited from class com.badlogic.gdx.graphics.g3d.particles.ParticleSorter
camera
-
-
Constructor Summary
Constructors Constructor Description Distance()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidensureCapacity(int capacity)This method is called when the batch has increased the underlying particle buffer.voidqsort(int si, int ei)<T extends ParticleControllerRenderData>
int[]sort(Array<T> renderData)-
Methods inherited from class com.badlogic.gdx.graphics.g3d.particles.ParticleSorter
setCamera
-
-
-
-
Method Detail
-
ensureCapacity
public void ensureCapacity(int capacity)
Description copied from class:ParticleSorterThis method is called when the batch has increased the underlying particle buffer. In this way the sorter can increase the data structures used to sort the particles (i.e increase backing array size)- Overrides:
ensureCapacityin classParticleSorter
-
sort
public <T extends ParticleControllerRenderData> int[] sort(Array<T> renderData)
- Specified by:
sortin classParticleSorter- Returns:
- an array of offsets where each particle should be put in the resulting mesh (also if more than one mesh will be generated, this is an absolute offset considering a BIG output array).
-
qsort
public void qsort(int si, int ei)
-
-