hmi.physics.controller
Class RagdollController

java.lang.Object
  extended by hmi.physics.controller.RagdollController
All Implemented Interfaces:
PhysicalController

public class RagdollController
extends Object
implements PhysicalController

Ragdoll controller: just let all joints hang loose... Controls all joints, but does not steer them in any way. This controller allows us to ensure that all joints will be physically steerd, and that the right mixed system will be selected for that. you may also pass a limited set of joints in the constructor, in which case only that limited set is controlled in ragdoll fashion, instead of the default 'all hanim joints'. NOTE: THIS CONTROLLER WILL NOT WORK IF YOU SET IT TO CONTROL JOINTS NOT PRESENT IN THE PHUMAN :( //TODO //FIXME

Author:
Dennis Reidsma

Field Summary
private  String[] jointIDs
          desired Joints to be steered ragdoll-fashion.
private  PhysicalHumanoid ph
           
private  String[] reqJointIDs
           
 
Constructor Summary
RagdollController()
           
RagdollController(PhysicalHumanoid p)
           
RagdollController(PhysicalHumanoid p, String[] newJointIDs)
           
 
Method Summary
 PhysicalController copy(PhysicalHumanoid ph)
          Creates a copy of the controller
 String[] getDesiredJointIDs()
          Gets the ids of joints the controller would like to steer if available
 String getParameterValue(String name)
          Get the parameter value of parameter name, return null if not found
 String[] getRequiredJointIDs()
          Gets the ids of controlled joints
 void reset()
          Clears out all previous time dependen variables
 void setJointIDs(String[] newJointIDs)
           
 void setParameterValue(String name, float value)
           
 void setParameterValue(String name, String value)
           
 void setPhysicalHumanoid(PhysicalHumanoid p)
          Links the controller to a new set of physical joints
 void update(double timeDiff)
          Updates the controller
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ph

private PhysicalHumanoid ph

jointIDs

private String[] jointIDs
desired Joints to be steered ragdoll-fashion. By default, all hanim joints.


reqJointIDs

private String[] reqJointIDs
Constructor Detail

RagdollController

public RagdollController(PhysicalHumanoid p,
                         String[] newJointIDs)

RagdollController

public RagdollController()

RagdollController

public RagdollController(PhysicalHumanoid p)
Method Detail

reset

public void reset()
Description copied from interface: PhysicalController
Clears out all previous time dependen variables

Specified by:
reset in interface PhysicalController

setPhysicalHumanoid

public void setPhysicalHumanoid(PhysicalHumanoid p)
Description copied from interface: PhysicalController
Links the controller to a new set of physical joints

Specified by:
setPhysicalHumanoid in interface PhysicalController
Parameters:
p - physical humanoid to link to

setJointIDs

public void setJointIDs(String[] newJointIDs)

getRequiredJointIDs

public String[] getRequiredJointIDs()
Description copied from interface: PhysicalController
Gets the ids of controlled joints

Specified by:
getRequiredJointIDs in interface PhysicalController

getDesiredJointIDs

public String[] getDesiredJointIDs()
Description copied from interface: PhysicalController
Gets the ids of joints the controller would like to steer if available

Specified by:
getDesiredJointIDs in interface PhysicalController

update

public void update(double timeDiff)
Description copied from interface: PhysicalController
Updates the controller

Specified by:
update in interface PhysicalController
Parameters:
timeDiff - time since last update

copy

public PhysicalController copy(PhysicalHumanoid ph)
Description copied from interface: PhysicalController
Creates a copy of the controller

Specified by:
copy in interface PhysicalController

getParameterValue

public String getParameterValue(String name)
Description copied from interface: PhysicalController
Get the parameter value of parameter name, return null if not found

Specified by:
getParameterValue in interface PhysicalController

setParameterValue

public void setParameterValue(String name,
                              String value)
Specified by:
setParameterValue in interface PhysicalController

setParameterValue

public void setParameterValue(String name,
                              float value)
Specified by:
setParameterValue in interface PhysicalController