public class ParticleController extends Object implements Json.Serializable, ResourceData.Configurable
Modifier and Type | Field and Description |
---|---|
float |
deltaTime
Time step, DO NOT CHANGE MANUALLY
|
float |
deltaTimeSqr
Time step, DO NOT CHANGE MANUALLY
|
Emitter |
emitter
Controls the emission of the particles
|
Array<Influencer> |
influencers
Update the properties of the particles
|
String |
name
Name of the controller
|
ParticleChannels |
particleChannels |
ParallelArray |
particles
Particles components
|
ParticleControllerRenderer<?,?> |
renderer
Controls the graphical representation of the particles
|
Vector3 |
scale
Transform flags
|
Matrix4 |
transform
Current transform of the controller
DO NOT CHANGE MANUALLY
|
Constructor and Description |
---|
ParticleController() |
ParticleController(String name,
Emitter emitter,
ParticleControllerRenderer<?,?> renderer,
Influencer... influencers) |
Modifier and Type | Method and Description |
---|---|
void |
activateParticles(int startIndex,
int count)
Generally called by the Emitter.
|
ParticleController |
copy() |
void |
dispose() |
void |
draw()
Updates the renderer used by this controller, usually this means the particles will be draw inside a batch.
|
void |
end()
End the simulation.
|
<K extends Influencer> |
findInfluencer(Class<K> influencerClass) |
BoundingBox |
getBoundingBox() |
void |
getTransform(Matrix4 transform)
Set the given matrix to the current transformation matrix.
|
void |
init()
Initialize the controller.
|
void |
killParticles(int startIndex,
int count)
Generally called by the Emitter.
|
void |
load(AssetManager manager,
ResourceData data) |
void |
mul(Matrix4 transform)
Postmultiplies the current transformation with the given matrix.
|
void |
read(Json json,
JsonValue jsonMap) |
<K extends Influencer> |
removeInfluencer(Class<K> type)
Removes the Influencer of the given type.
|
<K extends Influencer> |
replaceInfluencer(Class<K> type,
K newInfluencer)
Replaces the Influencer of the given type with the one passed as parameter.
|
void |
reset()
Reset the simulation.
|
void |
rotate(Quaternion rotation)
Post-multiplies the current transformation with a rotation matrix represented by the given quaternion.
|
void |
rotate(Vector3 axis,
float angle)
Post-multiplies the current transformation with a rotation matrix by the given angle around the given axis.
|
void |
save(AssetManager manager,
ResourceData data) |
void |
scale(float scaleX,
float scaleY,
float scaleZ)
Postmultiplies the current transformation with a scale matrix represented by the given scale on x,y,z.
|
void |
scale(Vector3 scale)
Postmultiplies the current transformation with a scale matrix represented by the given scale vector.
|
void |
setTransform(float x,
float y,
float z,
float qx,
float qy,
float qz,
float qw,
float scale)
Sets the current transformation.
|
void |
setTransform(Matrix4 transform)
Sets the current transformation to the given one.
|
void |
setTranslation(Vector3 translation) |
void |
start()
Start the simulation.
|
void |
translate(Vector3 translation)
Postmultiplies the current transformation with a translation matrix represented by the given translation.
|
void |
update()
Updates the particles data
|
void |
write(Json json) |
public String name
public Emitter emitter
public Array<Influencer> influencers
public ParticleControllerRenderer<?,?> renderer
public ParallelArray particles
public ParticleChannels particleChannels
public Matrix4 transform
public Vector3 scale
public float deltaTime
public float deltaTimeSqr
public ParticleController()
public ParticleController(String name, Emitter emitter, ParticleControllerRenderer<?,?> renderer, Influencer... influencers)
public void setTransform(Matrix4 transform)
transform
- the new transform matrixpublic void setTransform(float x, float y, float z, float qx, float qy, float qz, float qw, float scale)
public void rotate(Quaternion rotation)
public void rotate(Vector3 axis, float angle)
axis
- the rotation axisangle
- the rotation angle in degreespublic void translate(Vector3 translation)
public void setTranslation(Vector3 translation)
public void scale(float scaleX, float scaleY, float scaleZ)
public void scale(Vector3 scale)
public void mul(Matrix4 transform)
public void getTransform(Matrix4 transform)
public void init()
public void start()
public void reset()
public void end()
public void activateParticles(int startIndex, int count)
public void killParticles(int startIndex, int count)
public void update()
public void draw()
public ParticleController copy()
public void dispose()
public BoundingBox getBoundingBox()
public <K extends Influencer> K findInfluencer(Class<K> influencerClass)
public <K extends Influencer> void removeInfluencer(Class<K> type)
public <K extends Influencer> boolean replaceInfluencer(Class<K> type, K newInfluencer)
public void write(Json json)
write
in interface Json.Serializable
public void read(Json json, JsonValue jsonMap)
read
in interface Json.Serializable
public void save(AssetManager manager, ResourceData data)
save
in interface ResourceData.Configurable
public void load(AssetManager manager, ResourceData data)
load
in interface ResourceData.Configurable
Copyright © 2015. All rights reserved.