hmi.physics.ode
Class OdeHumanoid

java.lang.Object
  extended by hmi.physics.PhysicalHumanoid
      extended by hmi.physics.ode.OdeHumanoid

public class OdeHumanoid
extends PhysicalHumanoid


Field Summary
private  org.odejava.collision.JavaCollision collision
           
private  org.odejava.collision.Contact contact
           
private  HashMap<Long,PhysicalSegment> geomSegmentMap
           
private  org.odejava.GeomPlane groundGeom
           
private  org.odejava.JointGroup jointGroup
           
private  org.odejava.Space space
           
private  org.odejava.World world
           
 
Fields inherited from class hmi.physics.PhysicalHumanoid
joints, namePhysicalJointMap, nameSegmentMap, rootRotationBuffer, rootTranslationBuffer
 
Constructor Summary
OdeHumanoid(String id, org.odejava.World w, org.odejava.Space s)
          Constructor
 
Method Summary
 void clear()
          removes all segments
 OdeHumanoid createNew(String id)
          Create a new PhysicalHumanoid of the same type
 PhysicalSegment createSegment(String segmentId, String segmentSID)
          Creates a PhysicalSegment of the correct type for this PhysicalHumanoid subclass and makes sure its rigid body exists
 PhysicalSegment getSegment(long geomId)
          Get the PhysicalSegment corresponding with this geometry id
protected  void handleCollisions()
          Determine collisions, for now just with the ground
 void setCollision(org.odejava.collision.JavaCollision col)
           
 void setGroundGeom(org.odejava.GeomPlane groundGeom)
           
 void setupHashMaps(PhysicalSegment ps)
          Add a PhysicalSegment to the name->segment HashMap
 PhysicalJoint setupJoint(String name, PhysicalSegment seg1, PhysicalSegment seg2, float[] anchor)
          Creates a PhysicalJoint
 
Methods inherited from class hmi.physics.PhysicalHumanoid
addRootSegment, addSegment, copy, getCOM, getCOMDiff, getCOMNoContacts, getCOMNoContactsDiff, getCOMOffset, getCOMOffsetDiff, getCOMOffsetMass, getId, getJoint, getJoints, getRootSegment, getSegment, getSegments, getTotalMass, isEnabled, removeFromHashMap, removeSegment, set, setCOMOffset, setEnabled, setNullPoseFromVJoint, setPoseFromVJoint, setRelativeTranslation, setRelativeTranslation, setRootRotationBuffer, setRootSegment, setRootTranslationBuffer, setRotation, toString, updateCollision, updateCOM
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

world

private org.odejava.World world

space

private org.odejava.Space space

jointGroup

private org.odejava.JointGroup jointGroup

groundGeom

private org.odejava.GeomPlane groundGeom

collision

private org.odejava.collision.JavaCollision collision

contact

private org.odejava.collision.Contact contact

geomSegmentMap

private HashMap<Long,PhysicalSegment> geomSegmentMap
Constructor Detail

OdeHumanoid

public OdeHumanoid(String id,
                   org.odejava.World w,
                   org.odejava.Space s)
Constructor

Parameters:
w - Ode world
s - Ode collision space
Method Detail

createNew

public OdeHumanoid createNew(String id)
Description copied from class: PhysicalHumanoid
Create a new PhysicalHumanoid of the same type

Specified by:
createNew in class PhysicalHumanoid

clear

public void clear()
removes all segments

Overrides:
clear in class PhysicalHumanoid

setupJoint

public PhysicalJoint setupJoint(String name,
                                PhysicalSegment seg1,
                                PhysicalSegment seg2,
                                float[] anchor)
Description copied from class: PhysicalHumanoid
Creates a PhysicalJoint

Specified by:
setupJoint in class PhysicalHumanoid
Parameters:
name - joint name
seg1 - corresponds with visual parent segment
seg2 - corresponds with visual segment that rotates with the joint
anchor - world position of the joint anchor
Returns:
the created joint

setupHashMaps

public void setupHashMaps(PhysicalSegment ps)
Description copied from class: PhysicalHumanoid
Add a PhysicalSegment to the name->segment HashMap

Overrides:
setupHashMaps in class PhysicalHumanoid
Parameters:
ps - the segment

setCollision

public void setCollision(org.odejava.collision.JavaCollision col)

handleCollisions

protected void handleCollisions()
Determine collisions, for now just with the ground

Overrides:
handleCollisions in class PhysicalHumanoid

setGroundGeom

public void setGroundGeom(org.odejava.GeomPlane groundGeom)
Parameters:
groundGeom - the groundGeom to set

getSegment

public PhysicalSegment getSegment(long geomId)
Get the PhysicalSegment corresponding with this geometry id

Parameters:
geomId - the geometry id
Returns:
the PhysicalSegment, null if not found

createSegment

public PhysicalSegment createSegment(String segmentId,
                                     String segmentSID)
Description copied from class: PhysicalHumanoid
Creates a PhysicalSegment of the correct type for this PhysicalHumanoid subclass and makes sure its rigid body exists

Specified by:
createSegment in class PhysicalHumanoid
Returns:
the created segment