public class BillboardParticleBatch extends BufferedParticleBatch<BillboardControllerRenderData>
Modifier and Type | Class and Description |
---|---|
static class |
BillboardParticleBatch.Config |
Modifier and Type | Field and Description |
---|---|
protected static int |
directionUsage |
protected ParticleShader.AlignMode |
mode |
protected static int |
sizeAndRotationUsage |
protected Texture |
texture |
protected static Matrix3 |
TMP_M3 |
protected static Vector3 |
TMP_V1 |
protected static Vector3 |
TMP_V2 |
protected static Vector3 |
TMP_V3 |
protected static Vector3 |
TMP_V4 |
protected static Vector3 |
TMP_V5 |
protected static Vector3 |
TMP_V6 |
protected boolean |
useGPU |
bufferedParticlesCount, camera, currentCapacity, renderData, sorter
Constructor and Description |
---|
BillboardParticleBatch() |
BillboardParticleBatch(int capacity) |
BillboardParticleBatch(ParticleShader.AlignMode mode,
boolean useGPU,
int capacity) |
Modifier and Type | Method and Description |
---|---|
void |
allocParticlesData(int capacity) |
protected Renderable |
allocRenderable() |
void |
begin()
Must be called once before any drawing operation
|
protected void |
flush(int[] offsets)
Sends the data to the gpu.
|
ParticleShader.AlignMode |
getAlignMode() |
void |
getRenderables(Array<Renderable> renderables,
Pool<Renderable> pool)
Returns
Renderable instances. |
Texture |
getTexture() |
boolean |
isUseGPU() |
void |
load(AssetManager manager,
ResourceData resources) |
void |
save(AssetManager manager,
ResourceData resources) |
void |
setAlignMode(ParticleShader.AlignMode mode)
Sets the current align mode.
|
void |
setTexture(Texture texture) |
void |
setUseGpu(boolean useGPU)
Sets the current align mode.
|
void |
setVertexData()
Sets vertex attributes and size
|
draw, end, ensureCapacity, getBufferedCount, getSorter, resetCapacity, setCamera, setSorter
protected static final Vector3 TMP_V1
protected static final Vector3 TMP_V2
protected static final Vector3 TMP_V3
protected static final Vector3 TMP_V4
protected static final Vector3 TMP_V5
protected static final Vector3 TMP_V6
protected static final Matrix3 TMP_M3
protected static final int sizeAndRotationUsage
protected static final int directionUsage
protected boolean useGPU
protected ParticleShader.AlignMode mode
protected Texture texture
public BillboardParticleBatch(ParticleShader.AlignMode mode, boolean useGPU, int capacity)
public BillboardParticleBatch()
public BillboardParticleBatch(int capacity)
public void allocParticlesData(int capacity)
allocParticlesData
in class BufferedParticleBatch<BillboardControllerRenderData>
protected Renderable allocRenderable()
public void setVertexData()
public void setAlignMode(ParticleShader.AlignMode mode)
public ParticleShader.AlignMode getAlignMode()
public void setUseGpu(boolean useGPU)
public boolean isUseGPU()
public void setTexture(Texture texture)
public Texture getTexture()
public void begin()
ParticleBatch
begin
in interface ParticleBatch<BillboardControllerRenderData>
begin
in class BufferedParticleBatch<BillboardControllerRenderData>
protected void flush(int[] offsets)
BufferedParticleBatch
flush
in class BufferedParticleBatch<BillboardControllerRenderData>
offsets
- the calculated offsetspublic void getRenderables(Array<Renderable> renderables, Pool<Renderable> pool)
RenderableProvider
Renderable
instances. Renderables are obtained from the provided Pool
and added to the provided
array. The Renderables obtained using Pool.obtain()
will later be put back into the pool, do not store them
internally. The resulting array can be rendered via a ModelBatch
.renderables
- the output arraypool
- the pool to obtain Renderables frompublic void save(AssetManager manager, ResourceData resources)
public void load(AssetManager manager, ResourceData resources)