Click or drag to resize
DigitalRuneParticleParameterCollectionAddVaryingT Method
Adds a varying particle parameter.

Namespace: DigitalRune.Particles
Assembly: DigitalRune.Particles (in DigitalRune.Particles.dll) Version: 1.4.0.0 (1.4.1.14427)
Syntax
public IParticleParameter<T> AddVarying<T>(
	string name
)

Parameters

name
Type: SystemString
The name of the parameter (e.g. "Color", "Position", etc.).

Type Parameters

T
The type of the parameter value.

Return Value

Type: IParticleParameterT
The existing or newly created particle parameter.
Exceptions
ExceptionCondition
ArgumentNullExceptionname is .
ArgumentExceptionname is empty.
ParticleSystemException A particle parameter with the given name was found but the parameter type cannot be cast to type T.
Remarks
If the collection does not contain a particle parameter with the given name, a new varying particle parameter is added. If the collection contains a varying particle parameter with the given name, then only the existing particle parameter is returned. If the collection contains a uniform particle parameter with the given name, then the existing particle parameter is removed and replaced by a new varying particle parameter.
See Also