Trees | Index | Help |
|
---|
Module ode :: Class Mass |
|
object
--+
|
Mass
Mass parameters of a rigid body.
This class stores mass parameters of a rigid body which can be accessed through the following attributes:Method Summary | |
---|---|
x.__add__(y) <==> x+y | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
x.__radd__(y) <==> y+x | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) | |
Add the mass b to the mass object. | |
Adjust the total mass. | |
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. | |
Set the mass parameters to represent a box of the given dimensions and mass, with the center of mass at (0,0,0) relative to the body. | |
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. | |
Set the mass parameters to represent a capped cylinder of the given parameters and mass, with the center of mass at (0,0,0) relative to the body. | |
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. | |
Set the mass parameters to represent a flat-ended cylinder of the given parameters and mass, with the center of mass at (0,0,0) relative to the body. | |
Set the mass parameters to the given values. | |
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. | |
Set the mass parameters to represent a sphere of the given radius and mass, with the center of mass at (0,0,0) relative to the body. | |
Set all the mass parameters to zero. | |
Adjust mass parameters. | |
Inherited from object | |
x.__init__(...) initializes x; see x.__class__.__doc__ for signature | |
x.__hash__() <==> hash(x) | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) |
Instance Variable Summary | |
---|---|
3-tuple of floats | c : The center of gravity position in body frame (cx, cy, cz) |
3-tuple of 3-tuples of floats | I : The 3x3 inertia tensor in body frame ((I11, I12, I13), (I12, I22,
I23), (I13, I23, I33)) |
float | mass : The total mass of the body |
Method Details |
---|
__add__(x,
y)
x.__add__(y) <==> x+y
|
__delattr__(...)x.__delattr__('name') <==> del x.name
|
__getattribute__(...)x.__getattribute__('name') <==> x.name
|
__new__(T, S, ...)T.__new__(S, ...) -> a new object with type S, a subtype of T
|
__radd__(x,
y)
x.__radd__(y) <==> y+x
|
__setattr__(...)x.__setattr__('name', value) <==> x.name = value
|
__str__(x)
x.__str__() <==> str(x)
|
add(b)Add the mass b to the mass object. Masses can also be added using the + operator.
|
adjust(newmass)Adjust the total mass. Given mass parameters for some object, adjust them so the total mass is now newmass. This is useful when using the setXyz() methods to set the mass parameters for certain objects - they take the object density, not the total mass.
|
setBox(density, lx, ly, 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. The side lengths of the box along the x, y and z axes are lx, ly and lz.
|
setBoxTotal(total_mass, lx, ly, lz)Set the mass parameters to represent a box of the given dimensions and mass, with the center of mass at (0,0,0) relative to the body. The side lengths of the box along the x, y and z axes are lx, ly and lz.
|
setCappedCylinder(density, direction, r, h)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. The radius of the cylinder (and the spherical cap) is r. The length of the cylinder (not counting the spherical cap) is h. The cylinder's long axis is oriented along the body's x, y or z axis according to the value of direction (1=x, 2=y, 3=z).
|
setCappedCylinderTotal(total_mass, direction, r, h)Set the mass parameters to represent a capped cylinder of the given parameters and mass, with the center of mass at (0,0,0) relative to the body. The radius of the cylinder (and the spherical cap) is r. The length of the cylinder (not counting the spherical cap) is h. The cylinder's long axis is oriented along the body's x, y or z axis according to the value of direction (1=x, 2=y, 3=z).
|
setCylinder(density, direction, r, h)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. The radius of the cylinder is r. The length of the cylinder is h. The cylinder's long axis is oriented along the body's x, y or z axis according to the value of direction (1=x, 2=y, 3=z).
|
setCylinderTotal(total_mass, direction, r, h)Set the mass parameters to represent a flat-ended cylinder of the given parameters and mass, with the center of mass at (0,0,0) relative to the body. The radius of the cylinder is r. The length of the cylinder is h. The cylinder's long axis is oriented along the body's x, y or z axis according to the value of direction (1=x, 2=y, 3=z).
|
setParameters(mass, cgx, cgy, cgz, I11, I22, I33, I12, I13, I23)Set the mass parameters to the given values.
|
setSphere(density, 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.
|
setSphereTotal(total_mass, radius)Set the mass parameters to represent a sphere of the given radius and mass, with the center of mass at (0,0,0) relative to the body.
|
setZero()Set all the mass parameters to zero. |
translate(t)Adjust mass parameters. Given mass parameters for some object, adjust them to represent the object displaced by (x,y,z) relative to the body frame.
|
Instance Variable Details |
---|
cThe center of gravity position in body frame (cx, cy, cz)
|
IThe 3x3 inertia tensor in body frame ((I11, I12, I13), (I12, I22, I23), (I13, I23, I33))
|
massThe total mass of the body
|
Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Sun Feb 4 17:54:12 2007 | http://epydoc.sf.net |