Class PointSpriteParticleBatch
- java.lang.Object
-
- com.badlogic.gdx.graphics.g3d.particles.batches.BufferedParticleBatch<PointSpriteControllerRenderData>
-
- com.badlogic.gdx.graphics.g3d.particles.batches.PointSpriteParticleBatch
-
- All Implemented Interfaces:
ParticleBatch<PointSpriteControllerRenderData>,ResourceData.Configurable,RenderableProvider
public class PointSpriteParticleBatch extends BufferedParticleBatch<PointSpriteControllerRenderData>
This class is used to draw particles as point sprites.
-
-
Field Summary
Fields Modifier and Type Field Description protected BlendingAttributeblendingAttributeprotected static VertexAttributesCPU_ATTRIBUTESprotected static intCPU_COLOR_OFFSETprotected static intCPU_POSITION_OFFSETprotected static intCPU_REGION_OFFSETprotected static intCPU_SIZE_AND_ROTATION_OFFSETprotected static intCPU_VERTEX_SIZEprotected DepthTestAttributedepthTestAttributeprotected static intsizeAndRotationUsageprotected static Vector3TMP_V1-
Fields inherited from class com.badlogic.gdx.graphics.g3d.particles.batches.BufferedParticleBatch
bufferedParticlesCount, camera, currentCapacity, renderData, sorter
-
-
Constructor Summary
Constructors Constructor Description PointSpriteParticleBatch()PointSpriteParticleBatch(int capacity)PointSpriteParticleBatch(int capacity, ParticleShader.Config shaderConfig)PointSpriteParticleBatch(int capacity, ParticleShader.Config shaderConfig, BlendingAttribute blendingAttribute, DepthTestAttribute depthTestAttribute)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidallocParticlesData(int capacity)protected voidallocRenderable()protected voidflush(int[] offsets)Sends the data to the gpu.BlendingAttributegetBlendingAttribute()voidgetRenderables(Array<Renderable> renderables, Pool<Renderable> pool)ReturnsRenderableinstances.TexturegetTexture()voidload(AssetManager manager, ResourceData resources)voidsave(AssetManager manager, ResourceData resources)voidsetTexture(Texture texture)-
Methods inherited from class com.badlogic.gdx.graphics.g3d.particles.batches.BufferedParticleBatch
begin, draw, end, ensureCapacity, getBufferedCount, getSorter, resetCapacity, setCamera, setSorter
-
-
-
-
Field Detail
-
TMP_V1
protected static final Vector3 TMP_V1
-
sizeAndRotationUsage
protected static final int sizeAndRotationUsage
- See Also:
- Constant Field Values
-
CPU_ATTRIBUTES
protected static final VertexAttributes CPU_ATTRIBUTES
-
CPU_VERTEX_SIZE
protected static final int CPU_VERTEX_SIZE
-
CPU_POSITION_OFFSET
protected static final int CPU_POSITION_OFFSET
-
CPU_COLOR_OFFSET
protected static final int CPU_COLOR_OFFSET
-
CPU_REGION_OFFSET
protected static final int CPU_REGION_OFFSET
-
CPU_SIZE_AND_ROTATION_OFFSET
protected static final int CPU_SIZE_AND_ROTATION_OFFSET
-
blendingAttribute
protected BlendingAttribute blendingAttribute
-
depthTestAttribute
protected DepthTestAttribute depthTestAttribute
-
-
Constructor Detail
-
PointSpriteParticleBatch
public PointSpriteParticleBatch()
-
PointSpriteParticleBatch
public PointSpriteParticleBatch(int capacity)
-
PointSpriteParticleBatch
public PointSpriteParticleBatch(int capacity, ParticleShader.Config shaderConfig)
-
PointSpriteParticleBatch
public PointSpriteParticleBatch(int capacity, ParticleShader.Config shaderConfig, BlendingAttribute blendingAttribute, DepthTestAttribute depthTestAttribute)
-
-
Method Detail
-
allocParticlesData
protected void allocParticlesData(int capacity)
- Specified by:
allocParticlesDatain classBufferedParticleBatch<PointSpriteControllerRenderData>
-
allocRenderable
protected void allocRenderable()
-
setTexture
public void setTexture(Texture texture)
-
getTexture
public Texture getTexture()
-
getBlendingAttribute
public BlendingAttribute getBlendingAttribute()
-
flush
protected void flush(int[] offsets)
Description copied from class:BufferedParticleBatchSends 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.- Specified by:
flushin classBufferedParticleBatch<PointSpriteControllerRenderData>- Parameters:
offsets- the calculated offsets
-
getRenderables
public void getRenderables(Array<Renderable> renderables, Pool<Renderable> pool)
Description copied from interface:RenderableProviderReturnsRenderableinstances. Renderables are obtained from the providedPooland added to the provided array. The Renderables obtained usingPool.obtain()will later be put back into the pool, do not store them internally. The resulting array can be rendered via aModelBatch.- Parameters:
renderables- the output arraypool- the pool to obtain Renderables from
-
save
public void save(AssetManager manager, ResourceData resources)
-
load
public void load(AssetManager manager, ResourceData resources)
-
-