|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.physics.PhysicalHumanoid
public abstract class PhysicalHumanoid
| Field Summary | |
|---|---|
private boolean |
bIsEnabled
|
private float[] |
COM
|
private float[] |
COMDiff
|
private float[] |
COMNoContacts
|
private float[] |
COMNoContactsDiff
|
private float[] |
COMOffset
|
private float[] |
COMOffsetDiff
|
private String |
id
|
protected List<PhysicalJoint> |
joints
|
(package private) float[] |
m
|
protected HashMap<String,PhysicalJoint> |
namePhysicalJointMap
|
protected HashMap<String,PhysicalSegment> |
nameSegmentMap
|
private float |
offsetMass
|
private float[] |
qTemp
|
protected float[] |
rootRotationBuffer
|
private PhysicalSegment |
rootSegment
|
protected float[] |
rootTranslationBuffer
|
private List<PhysicalSegment> |
segments
|
private float[] |
v1
|
private float[] |
v2
|
private float[] |
v3
|
private float[] |
vecTemp
|
| Constructor Summary | |
|---|---|
PhysicalHumanoid(String id)
Constructor |
|
| Method Summary | |
|---|---|
void |
addRootSegment(PhysicalSegment segment)
|
void |
addSegment(PhysicalSegment segment)
|
void |
clear()
Cleans up joint structure, call when the human is removed |
void |
copy()
copy the simulation info to the root and joint local translation and rotation buffers |
abstract PhysicalHumanoid |
createNew(String id)
Create a new PhysicalHumanoid of the same type |
abstract PhysicalSegment |
createSegment(String segmentId,
String segmentSid)
Creates a PhysicalSegment of the correct type for this PhysicalHumanoid subclass and makes sure its rigid body exists |
float[] |
getCOM()
|
float[] |
getCOMDiff()
|
float[] |
getCOMNoContacts()
Get the COM excluding feet weights |
float[] |
getCOMNoContactsDiff()
Get the dCOM/dt excluding feet weights |
float[] |
getCOMOffset()
|
float[] |
getCOMOffsetDiff()
|
float |
getCOMOffsetMass()
|
String |
getId()
|
PhysicalJoint |
getJoint(String name)
Get the PhysicalJoint with this name in the Humanoid |
List<PhysicalJoint> |
getJoints()
|
PhysicalSegment |
getRootSegment()
|
PhysicalSegment |
getSegment(String name)
Get the PhysicalSegment with this start joint |
PhysicalSegment[] |
getSegments()
Gets an array of segments, including the root segment. |
float |
getTotalMass()
Gets the total mass of the humanoid |
protected void |
handleCollisions()
|
boolean |
isEnabled()
|
void |
removeFromHashMap(PhysicalSegment ps)
Removes a physical segment from the name->segment hashmap |
void |
removeSegment(PhysicalSegment segment)
|
void |
set(PhysicalHumanoid ph)
Sets the CoM and derivates + all segments with the matching names to the state of ph COMOffset is set to 0 |
void |
setCOMOffset(float[] offset,
float mass)
Offsets the COM |
void |
setEnabled(boolean enabled)
Disables or enables the PhysicalHumanoid. |
private void |
setJoint(VJoint vj)
|
private void |
setNullPoseForJoint(VJoint vj)
|
void |
setNullPoseFromVJoint(VJoint vj)
|
void |
setPoseFromVJoint(VJoint vj)
|
void |
setRelativeTranslation(float[] trans)
Translates the physical humanoid |
void |
setRelativeTranslation(float x,
float y,
float z)
Translates the physical humanoid |
void |
setRootRotationBuffer(float[] rootRotationBuffer)
|
void |
setRootSegment(PhysicalSegment rs)
|
private void |
setRootSimInfo()
|
void |
setRootTranslationBuffer(float[] rootTranslationBuffer)
|
void |
setRotation(float[] center,
float[] q)
Rotates the physical humanoid around some center |
void |
setupHashMaps(PhysicalSegment ps)
Add a PhysicalSegment to the name->segment HashMap |
abstract PhysicalJoint |
setupJoint(String name,
PhysicalSegment seg1,
PhysicalSegment seg2,
float[] anchor)
Creates a PhysicalJoint |
String |
toString()
Get String representation |
void |
updateCollision()
Checks if segments touch the ground and updates their onGrounds accordingly. |
void |
updateCOM(float timeStep)
Calculates the new Center Of Mass COM and COMDiff (=dCOM/dt) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private boolean bIsEnabled
private float[] COM
private float[] COMDiff
private float[] COMNoContacts
private float[] COMNoContactsDiff
private float[] COMOffset
private float[] COMOffsetDiff
private float[] vecTemp
private float[] qTemp
private List<PhysicalSegment> segments
protected List<PhysicalJoint> joints
private PhysicalSegment rootSegment
protected HashMap<String,PhysicalSegment> nameSegmentMap
protected HashMap<String,PhysicalJoint> namePhysicalJointMap
protected float[] rootTranslationBuffer
protected float[] rootRotationBuffer
private float offsetMass
private String id
float[] m
private float[] v1
private float[] v2
private float[] v3
| Constructor Detail |
|---|
public PhysicalHumanoid(String id)
| Method Detail |
|---|
public void removeSegment(PhysicalSegment segment)
public void addSegment(PhysicalSegment segment)
public void addRootSegment(PhysicalSegment segment)
public void set(PhysicalHumanoid ph)
ph -
public abstract PhysicalJoint setupJoint(String name,
PhysicalSegment seg1,
PhysicalSegment seg2,
float[] anchor)
name - joint nameseg1 - corresponds with visual parent segmentseg2 - corresponds with visual segment that rotates with the jointanchor - world position of the joint anchor
public abstract PhysicalSegment createSegment(String segmentId,
String segmentSid)
public abstract PhysicalHumanoid createNew(String id)
public PhysicalSegment[] getSegments()
public PhysicalJoint getJoint(String name)
name - joint name
public PhysicalSegment getSegment(String name)
name - name of the startJoint
public void removeFromHashMap(PhysicalSegment ps)
ps - the segment to removepublic void setupHashMaps(PhysicalSegment ps)
ps - the segmentpublic void copy()
public void updateCollision()
public void setEnabled(boolean enabled)
enabled - public boolean isEnabled()
public float getTotalMass()
public void setCOMOffset(float[] offset,
float mass)
offset - offset, scaled by massmass - mass of the offsetpublic float getCOMOffsetMass()
public float[] getCOMOffset()
public void updateCOM(float timeStep)
timeStep - time since last updatepublic String toString()
toString in class Objectpublic float[] getCOM()
public float[] getCOMDiff()
public float[] getCOMNoContacts()
public float[] getCOMNoContactsDiff()
public void setRootRotationBuffer(float[] rootRotationBuffer)
rootRotationBuffer - the rootRotationBuffer to setpublic void setRootTranslationBuffer(float[] rootTranslationBuffer)
rootTranslationBuffer - the rootTranslationBuffer to setprivate void setRootSimInfo()
public void clear()
public void setRelativeTranslation(float[] trans)
trans - new physical world position of the humanoid
public void setRotation(float[] center,
float[] q)
center - q -
public void setRelativeTranslation(float x,
float y,
float z)
protected void handleCollisions()
public String getId()
private void setJoint(VJoint vj)
public void setPoseFromVJoint(VJoint vj)
public void setNullPoseFromVJoint(VJoint vj)
private void setNullPoseForJoint(VJoint vj)
public float[] getCOMOffsetDiff()
public PhysicalSegment getRootSegment()
public void setRootSegment(PhysicalSegment rs)
public List<PhysicalJoint> getJoints()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||