Click or drag to resize
DigitalRuneMorphWeightCollection Class
Defines the weights for a set of morph targets.
Inheritance Hierarchy
SystemObject
  DigitalRune.GraphicsMorphWeightCollection

Namespace: DigitalRune.Graphics
Assembly: DigitalRune.Graphics (in DigitalRune.Graphics.dll) Version: 1.2.0.0 (1.2.1.14562)
Syntax
public sealed class MorphWeightCollection : IAnimatableObject, 
	INamedObject, IEnumerable<KeyValuePair<string, float>>, 
	IEnumerable

The MorphWeightCollection type exposes the following members.

Constructors
  NameDescription
Public methodMorphWeightCollection(String)
Initializes a new instance of the MorphWeightCollection class for the specified morph targets.
Public methodMorphWeightCollection(Mesh)
Initializes a new instance of the MorphWeightCollection class for the specified mesh.
Top
Methods
  NameDescription
Public methodClone
Creates a new MorphWeightCollection that is a clone (deep copy) of the current instance.
Public methodContains
Determines whether the MorphWeightCollection contains a morph target with the specified name.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetEnumerator
Returns an enumerator that iterates through the morph target weights.
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodReset
Clears the weights of all morph targets.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodTryGetValue
Gets the weight for the specified morph target.
Top
Extension Methods
  NameDescription
Public Extension MethodDoKeyValuePairString, Single(ActionKeyValuePairString, Single)Overloaded.
Performs the given action on each element in a sequence when it is enumerated.
(Defined by LinqHelper.)
Public Extension MethodDoKeyValuePairString, Single(ActionKeyValuePairString, Single, Int32)Overloaded.
Performs the given action on each element (incorporating its index) in a sequence when it is enumerated.
(Defined by LinqHelper.)
Public Extension MethodForEachKeyValuePairString, Single(ActionKeyValuePairString, Single)Overloaded.
Immediately performs the given action on each element in a sequence.
(Defined by LinqHelper.)
Public Extension MethodForEachKeyValuePairString, Single(ActionKeyValuePairString, Single, Int32)Overloaded.
Immediately performs the given action on each element (incorporating its index) in a sequence.
(Defined by LinqHelper.)
Public Extension MethodIndexOfKeyValuePairString, Single
Returns the index of the first element in a sequence that satisfies the specified condition.
(Defined by LinqHelper.)
Top
Properties
  NameDescription
Public propertyCount
Gets the number of morph targets.
Public propertyItem
Gets or sets the weight of the specified morph target.
Public propertyName
Gets or sets the name of the MorphWeightCollection.
Top
Explicit Interface Implementations
Remarks

A mesh may include morph targets (see MorphTargets). Each morph target is controlled by a weight, which is usually a value in the range [0, 1] or [-1, 1]. The MorphWeightCollection stores the weights for a set of morph targets.

Morph targets are identified by their name. The extension method GetMorphTargetNames(Mesh) can be used to get a list of all morph targets of a specific mesh.

Animation:
The class MorphWeightCollection implements the interface IAnimatableObject, which means that the weights can be animated using DigitalRune Animation. The animatable properties can be accessed by calling the method GetAnimatablePropertyT(String) passing the name of the morph target as the parameter.

Note: The IAnimatablePropertys (the morph target weights) do not have a base value and therefore cannot be used in some from-to-by animations or similar animations that require a base value.

See Also