Class ParticleSorter
java.lang.Object
com.badlogic.gdx.graphics.g3d.particles.ParticleSorter
- Direct Known Subclasses:
ParticleSorter.Distance
,ParticleSorter.None
This class is used by particle batches to sort the particles before rendering.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
This class will sort all the particles using the distance from camera.static class
Using this class will not apply sorting -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
ensureCapacity
(int capacity) This method is called when the batch has increased the underlying particle buffer.void
abstract <T extends ParticleControllerRenderData>
int[]
-
Field Details
-
camera
-
-
Constructor Details
-
ParticleSorter
public ParticleSorter()
-
-
Method Details
-
sort
- 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).
-
setCamera
-
ensureCapacity
public void ensureCapacity(int capacity) This 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)
-