Click or drag to resize
DigitalRuneIKSolver Class
Modifies a SkeletonPose using inverse kinematics (IK).
Inheritance Hierarchy

Namespace: DigitalRune.Animation.Character
Assembly: DigitalRune.Animation (in DigitalRune.Animation.dll) Version: 1.4.0.0 (1.4.1.14427)
Syntax
public abstract class IKSolver : IAnimatableObject, 
	INamedObject

The IKSolver type exposes the following members.

Constructors
  NameDescription
Protected methodIKSolver
Initializes a new instance of the IKSolver 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.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnInvalidate
Called when the SkeletonPose was exchanged.
Protected methodOnSolve
Called when Solve(Single) is called.
Public methodSolve
Modifies the SkeletonPose to reach the Target position.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyMaxAngularVelocity
Gets or sets the maximal angular velocity per bone.
Public propertySkeletonPose
Gets or sets the skeleton pose.
Public propertyTarget
Gets or sets the target position in model space.
Public propertyWeight
Gets or sets the weight.
Top
Explicit Interface Implementations
Remarks

An inverse kinematics (IK) solver transforms the bones of a skeleton in order to achieve a desired pose. For instance, a LookAtIKSolver rotates a bone (e.g. a head) to look into a desired direction. A TwoJointIKSolver can be used to bend/stretch a leg so that it touches the ground, or to make an arm reach a certain target.

An IKSolver instances modifies a SkeletonPose instance. And the goal is to point to or reach the Target position. The solver works in model space - not in world space. Therefore, Target and other positions and orientations must be specified in model space.

If Solve(Single) is called and MaxAngularVelocity is PositiveInfinity (default), the SkeletonPose is changed instantly. To avoid this instantaneous change, a MaxAngularVelocity limit can be set, then the bones will rotate slowly to the target pose over several Solve(Single) calls. MaxAngularVelocity defines the maximal rotation velocity for each bone. (However, limiting MaxAngularVelocity is not ideal if the model is also animated, because the animation might reset the previous IK pose.)

The solver also has a Weight parameter. If the weight is 0, the solver is disabled. If the weight is 1, the solver tries its best to make the skeleton reach the target. A weight less than 1 can be used to blend the target skeleton pose with the unmodified skeleton pose.

Note that the IKSolver implements IAnimatableObject which means that it has properties which can be animated: The only property that can be animated is the Weight, the other properties are not animatable. Animating the weight can be useful to fade an IK pose in or out.

See Also