Class ParticleSystem
[DataContract("ParticleSystem")]
public class ParticleSystem : IDisposable
- Inheritance
-
ParticleSystem
- Implements
- Extension Methods
Constructors
ParticleSystem()
Default constructor
public ParticleSystem()
Fields
Rotation
Rotation of the ParticleSystem, expressed as a quaternion rotation. Usually inherited directly from the ParticleSystemComponent or can be directly set.
public Quaternion Rotation
Field Value
Translation
Translation of the ParticleSystem. Usually inherited directly from the ParticleSystemComponent or can be directly set.
public Vector3 Translation
Field Value
UniformScale
Scale of the ParticleSystem. Only uniform scale is supported. Usually inherited directly from the ParticleSystemComponent or can be directly set.
public float UniformScale
Field Value
Properties
BoundingShape
AABB of this Particle System
[DataMember(5)]
[Display("Culling AABB", null)]
public BoundingShape BoundingShape { get; set; }
Property Value
Emitters
List of Emitters in this ParticleSystem. Each Emitter has a separate ParticlePool (group) of Particles in it
[DataMember(10)]
[Display("Emitters", null)]
public SafeList<ParticleEmitter> Emitters { get; }
Property Value
Enabled
Gets or sets a value indicating whether this ParticleSystem is enabled.
[DataMember(-10)]
public bool Enabled { get; set; }
Property Value
- bool
true
if enabled; otherwise,false
.
IsPaused
public bool IsPaused { get; }
Property Value
Settings
Settings class which contains miscellaneous settings for the particle system
[DataMember(3)]
[Display("Settings", null)]
public ParticleSystemSettings Settings { get; set; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Dispose(bool)
protected virtual void Dispose(bool disposing)
Parameters
disposing
bool
~ParticleSystem()
protected ~ParticleSystem()
GetAABB()
Gets the current AABB of the ParticleSystem
public BoundingBox GetAABB()
Returns
GetEmitterByName(string)
Gets the first emitter with matching name which is contained in this ParticleSystem
public ParticleEmitter GetEmitterByName(string name)
Parameters
name
stringName of the emitter. Some emitters might not have a name and cannot be referenced
Returns
- ParticleEmitter
ParticleEmitter with the same EmitterName or
null
if not found
InvalidateRelations()
Invalidates relation of this emitter to any other emitters that might be referenced
public void InvalidateRelations()
Pause()
Pauses the particle system simulation
public void Pause()
Play()
Use to both start a new simulation or continue a paused one
public void Play()
ResetSimulation()
Resets the particle system, resetting all values to their initial state
public void ResetSimulation()
Stop()
Stops the particle simulation by resetting it to its initial state and pausing it
public void Stop()
StopEmitters()
Use to stop emitting new particles, but continue updating existing ones
public void StopEmitters()
Timeout(float)
Disables emission of new particles and sets a time limit on the system. After the time expires, the system stops.
public void Timeout(float timeLimit)
Parameters
timeLimit
float
TryGetDebugDrawShape(ref DebugDrawShape, ref Vector3, ref Quaternion, ref Vector3)
Tries to acquire and draw a debug shape for better feedback and visualization.
public bool TryGetDebugDrawShape(ref DebugDrawShape debugDrawShape, ref Vector3 translation, ref Quaternion rotation, ref Vector3 scale)
Parameters
debugDrawShape
DebugDrawShapeThe type of the debug shape (sphere, cone, etc.)
translation
Vector3The shape's translation
rotation
QuaternionThe shape's rotation
scale
Vector3The shape's non-uniform scaling
Returns
- bool
true
if debug shape can be displayed
Update(float)
Updates the particles
public void Update(float dt)
Parameters
dt
floatDelta time - time, in seconds, elapsed since the last Update call to this particle system