|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.physics.Mass
hmi.physics.ode.OdeMass
public class OdeMass
| Field Summary | |
|---|---|
private org.odejava.Mass |
mass
|
| Constructor Summary | |
|---|---|
OdeMass()
|
|
OdeMass(org.odejava.ode.dMass m)
|
|
| Method Summary | |
|---|---|
void |
adjustMass(float newMass)
Adjust the mass to be newMass (in kg) |
void |
adjustMass(float m,
org.odejava.Body b)
|
Mass |
copy()
|
void |
getCOM(float[] center)
Get the center of mass |
void |
getInertiaTensor(float[] I)
Get the inertia tensor |
float |
getMass()
Get the mass (in kg) |
org.odejava.Mass |
getOMass()
Gets the ode mass representation |
void |
rotate(float[] q)
Rotates the inertia tensor |
void |
setCOM(float[] c)
Sets the center of mass |
void |
setCOM(float[] c,
org.odejava.Body body)
Set the mass and apply it to a body |
void |
setFromBox(float[] size,
float density)
Set a new box mass, assumes center at (0,0,0) |
void |
setFromCapsule(float radius,
float height,
int direction,
float density)
Set a capsule mass, assume center = CoM at (0,0,0) |
void |
setFromGMesh(GMesh m,
float density)
Set mass properties on the basis of a closed GMesh, assumes uniform density density is set in kg/m3 (or mass unit/length unit^3) |
void |
setFromSphere(float radius,
float density)
Set a sphere-shaped mass, assume center at (0,0,0) |
void |
setInertiaTensor(float[] I)
Sets the inertia tensor |
void |
setInertiaTensor(float[] I,
org.odejava.Body body)
Set the inertia tensor and apply it to a body |
String |
toString()
String representation |
void |
translate(float x,
float y,
float z)
Translates the COM and inertia tensor |
| Methods inherited from class hmi.physics.Mass |
|---|
addMass, scale, scale, translate |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private org.odejava.Mass mass
| Constructor Detail |
|---|
public OdeMass()
public OdeMass(org.odejava.ode.dMass m)
| Method Detail |
|---|
public void adjustMass(float m,
org.odejava.Body b)
public void adjustMass(float newMass)
Mass
adjustMass in class MassnewMass - the new masspublic void getCOM(float[] center)
Mass
getCOM in class Masspublic void getInertiaTensor(float[] I)
Mass
getInertiaTensor in class Masspublic org.odejava.Mass getOMass()
public float getMass()
Mass
getMass in class Mass
public void setFromBox(float[] size,
float density)
Mass
setFromBox in class Masssize - of the sides of the boxdensity - the density of the box
public void setFromGMesh(GMesh m,
float density)
Mass
setFromGMesh in class Mass
public void translate(float x,
float y,
float z)
Mass
translate in class Masspublic String toString()
Mass
toString in class Mass
public void setFromSphere(float radius,
float density)
Mass
setFromSphere in class Massradius - radius of the spheredensity - density of the sphere
public void setFromCapsule(float radius,
float height,
int direction,
float density)
Mass
setFromCapsule in class Massradius - radius of the spheres and cylinderheight - height of the cylinderdirection - direction of the long axes of the cylinder: 1=x, 2=y, 3=zdensity - densitypublic void setCOM(float[] c)
Mass
setCOM in class Mass
public void setCOM(float[] c,
org.odejava.Body body)
public void setInertiaTensor(float[] I)
Mass
setInertiaTensor in class Mass
public void setInertiaTensor(float[] I,
org.odejava.Body body)
public void rotate(float[] q)
Mass
rotate in class Massq - rotation as quaternionpublic Mass copy()
copy in class Mass
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||