artofillusion.animation
Class IKSolver
java.lang.Object
artofillusion.animation.IKSolver
public class IKSolver
- extends java.lang.Object
This class performs inverse kinematics calculations to move skeletons.
Constructor Summary |
IKSolver(Skeleton s,
boolean[] locked,
boolean[] moving)
Create a new IKSolver for manipulating a skeleton |
Method Summary |
boolean |
solve(Vec3[] target,
int maxSteps)
Solve for the new joint positions, given the target positions. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IKSolver
public IKSolver(Skeleton s,
boolean[] locked,
boolean[] moving)
- Create a new IKSolver for manipulating a skeleton
- Parameters:
s
- the skeleton thie IKSolver will affectlocked
- an array of size (# joints in skeleton) specifying which ones are locked in placemoving
- an array of size (# joints in skeleton) specifying which ones are being moved
solve
public boolean solve(Vec3[] target,
int maxSteps)
- Solve for the new joint positions, given the target positions.
- Parameters:
target
- an array of size [# joints in skeleton] specifying the target of each one (or null)maxSteps
- the maximum number of iterations to perform
- Returns:
- true if a solution was reached, false if it had not yet converged after maxSteps iterations
Copyright © 1999-2011 by Peter Eastman.