Click or drag to resize
DigitalRuneJacobianTransposeIKSolver Class
Modifies a skeleton using the Jacobian Transpose method.
Inheritance Hierarchy
SystemObject
  DigitalRune.Animation.CharacterIKSolver
    DigitalRune.Animation.CharacterJacobianTransposeIKSolver

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

The JacobianTransposeIKSolver type exposes the following members.

Constructors
  NameDescription
Public methodJacobianTransposeIKSolver
Initializes a new instance of the JacobianTransposeIKSolver 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.
(Overrides IKSolverOnInvalidate.)
Protected methodOnSolve
Called when Solve(Single) is called.
(Overrides IKSolverOnSolve(Single).)
Public methodSolve
Modifies the SkeletonPose to reach the Target position.
(Inherited from IKSolver.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyAllowedDeviation
Gets or sets the allowed distance error.
Public propertyLimitBoneTransforms
Gets or sets the a callback that enforces rotation limits.
Public propertyMaxAngularVelocity
Gets or sets the maximal angular velocity per bone.
(Inherited from IKSolver.)
Public propertyNumberOfIterations
Gets or sets the number of iterations.
Public propertyRootBoneIndex
Gets or sets the index of the root bone.
Public propertySkeletonPose
Gets or sets the skeleton pose.
(Inherited from IKSolver.)
Public propertyStepSize
Gets or sets the size of the Euler integration step.
Public propertyTarget
Gets or sets the target position in model space.
(Inherited from IKSolver.)
Public propertyTipBoneIndex
Gets or sets the index of the tip bone.
Public propertyTipOffset
Gets or sets the tip offset in tip bone space.
Public propertyWeight
Gets or sets the weight.
(Inherited from IKSolver.)
Top
Explicit Interface Implementations
Remarks

This IKSolver uses the Jacobian Transpose algorithm to modify a bone chain to reach the Target position. RootBoneIndex determines the first bone in the chain. TipBoneIndex determines the last bone that is included in the chain. This IK solver rotates all bones in the chain, so that the tip of the bone chain reaches the Target position.

This solver uses an iterative algorithm. NumberOfIterations limits the maximal number allowed iterations. The algorithm ends early if the distance between the Target and the tip of the chain is less than AllowedDeviation. In each iteration, the solver computes "forces" that pull the tip of the bone chain to the target. It then makes an Euler integration step to move the bones as determined by the computed forces. StepSize determines the time step of the numeric integration. If this value is too large, the solver becomes unstable. If this value too small, the solver needs many iterations to reach the target. A good value for a specific application must be determined by experimentation.

Bone rotation limits:
Per default, the IKSolver assumes that the bones can rotate in any direction without rotation limits. If the bone rotations should be limited (e.g. "do not rotate about the y axis" or "do not rotate more than 45°"), then a LimitBoneTransforms callback must be set. The LimitBoneTransforms callback must be a method that checks the current bone rotations and removes any invalid rotations. See LimitBoneTransforms for more details.

See also IKSolver for more general information.

Caution:
This IK solver allocates heap memory and creates garbage. If garbage collector performance is important (e.g. on the Xbox 360 or Windows Phone 7), do not use this IK solver.

See Also