|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.java.dev.joode.Mass
public class Mass
The mass parameters of a rigid body
| Field Summary | |
|---|---|
static boolean |
DEBUG
|
Matrix3 |
invI
inverse matrix of moment of inertia NEVER USE THIS TO MODIFY THE MASS OF A BODY |
float |
invMass
inverse of total mass NEVER USE THIS TO MODIFY THE MASS OF A BODY |
float |
mass
total mass NEVER USE THIS TO MODIFY THE MASS OF A BODY |
Matrix3 |
momentOfInertia
3x3 inertia tensor in body frame, about POR NEVER USE THIS TO MODIFY THE MASS OF A BODY |
| Method Summary | |
|---|---|
void |
add(Mass b)
Add the passed mass to this mass. |
void |
adjust(float newmass)
Given mass parameters for some object, adjust them so the total mass is now newmass. |
boolean |
checkMass()
Checks whether this Mass has consistent
properties. |
Mass |
cloneState(ClonedReferences util)
deep clones the state object, any references to other SimState objects should be cloned and assigned to the clone via the ClonedReferences util object. |
static Mass |
create(float themass,
float cgx,
float cgy,
float cgz,
float I11,
float I22,
float I33,
float I12,
float I13,
float I23)
Set the mass parameters to the given values. |
static Mass |
createBox(float density,
float lx,
float ly,
float lz)
Set the mass parameters to represent a box of the given dimensions and density, with the center of mass at (0,0,0) relative to the body. |
static Mass |
createBoxTotal(float total_mass,
float lx,
float ly,
float lz)
Set the mass parameters to represent a box of the given dimensions and density, with the center of mass at (0,0,0) relative to the body. |
static Mass |
createBoxTotal(float total_mass,
Vector3 l)
|
static Mass |
createCapsule(float density,
int direction,
float radius,
float length)
Set the mass parameters to represent a capped cylinder of the given parameters and density, with the center of mass at (0,0,0) relative to the body. |
static Mass |
createCapsuleTotal(float total_mass,
int direction,
float radius,
float length)
Set the mass parameters to represent a capped cylinder of the given parameters and density, with the center of mass at (0,0,0) relative to the body. |
static Mass |
createCylinder(float density,
int direction,
float radius,
float length)
Set the mass parameters to represent a flat-ended cylinder of the given parameters and density, with the center of mass at (0,0,0) relative to the body. |
static Mass |
createCylinderHollowTotal(float total_mass,
int direction,
float radius,
float length)
Sets mass properties to that of a cylinder with all of it's mass distributed evenly along it's shell. |
static Mass |
createCylinderTotal(float total_mass,
int direction,
float radius,
float length)
Set the mass parameters to represent a flat-ended cylinder of the given parameters and density, with the center of mass at (0,0,0) relative to the body. |
static Mass |
createSphere(float density,
float radius)
Set the mass parameters to represent a sphere of the given radius and density, with the center of mass at (0,0,0) relative to the body. |
static Mass |
createSphereHollowTotal(float total_mass,
float radius)
Sets mass and inertial tensor to that of a sphere with all of it's mass distributed evenly on it's shell. |
static Mass |
createSphereTotal(float total_mass,
float radius)
Set the mass parameters to represent a sphere of the given radius and density, with the center of mass at (0,0,0) relative to the body. |
void |
rotate(Matrix3 R)
Given mass parameters for some object, adjust them to represent the object rotated by R relative to the body frame. |
void |
translate(float x,
float y,
float z)
Given mass parameters for some object, adjust them to represent the object displaced by (x,y,z) relative to the body frame. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean DEBUG
public float mass
public float invMass
public final Matrix3 momentOfInertia
public final Matrix3 invI
| Method Detail |
|---|
public boolean checkMass()
Mass has consistent
properties.
public static Mass create(float themass,
float cgx,
float cgy,
float cgz,
float I11,
float I22,
float I33,
float I12,
float I13,
float I23)
public static Mass createSphere(float density,
float radius)
public static Mass createSphereTotal(float total_mass,
float radius)
public static Mass createSphereHollowTotal(float total_mass,
float radius)
public static Mass createCapsule(float density,
int direction,
float radius,
float length)
public static Mass createCapsuleTotal(float total_mass,
int direction,
float radius,
float length)
public static Mass createCylinder(float density,
int direction,
float radius,
float length)
public static Mass createCylinderTotal(float total_mass,
int direction,
float radius,
float length)
public static Mass createCylinderHollowTotal(float total_mass,
int direction,
float radius,
float length)
public static Mass createBox(float density,
float lx,
float ly,
float lz)
public static Mass createBoxTotal(float total_mass,
float lx,
float ly,
float lz)
public static Mass createBoxTotal(float total_mass,
Vector3 l)
public void adjust(float newmass)
public void translate(float x,
float y,
float z)
public void rotate(Matrix3 R)
public void add(Mass b)
public Mass cloneState(ClonedReferences util)
SimStatedeep clones the state object, any references to other SimState objects should be cloned and assigned to the clone via the ClonedReferences util object. The util object ensures that multiple clones of the same object are not performed during a clone operation.
cloneState in interface SimStateutil - instanciate a new one if top level cloning
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||