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

public Class PointSpriteParticleBatch

extends BufferedParticleBatch<PointSpriteControllerRenderData>
Class Inheritance
Imports
com.badlogic.gdx.Application.ApplicationType, .Gdx, com.badlogic.gdx.assets.AssetManager, com.badlogic.gdx.graphics.GL20, .Mesh, .Texture, .VertexAttribute, .VertexAttributes, .VertexAttributes.Usage, com.badlogic.gdx.graphics.g3d.Material, .Renderable, com.badlogic.gdx.graphics.g3d.attributes.BlendingAttribute, .DepthTestAttribute, .TextureAttribute, com.badlogic.gdx.graphics.g3d.particles.ParallelArray.FloatChannel, .ParticleChannels, .ParticleShader, .ParticleShader.ParticleType, .ResourceData, .ResourceData.SaveData, com.badlogic.gdx.graphics.g3d.particles.renderers.PointSpriteControllerRenderData, com.badlogic.gdx.graphics.glutils.ShaderProgram, com.badlogic.gdx.math.Vector3, com.badlogic.gdx.utils.Array, .Pool

This class is used to draw particles as point sprites.
Author
Inferno

Field Summary

Modifier and TypeField and Description
protected BlendingAttribute
protected static final VertexAttributes
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int
protected DepthTestAttribute
private static boolean
pack-priv Renderable
protected static final int
protected static final Vector3
private float[]
Inherited from com.badlogic.gdx.graphics.g3d.particles.batches.BufferedParticleBatch:
bufferedParticlesCountcameracurrentCapacityrenderDatasorter

Constructor Summary

AccessConstructor and Description
public
public
public
PointSpriteParticleBatch(int capacity, ParticleShader.Config shaderConfig)

public
PointSpriteParticleBatch(int capacity, ParticleShader.Config shaderConfig, BlendingAttribute blendingAttribute, DepthTestAttribute depthTestAttribute)

Method Summary

Modifier and TypeMethod and Description
protected void
protected void
private static void
protected void
flush(int[] offsets)

Implements abstract com.badlogic.gdx.graphics.g3d.particles.batches.BufferedParticleBatch.flush.

Sends the data to the gpu.

public BlendingAttribute
public void
public Texture
public void
public void
public void
Inherited from com.badlogic.gdx.graphics.g3d.particles.batches.BufferedParticleBatch:
begindrawendensureCapacitygetBufferedCountgetSorterresetCapacitysetCamerasetSorter

Field Detail

blendingAttributeback to summary
protected BlendingAttribute blendingAttribute
CPU_ATTRIBUTESback to summary
protected static final VertexAttributes CPU_ATTRIBUTES
CPU_COLOR_OFFSETback to summary
protected static final int CPU_COLOR_OFFSET
CPU_POSITION_OFFSETback to summary
protected static final int CPU_POSITION_OFFSET
CPU_REGION_OFFSETback to summary
protected static final int CPU_REGION_OFFSET
CPU_SIZE_AND_ROTATION_OFFSETback to summary
protected static final int CPU_SIZE_AND_ROTATION_OFFSET
CPU_VERTEX_SIZEback to summary
protected static final int CPU_VERTEX_SIZE
depthTestAttributeback to summary
protected DepthTestAttribute depthTestAttribute
pointSpritesEnabledback to summary
private static boolean pointSpritesEnabled
renderableback to summary
pack-priv Renderable renderable
sizeAndRotationUsageback to summary
protected static final int sizeAndRotationUsage
TMP_V1back to summary
protected static final Vector3 TMP_V1
verticesback to summary
private float[] vertices

Constructor Detail

PointSpriteParticleBatchback to summary
public PointSpriteParticleBatch()
PointSpriteParticleBatchback to summary
public PointSpriteParticleBatch(int capacity)
PointSpriteParticleBatchback to summary
public PointSpriteParticleBatch(int capacity, ParticleShader.Config shaderConfig)
PointSpriteParticleBatchback to summary
public PointSpriteParticleBatch(int capacity, ParticleShader.Config shaderConfig, BlendingAttribute blendingAttribute, DepthTestAttribute depthTestAttribute)

Method Detail

allocParticlesDataback to summary
protected void allocParticlesData(int capacity)

Implements abstract com.badlogic.gdx.graphics.g3d.particles.batches.BufferedParticleBatch.allocParticlesData.

Annotations
@Override
allocRenderableback to summary
protected void allocRenderable()
enablePointSpritesback to summary
private static void enablePointSprites()
flushback to summary
protected void flush(int[] offsets)

Implements abstract com.badlogic.gdx.graphics.g3d.particles.batches.BufferedParticleBatch.flush.

Doc from com.badlogic.gdx.graphics.g3d.particles.batches.BufferedParticleBatch.flush.

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.

Annotations
@Override
getBlendingAttributeback to summary
public BlendingAttribute getBlendingAttribute()
getRenderablesback to summary
public void getRenderables(Array<Renderable> renderables, Pool<Renderable> pool)

Implements com.badlogic.gdx.graphics.g3d.RenderableProvider.getRenderables.

Doc from com.badlogic.gdx.graphics.g3d.RenderableProvider.getRenderables.

Returns 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.

Annotations
@Override
getTextureback to summary
public Texture getTexture()
loadback to summary
public void load(AssetManager manager, ResourceData<T> resources)

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

Annotations
@Override
saveback to summary
public void save(AssetManager manager, ResourceData<T> resources)

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

Annotations
@Override
setTextureback to summary
public void setTexture(Texture texture)