ParticleParameterCollection Class |
Namespace: DigitalRune.Particles
The ParticleParameterCollection type exposes the following members.
Name | Description | |
---|---|---|
AddUniformT |
Adds a uniform particle parameter.
| |
AddVaryingT |
Adds a varying particle parameter.
| |
Clear |
Removes all particle parameters in this collection.
| |
Contains |
Determines whether the collection contains a particle parameter with the given name.
| |
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetT(String) |
Gets a particle parameter with the specified type and name. (If the type is wrong an
exception is thrown.)
| |
GetT(String, Boolean) |
Gets a particle parameter with the specified type and name. (If the type is wrong an
exception is thrown.)
| |
GetEnumerator |
Returns an enumerator that iterates through the ParticleParameterCollection.
| |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
GetUncheckedT(String) |
Gets a particle parameter with the specified type and name. (If the type is wrong
is returned.)
| |
GetUncheckedT(String, Boolean) |
Gets a particle parameter with the specified type and name. (If the type is wrong
is returned.)
| |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnChanged |
Raises the Changed event.
| |
Remove |
Removes a particle parameter.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
DoIParticleParameter(ActionIParticleParameter) | Overloaded.
Performs the given action on each element in a sequence when it is enumerated.
(Defined by LinqHelper.) | |
DoIParticleParameter(ActionIParticleParameter, Int32) | Overloaded.
Performs the given action on each element (incorporating its index) in a sequence when it is
enumerated.
(Defined by LinqHelper.) | |
ForEachIParticleParameter(ActionIParticleParameter) | Overloaded.
Immediately performs the given action on each element in a sequence.
(Defined by LinqHelper.) | |
ForEachIParticleParameter(ActionIParticleParameter, Int32) | Overloaded.
Immediately performs the given action on each element (incorporating its index) in a
sequence.
(Defined by LinqHelper.) | |
IndexOfIParticleParameter |
Returns the index of the first element in a sequence that satisfies the specified condition.
(Defined by LinqHelper.) |
Name | Description | |
---|---|---|
ParticleSystem |
Gets the particle system that owns this particle parameter collection.
|
Name | Description | |
---|---|---|
IEnumerableIParticleParameterGetEnumerator |
Returns an enumerator that iterates through the ParticleParameterCollection.
| |
IEnumerableGetEnumerator |
Returns an enumerator that iterates through the ParticleParameterCollection.
|
This collection manages the particle parameters of a particle system. All parameters must have a unique name ( or empty strings are not allowed).
New particle parameters can be added using the methods AddUniformT(String) and AddVaryingT(String). If a particle parameter with the given name already exists, AddUniformT(String) returns the existing parameter and does nothing else - even if the existing parameter is varying. If a particle parameter with the given name already exists, AddVaryingT(String) returns the existing parameter if it is varying. But if the existing parameter is uniform, AddVaryingT(String) replaces the existing parameter. - This means: Calling AddUniformT(String) and AddVaryingT(String) multiple times is safe. Varying parameters have higher priority and replace uniform parameters.
The generic methods AddUniformT(String), AddVaryingT(String) and GetT(String) throw an ParticleSystemException if a particle parameter with the given name exists but the particle parameter type is different. The method GetUncheckedT(String) is the same as GetT(String, Boolean), except that it does not throw an exception. It returns if the requested particle parameter does not exist or the type does not match.
Parameter Inheritance:
Per default, the Get() methods also search for uniform (but not varying)
parameters in the particle parameter collections of parent particle systems if a parameter is
not found in this collection. This means that uniform parameters are automatically inherited
by child particle systems. Note that enumerating the collection (using
GetEnumerator) only returns the locally stored particle
parameters, i.e. inherited parameters are not included in the enumeration.
Objects that manipulate particle parameters can hold references to the IParticleParameter instances. The event Changed is raised when the collection is modified. In this case any references to particle parameters get invalid. - The particle parameters could have been replaced or removed. (ParticleEffectors do not need to subscribe to the Changed event. They will automatically be updated by the ParticleSystem that owns them.)