APIdia Launch Partner
Top Description Fields Constructors Methods
com.badlogic.gdx.graphics.g3d.particles.batches

public abstract Class BufferedParticleBatch<T extends ParticleControllerRenderData>

extends Object
implements ParticleBatch<T extends ParticleControllerRenderData>
Class Inheritance
All Implemented Interfaces
com.badlogic.gdx.graphics.g3d.particles.batches.ParticleBatch, com.badlogic.gdx.graphics.g3d.particles.ResourceData.Configurable, com.badlogic.gdx.graphics.g3d.RenderableProvider
Known Direct Subclasses
com.badlogic.gdx.graphics.g3d.particles.batches.PointSpriteParticleBatch, com.badlogic.gdx.graphics.g3d.particles.batches.BillboardParticleBatch
Imports
com.badlogic.gdx.graphics.Camera, com.badlogic.gdx.graphics.g3d.particles.ParticleSorter, com.badlogic.gdx.graphics.g3d.particles.renderers.ParticleControllerRenderData, com.badlogic.gdx.utils.Array, .ArraySupplier

Base class of all the batches requiring to buffer ParticleControllerRenderData
Author
Inferno

Field Summary

Modifier and TypeField and Description
protected int
protected Camera
protected int
protected Array<T>
protected ParticleSorter

Constructor Summary

AccessConstructor and Description
protected
BufferedParticleBatch(Class<T> type)
Deprecated

protected

Method Summary

Modifier and TypeMethod and Description
protected abstract void
allocParticlesData(int capacity)

public void
begin()

Implements com.badlogic.gdx.graphics.g3d.particles.batches.ParticleBatch.begin.

Must be called once before any drawing operation

public void
public void
end()

Implements com.badlogic.gdx.graphics.g3d.particles.batches.ParticleBatch.end.

Must be called after all the drawing operations

public void
ensureCapacity(int capacity)

Ensure the batch can contain the passed in amount of particles

protected abstract void
flush(int[]
the calculated offsets
offsets
)

Sends the data to the gpu.

public int
public ParticleSorter
public void
public void
setCamera(Camera camera)

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufferedParticlesCountback to summary
protected int bufferedParticlesCount
cameraback to summary
protected Camera camera
currentCapacityback to summary
protected int currentCapacity
renderDataback to summary
protected Array<T> renderData
sorterback to summary
protected ParticleSorter sorter

Constructor Detail

BufferedParticleBatchback to summary
protected BufferedParticleBatch(Class<T> type)

Deprecated

Annotations
@Deprecated
BufferedParticleBatchback to summary
protected BufferedParticleBatch(ArraySupplier<T[]> arraySupplier)

Method Detail

allocParticlesDataback to summary
protected abstract void allocParticlesData(int capacity)
beginback to summary
public void begin()

Implements com.badlogic.gdx.graphics.g3d.particles.batches.ParticleBatch.begin.

Doc from com.badlogic.gdx.graphics.g3d.particles.batches.ParticleBatch.begin.

Must be called once before any drawing operation

drawback to summary
public void draw(T data)

Implements com.badlogic.gdx.graphics.g3d.particles.batches.ParticleBatch.draw.

Annotations
@Override
endback to summary
public void end()

Implements com.badlogic.gdx.graphics.g3d.particles.batches.ParticleBatch.end.

Doc from com.badlogic.gdx.graphics.g3d.particles.batches.ParticleBatch.end.

Must be called after all the drawing operations

ensureCapacityback to summary
public void ensureCapacity(int capacity)

Ensure the batch can contain the passed in amount of particles

flushback to summary
protected abstract void flush(int[] offsets)

Sends the data to the gpu. This method must use the calculated offsets to build the particles meshes. The offsets represent the position at which a particle should be placed into the vertex array.

Parameters
offsets:int[]

the calculated offsets

getBufferedCountback to summary
public int getBufferedCount()
getSorterback to summary
public ParticleSorter getSorter()
resetCapacityback to summary
public void resetCapacity()
setCameraback to summary
public void setCamera(Camera camera)
setSorterback to summary
public void setSorter(ParticleSorter sorter)