Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
SiliconStudio.Paradox.Particles.ParticleSystem Class Reference

A particle system, containing particles and their updaters. More...

Inheritance diagram for SiliconStudio.Paradox.Particles.ParticleSystem:

Classes

struct  Enumerator
 A Particle enumerator. More...
 

Public Member Functions

 ParticleSystem ()
 Initializes a new instance of the ParticleSystem class. More...
 
void Dispose ()
 
Enumerator GetEnumerator ()
 Gets the Particle enumerator. More...
 
ParticleFieldAccessor< T > GetField< T > (ParticleFieldDescription< T > fieldDesc)
 Gets the field accessor specified by the given ParticleFieldDescription{T}. If the field doesn't exist in this ParticleSystem, a ParticleFieldAccessor{T} is returned with its ParticleFieldAccessor{T}.IsValid() returning false. More...
 
ParticleFieldAccessor< T > GetOrCreateField< T > (ParticleFieldDescription< T > fieldDesc)
 Gets the field accessor for the given ParticleFieldDescription{T}. If it doesn't exist, a new field will be created in the ParticleSystem. More...
 
ParticleFieldAccessor< T > GetOrCreateFieldWithDefault< T > (ParticleFieldDescription< T > fieldDesc, T defaultValue)
 Gets the field accessor for the given ParticleFieldDescription{T}. If it doesn't exist, a new field will be created in the ParticleSystem. Weither the field exists or not, its default value will be changed to the supplied one. More...
 
void Update (float dt)
 Updates this instance. More...
 
Particle AddParticle ()
 Adds the particle. More...
 
void RemoveParticleAt (int particleIndex)
 Removes the particle at the specified index. More...
 

Protected Member Functions

virtual void Dispose (bool disposing)
 Releases unmanaged and - optionally - managed resources. More...
 

Properties

TrackingCollection
< IParticlePlugin
Plugins [get, set]
 Gets the particle system plugins. More...
 
ParticleFieldAccessor< Vector3Position [get, set]
 Gets the position field accessor. More...
 
ParticleFieldAccessor< float > Angle [get, set]
 Gets the angle field accessor. More...
 
int ParticleCount [get]
 Gets the particle count. More...
 

Detailed Description

A particle system, containing particles and their updaters.

Definition at line 19 of file ParticleSystem.cs.

Constructor & Destructor Documentation

SiliconStudio.Paradox.Particles.ParticleSystem.ParticleSystem ( )

Member Function Documentation

Particle SiliconStudio.Paradox.Particles.ParticleSystem.AddParticle ( )

Adds the particle.

Returns
The index of the newly added particle.

Definition at line 340 of file ParticleSystem.cs.

void SiliconStudio.Paradox.Particles.ParticleSystem.Dispose ( )

Definition at line 98 of file ParticleSystem.cs.

virtual void SiliconStudio.Paradox.Particles.ParticleSystem.Dispose ( bool  disposing)
protectedvirtual

Releases unmanaged and - optionally - managed resources.

Parameters
disposingtrue to release both managed and unmanaged resources; false to release only unmanaged resources.

Definition at line 108 of file ParticleSystem.cs.

Enumerator SiliconStudio.Paradox.Particles.ParticleSystem.GetEnumerator ( )

Gets the Particle enumerator.

Returns
A Particle enumerator.

Definition at line 130 of file ParticleSystem.cs.

ParticleFieldAccessor<T> SiliconStudio.Paradox.Particles.ParticleSystem.GetField< T > ( ParticleFieldDescription< T >  fieldDesc)

Gets the field accessor specified by the given ParticleFieldDescription{T}. If the field doesn't exist in this ParticleSystem, a ParticleFieldAccessor{T} is returned with its ParticleFieldAccessor{T}.IsValid() returning false.

Template Parameters
TThe field type.
Parameters
fieldDescThe field description.
Returns
A valid field accessor for the requested field if the field exists; otherwise a non-valid one.
Type Constraints
T :struct 

Definition at line 159 of file ParticleSystem.cs.

ParticleFieldAccessor<T> SiliconStudio.Paradox.Particles.ParticleSystem.GetOrCreateField< T > ( ParticleFieldDescription< T >  fieldDesc)

Gets the field accessor for the given ParticleFieldDescription{T}. If it doesn't exist, a new field will be created in the ParticleSystem.

Template Parameters
TThe field type.
Parameters
fieldDescThe field description.
Returns
A valid field accessor for the requested field.
Type Constraints
T :struct 

Definition at line 176 of file ParticleSystem.cs.

ParticleFieldAccessor<T> SiliconStudio.Paradox.Particles.ParticleSystem.GetOrCreateFieldWithDefault< T > ( ParticleFieldDescription< T >  fieldDesc,
defaultValue 
)

Gets the field accessor for the given ParticleFieldDescription{T}. If it doesn't exist, a new field will be created in the ParticleSystem. Weither the field exists or not, its default value will be changed to the supplied one.

Template Parameters
TThe field type.
Parameters
fieldDescThe field description.
defaultValueThe new field default value.
Returns
A valid field accessor for the requested field.
Type Constraints
T :struct 

Definition at line 195 of file ParticleSystem.cs.

void SiliconStudio.Paradox.Particles.ParticleSystem.RemoveParticleAt ( int  particleIndex)

Removes the particle at the specified index.

Parameters
particleIndexIndex of the particle.

Definition at line 360 of file ParticleSystem.cs.

void SiliconStudio.Paradox.Particles.ParticleSystem.Update ( float  dt)

Updates this instance.

Definition at line 328 of file ParticleSystem.cs.

Property Documentation

ParticleFieldAccessor<float> SiliconStudio.Paradox.Particles.ParticleSystem.Angle
getset

Gets the angle field accessor.

The angle field accessor.

Definition at line 59 of file ParticleSystem.cs.

int SiliconStudio.Paradox.Particles.ParticleSystem.ParticleCount
get

Gets the particle count.

The particle count.

Definition at line 68 of file ParticleSystem.cs.

Referenced by ScriptTest.SimpleEmitter.Update().

TrackingCollection<IParticlePlugin> SiliconStudio.Paradox.Particles.ParticleSystem.Plugins
getset

Gets the particle system plugins.

The particle system plugins.

Definition at line 43 of file ParticleSystem.cs.

ParticleFieldAccessor<Vector3> SiliconStudio.Paradox.Particles.ParticleSystem.Position
getset

Gets the position field accessor.

The position field accessor.

Definition at line 51 of file ParticleSystem.cs.


The documentation for this class was generated from the following file: