|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.odejava.Mass
public class Mass
Mass properties, can be used to construct masses that are not coupled to a Body.
| Constructor Summary | |
|---|---|
Mass()
Creates a Mass |
|
Mass(org.odejava.ode.dMass m)
Controls the mass of a given dMass |
|
| Method Summary | |
|---|---|
void |
adjust(float newMass)
Changes mass to newMass |
void |
adjust(float newMass,
Body body)
Changes the mass to newMass and apply it to the body |
void |
getC(float[] C)
Get the center of gravity |
org.odejava.ode.dMass |
getdMass()
Get the dMass |
void |
getI(float[] I)
Get the 3x3 Inertia tensor |
float |
getMass()
Get the mass |
void |
rotate(float[] R)
Rotate the mass |
void |
setC(float[] c)
Sets the center of mass |
void |
setC(float[] c,
Body b)
Set the center of mass and apply it to a body |
void |
setFromBox(float[] size,
float density)
Set box mass |
void |
setFromCapsule(int direction,
float radius,
float length,
float density)
Set capsule mass |
void |
setFromCylinder(int direction,
float radius,
float length,
float density)
Set cylinder mass |
void |
setFromSphere(float radius,
float density)
Set sphere mass |
void |
setI(float[] I)
Sets the inertia tensor |
void |
setI(float[] I,
Body b)
Set the inertia tensor and apply it to a body |
void |
setMass(Geom geom,
float density)
Set mass parameters based on geometry and density |
void |
translate(float x,
float y,
float z)
Adjust the mass paramaters to represent the object displaced by (x,y,z) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Mass(org.odejava.ode.dMass m)
m - the dMasspublic Mass()
| Method Detail |
|---|
public void setFromSphere(float radius,
float density)
public void setFromBox(float[] size,
float density)
public void setFromCapsule(int direction,
float radius,
float length,
float density)
direction - direction of the long axis of the cylinder: 1=x, 2=y, 3=z
public void setFromCylinder(int direction,
float radius,
float length,
float density)
direction - direction of the long axis of the cylinder: 1=x, 2=y, 3=z
public void setMass(Geom geom,
float density)
public void adjust(float newMass)
newMass - the new mass
public void adjust(float newMass,
Body body)
newMass - new massbody - body to apply the mass to
public void translate(float x,
float y,
float z)
public void rotate(float[] R)
R - rotation matrixpublic float getMass()
public org.odejava.ode.dMass getdMass()
public void setI(float[] I)
I - the new inertia tensor
public void setI(float[] I,
Body b)
public void getI(float[] I)
I - An object to place the values intopublic void setC(float[] c)
c - the new center of mass
public void setC(float[] c,
Body b)
public void getC(float[] C)
C - An object to place the values into
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||