hmi.elckerlyc.animationengine.mixed
Class MixedPlayer

java.lang.Object
  extended by hmi.elckerlyc.animationengine.mixed.MixedPlayer

public class MixedPlayer
extends Object


Field Summary
static float DEFAULTH
           
private  float h
           
private  VJoint[] hCurrS
           
private  VJoint[] hNextS
           
private  VJoint[] hPrevS
           
private  int kinJoints
           
private  org.slf4j.Logger logger
           
private  float[] q
           
private  float[] q1
           
private  float[] q2
           
private  float[] qCurr
           
private  float[] qDiff
           
private  float[] qDiff2
           
private  float[] qNext
           
private  float[] qPrev
           
private  MixedSystem system
           
private  float[] v
           
private  float[] v1
           
private  float[] v2
           
private  float[] w
           
private  float[] wDiff
           
 
Constructor Summary
MixedPlayer(MixedSystem sys, VJoint hPrev, VJoint hCurr, VJoint hNext)
           
 
Method Summary
private  void calculateKinematics()
          Calculates joint rotations, joint angular velocity and joint angular accelration from the prev, current, next joint configuration
 float getH()
          Get the simulation rate
 MixedSystem getSystem()
           
 void play(float timeDiff)
           
 void reset(VJoint vj)
           
 void setH(float hNew)
          Set the simulation rate
 void setMassOffset()
          Sets the massoffset of the physical humanoid to the one defined by its current joints
private  void setPrevCurrNextFromPhysicalHuman(PhysicalHumanoid ph, VJoint vPrev, VJoint vCurr, VJoint vNext)
           
 void setSystem(MixedSystem sys, VJoint hPrev, VJoint hCurr, VJoint hNext)
          Sets up the system, based on a new system
 void switchSystem(MixedSystem sys, float timeDiff, VJoint prev, VJoint curr, VJoint next, boolean switchPrevCurrNext)
          Switches the current mixed system to sys
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private org.slf4j.Logger logger

hPrevS

private VJoint[] hPrevS

hCurrS

private VJoint[] hCurrS

hNextS

private VJoint[] hNextS

qPrev

private float[] qPrev

qCurr

private float[] qCurr

qNext

private float[] qNext

qDiff

private float[] qDiff

qDiff2

private float[] qDiff2

w

private float[] w

wDiff

private float[] wDiff

q

private float[] q

q1

private float[] q1

q2

private float[] q2

v

private float[] v

v1

private float[] v1

v2

private float[] v2

system

private MixedSystem system

kinJoints

private int kinJoints

h

private float h

DEFAULTH

public static final float DEFAULTH
See Also:
Constant Field Values
Constructor Detail

MixedPlayer

public MixedPlayer(MixedSystem sys,
                   VJoint hPrev,
                   VJoint hCurr,
                   VJoint hNext)
Method Detail

setPrevCurrNextFromPhysicalHuman

private void setPrevCurrNextFromPhysicalHuman(PhysicalHumanoid ph,
                                              VJoint vPrev,
                                              VJoint vCurr,
                                              VJoint vNext)

setSystem

public void setSystem(MixedSystem sys,
                      VJoint hPrev,
                      VJoint hCurr,
                      VJoint hNext)
Sets up the system, based on a new system

Parameters:
sys - new system
hPrev - joint trees to find kinematically steered joints in
hCurr -
hNext -

getH

public float getH()
Get the simulation rate


setH

public void setH(float hNew)
Set the simulation rate


setMassOffset

public void setMassOffset()
Sets the massoffset of the physical humanoid to the one defined by its current joints


reset

public void reset(VJoint vj)

calculateKinematics

private void calculateKinematics()
Calculates joint rotations, joint angular velocity and joint angular accelration from the prev, current, next joint configuration


switchSystem

public void switchSystem(MixedSystem sys,
                         float timeDiff,
                         VJoint prev,
                         VJoint curr,
                         VJoint next,
                         boolean switchPrevCurrNext)
Switches the current mixed system to sys

Parameters:
sys - system to switch to
timeDiff - time delta since last update

play

public void play(float timeDiff)

getSystem

public MixedSystem getSystem()
Returns:
the system