Click or drag to resize
DigitalRuneChainBoneMapper Class
Maps the orientation of a whole bone chain.
Inheritance Hierarchy

Namespace: DigitalRune.Animation.Character
Assembly: DigitalRune.Animation (in DigitalRune.Animation.dll) Version: 1.4.0.0 (1.4.1.14427)
Syntax
public class ChainBoneMapper : BoneMapper

The ChainBoneMapper type exposes the following members.

Constructors
  NameDescription
Public methodChainBoneMapper
Initializes a new instance of the ChainBoneMapper class.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
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 methodInvalidate
Invalidates all cached data of this bone mapper.
(Inherited from BoneMapper.)
Public methodMapAToB
Sets the bone transform in the second skeleton to match skeleton pose of the first skeleton.
(Inherited from BoneMapper.)
Public methodMapBToA
Sets the bone transform in the first skeleton to match skeleton pose of the second skeleton.
(Inherited from BoneMapper.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnInvalidate (Overrides BoneMapperOnInvalidate.)
Protected methodOnMapAToB (Overrides BoneMapperOnMapAToB.)
Protected methodOnMapBToA (Overrides BoneMapperOnMapBToA.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyDirection
Gets or sets the desired mapping direction.
(Inherited from BoneMapper.)
Public propertyMapFromBindPose
Gets or sets a value indicating whether the chain mapping uses the bind pose as the reference orientation for the target skeleton.
Public propertyRootBoneIndexA
Gets or sets the bone index of the first bone of the bone chain in the first skeleton.
Public propertyRootBoneIndexB
Gets or sets the bone index of the first bone of the bone chain in the second skeleton.
Public propertySkeletonMapper
Gets or sets the skeleton mapper. (This property is set automatically and should be treated as read-only.)
(Inherited from BoneMapper.)
Public propertyTipBoneIndexA
Gets or sets the bone index where the bone chain of the first skeleton ends. This is the bone index of the first bone that is NOT included in the chain.
Public propertyTipBoneIndexB
Gets or sets the bone index where the bone chain of the second skeleton ends. This is the bone index of the first bone that is NOT included in the chain.
Top
Remarks

A ChainBoneMapper can be used if the mapped skeletons have a different number of bones. A bone chain starts at a bone (RootBoneIndexA and RootBoneIndexB). This bone defines the root (or origin) of the chain. And the chain has an end bone (TipBoneIndexA and TipBoneIndexB). The end bone is not included in the chain. It defines the tip of the chain.

The ChainBoneMapper computes a direction vector from chain origin to chain tip for each chain. Then it will apply a bone rotation to the root bone, so that both chain direction vectors are parallel. - Only the bone rotation of the root bone of the target skeleton is modified. Other bones in the chain are not modified.

Note: The ChainBoneMapper can also be used if the chain contains only a single bone.

For the target skeleton, the ChainBoneMapper chooses a reference position which is either the bind pose or a direct-mapped pose (DirectBoneMapper). MapFromBindPose determines which reference pose should be used. The chosen reference pose influences the twist of the whole bone chain.

See Also