|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.elckerlyc.animationengine.procanimation.IKBody
public class IKBody
IK manipulator for a Humanoid body Uses analytical IK to position the feet and hands.
| Field Summary | |
|---|---|
private VJoint |
human
|
private VJoint |
lankle
|
private float[] |
leftFoot
|
private VJoint |
lelbow
|
private VJoint |
lhip
|
private VJoint |
lknee
|
private VJoint |
lshoulder
|
private VJoint |
lwrist
|
private float[] |
mW
|
private float[] |
mWDes
|
private float[] |
q
|
private float[] |
qElb
|
private float[] |
qSho
|
private float[] |
qW
|
private float[] |
qWDes
|
private VJoint |
rankle
|
private VJoint |
relbow
|
private VJoint |
rhip
|
private float[] |
rightFoot
|
private VJoint |
rknee
|
private VJoint |
root
|
private VJoint |
rshoulder
|
private VJoint |
rwrist
|
private AnalyticalIKSolver |
solverLFeet
|
private AnalyticalIKSolver |
solverLHand
|
private AnalyticalIKSolver |
solverRFeet
|
private AnalyticalIKSolver |
solverRHand
|
private float[] |
temp
|
private float[] |
xAxis
|
private float[] |
yAxis
|
private float[] |
zAxis
|
| Constructor Summary | |
|---|---|
IKBody(VJoint h)
Constructor |
|
| Method Summary | |
|---|---|
VJoint |
getHuman()
|
void |
getLeftFootRotation(double swivel,
float[] lf,
float[] qh,
float[] qk)
Calculates the rotations of hip and knee for given swivel and left foot position |
void |
getRightFootRotation(double swivel,
float[] rf,
float[] qh,
float[] qk)
Calculates the rotations of hip and knee for given swivel and right foot position |
void |
getRootPosition(float[] root)
Get the translation of the root |
double |
getSwivelLeftArm()
Get the swivel of the left foot, given the current humanoid setup |
double |
getSwivelLeftFoot()
Get the swivel of the left foot, given the current humanoid setup |
double |
getSwivelRightArm()
Get the swivel of the right arm, given the current humanoid setup |
double |
getSwivelRightFoot()
Get the swivel of the right foot, given the current humanoid setup |
void |
placeFeet()
Places the feet onto their previous position |
void |
setFeet(float[] l,
float[] r,
boolean keepFlat)
Sets the hip, knee and ankle rotations that satisfy a foot position |
void |
setLeftFoot(float[] l,
boolean keepFlat)
Set the hip and knee rotation so that a certain left foot position is satisfied. |
void |
setLeftHand(float[] l)
Sets the shoulder and elbow rotations that satisfy the left hand position in world coordinates |
void |
setLocalLeftHand(float[] l)
Sets the shoulder and elbow rotations that satisfy the left hand position in shoulder coordinates |
void |
setLocalRightHand(float[] r)
Sets the shoulder and elbow rotations that satisfy the right hand position in shoulder coordinates |
void |
setRightFoot(float[] r,
boolean keepFlat)
Set the hip and knee rotation so that a certain right foot position is satisfied. |
void |
setRightHand(float[] r)
Sets the shoulder and elbow rotations that satisfy the right hand position in world coordinates |
void |
setRoot(float[] rootPos)
Set the translation of the HumanoidRoot |
void |
setSwivelLeftFoot(double sw)
Set the swivel rotation of the left foot (see Tolani) |
void |
setSwivelLeftHand(double sw)
Set the swivel rotation of the left hand (see Tolani) |
void |
setSwivelRightFoot(double sw)
Set the swivel rotation of the right foot (see Tolani) |
void |
setSwivelRightHand(double sw)
Sets the right hand swivel angle (see Tolani) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private VJoint human
private VJoint root
private VJoint lhip
private VJoint lknee
private VJoint lankle
private VJoint rhip
private VJoint rknee
private VJoint rankle
private VJoint lshoulder
private VJoint lelbow
private VJoint lwrist
private VJoint rshoulder
private VJoint relbow
private VJoint rwrist
private AnalyticalIKSolver solverRFeet
private AnalyticalIKSolver solverLFeet
private AnalyticalIKSolver solverLHand
private AnalyticalIKSolver solverRHand
private float[] leftFoot
private float[] rightFoot
private float[] temp
private float[] q
private float[] qW
private float[] qWDes
private float[] mW
private float[] mWDes
private float[] zAxis
private float[] yAxis
private float[] xAxis
private float[] qSho
private float[] qElb
| Constructor Detail |
|---|
public IKBody(VJoint h)
h - humanoid| Method Detail |
|---|
public void setRoot(float[] rootPos)
rootPos - the translation of the HumanoidRootpublic void placeFeet()
public void setLeftFoot(float[] l,
boolean keepFlat)
l - the left foot position, in world coordinateskeepFlat - set if the foot should be kept flat on a horizontal floor (on
the global X-Z plane). Modifies ankle rotation.
public void setRightFoot(float[] r,
boolean keepFlat)
r - the right foot position, in world coordinateskeepFlat - set if the foot should be kept flat on the floor. Modifies
ankle rotation.
public void setFeet(float[] l,
float[] r,
boolean keepFlat)
l - left foot position, null for current posr - right foot position, null for current poskeepFlat - , set to keep heels flatpublic void setLeftHand(float[] l)
l - left hand positionpublic void setRightHand(float[] r)
l - right hand positionpublic void setLocalRightHand(float[] r)
r - right hand positionpublic void setSwivelRightHand(double sw)
sw - the swivel rotationpublic void setSwivelLeftHand(double sw)
sw - the swivel rotation of the left handpublic void setSwivelRightFoot(double sw)
sw - the swivel rotation of th right footpublic void setSwivelLeftFoot(double sw)
sw - the swivel rotation of the left footpublic double getSwivelRightFoot()
public double getSwivelLeftFoot()
public double getSwivelLeftArm()
public double getSwivelRightArm()
public void getLeftFootRotation(double swivel,
float[] lf,
float[] qh,
float[] qk)
swivel - swivel anglelf - left foot position in world coordinatesqh - output: left hip rotationqk - output: left knee rotationpublic void getRootPosition(float[] root)
root - vector to store the translation in, null to create it
public void getRightFootRotation(double swivel,
float[] rf,
float[] qh,
float[] qk)
swivel - swivel anglelf - right foot position in world coordinatesqh - output: right hip rotationqk - output: right knee rotationpublic void setLocalLeftHand(float[] l)
r - right hand positionpublic VJoint getHuman()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||