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

public Class ParticleEffect

extends Object
implements Disposable, Configurable
Class Inheritance
All Implemented Interfaces
com.badlogic.gdx.graphics.g3d.particles.ResourceData.Configurable, com.badlogic.gdx.utils.Disposable
Imports
com.badlogic.gdx.assets.AssetManager, com.badlogic.gdx.graphics.g3d.particles.batches.ParticleBatch, com.badlogic.gdx.math.Matrix4, .Quaternion, .Vector3, com.badlogic.gdx.math.collision.BoundingBox, com.badlogic.gdx.utils.Array, .Disposable

It's a set of particles controllers. It can be updated, rendered, transformed which means the changes will be applied on all the particles controllers.
Author
inferno

Field Summary

Modifier and TypeField and Description
private BoundingBox
private Array<ParticleController>

Constructor Summary

AccessConstructor and Description
public
public
public

Method Summary

Modifier and TypeMethod and Description
public ParticleEffect
copy()

Returns: a copy of this effect, should be used after the particle effect has been loaded.

public void
dispose()

Implements com.badlogic.gdx.utils.Disposable.dispose.

Releases all resources of this object.

public void
draw()

public void
end()

public ParticleController
findController(String name)

Returns the controller with the specified name, or null.

public BoundingBox
getBoundingBox()

Returns: the merged bounding box of all controllers.

public Array<ParticleController>
getControllers()

Returns: all particle controllers.

public void
init()

public boolean
public void
load(AssetManager assetManager, ResourceData<T> data)

Implements com.badlogic.gdx.graphics.g3d.particles.ResourceData.Configurable.load.

Loads all the assets required by all the controllers inside this effect.

public void
public void
rotate(Quaternion rotation)

Applies the rotation to the current transformation matrix of each controller.

public void
rotate(Vector3
the rotation axis
axis
,
float
the rotation angle in degrees
angle
)

Applies the rotation by the given angle around the given axis to the current transformation matrix of each controller.

public void
save(AssetManager assetManager, ResourceData<T> data)

Implements com.badlogic.gdx.graphics.g3d.particles.ResourceData.Configurable.save.

Saves all the assets required by all the controllers inside this effect.

public void
scale(float scaleX, float scaleY, float scaleZ)

Applies the scale to the current transformation matrix of each controller.

public void
scale(Vector3 scale)

Applies the scale to the current transformation matrix of each controller.

public void
setBatch(Array<ParticleBatch<?>> batches)

Assign one batch, among those passed in, to each controller.

public void
setTransform(Matrix4 transform)

Sets the given transform matrix on each controller.

public void
public void
translate(Vector3 translation)

Applies the translation to the current transformation matrix of each controller.

public void
public void
update(float deltaTime)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

boundsback to summary
private BoundingBox bounds
controllersback to summary
private Array<ParticleController> controllers

Constructor Detail

ParticleEffectback to summary
public ParticleEffect()
ParticleEffectback to summary
public ParticleEffect(ParticleEffect effect)
ParticleEffectback to summary
public ParticleEffect(ParticleController... emitters)

Method Detail

copyback to summary
public ParticleEffect copy()
Returns:ParticleEffect

a copy of this effect, should be used after the particle effect has been loaded.

disposeback to summary
public void dispose()

Implements com.badlogic.gdx.utils.Disposable.dispose.

Doc from com.badlogic.gdx.utils.Disposable.dispose.

Releases all resources of this object.

drawback to summary
public void draw()
endback to summary
public void end()
findControllerback to summary
public ParticleController findController(String name)

Returns the controller with the specified name, or null.

getBoundingBoxback to summary
public BoundingBox getBoundingBox()
Returns:BoundingBox

the merged bounding box of all controllers.

getControllersback to summary
public Array<ParticleController> getControllers()
Returns:Array<ParticleController>

all particle controllers.

initback to summary
public void init()
isCompleteback to summary
public boolean isComplete()
loadback to summary
public void load(AssetManager assetManager, ResourceData<T> data)

Implements com.badlogic.gdx.graphics.g3d.particles.ResourceData.Configurable.load.

Loads all the assets required by all the controllers inside this effect.

resetback to summary
public void reset()
rotateback to summary
public void rotate(Quaternion rotation)

Applies the rotation to the current transformation matrix of each controller.

rotateback to summary
public void rotate(Vector3 axis, float angle)

Applies the rotation by the given angle around the given axis to the current transformation matrix of each controller.

Parameters
axis:Vector3

the rotation axis

angle:float

the rotation angle in degrees

saveback to summary
public void save(AssetManager assetManager, ResourceData<T> data)

Implements com.badlogic.gdx.graphics.g3d.particles.ResourceData.Configurable.save.

Saves all the assets required by all the controllers inside this effect.

scaleback to summary
public void scale(float scaleX, float scaleY, float scaleZ)

Applies the scale to the current transformation matrix of each controller.

scaleback to summary
public void scale(Vector3 scale)

Applies the scale to the current transformation matrix of each controller.

setBatchback to summary
public void setBatch(Array<ParticleBatch<?>> batches)

Assign one batch, among those passed in, to each controller. The batch must be compatible with the controller to be assigned.

setTransformback to summary
public void setTransform(Matrix4 transform)

Sets the given transform matrix on each controller.

startback to summary
public void start()
translateback to summary
public void translate(Vector3 translation)

Applies the translation to the current transformation matrix of each controller.

updateback to summary
public void update()
updateback to summary
public void update(float deltaTime)