MassData class
class MassData { /** The mass of the shape, usually in kilograms. */ num mass; /** The position of the shape's centroid relative to the shape's origin. */ Vector center; /** The rotational inertia of the shape about the local origin. */ num inertia; /** * Constructs a blank mass data. */ MassData() : mass = 0, inertia = 0, center = new Vector() { } /** * Copies from the given mass data. */ MassData.copy(MassData md) : mass = md.mass, inertia = md.inertia, center = new Vector.copy(md.center) { } /** * Sets this mass data equal to the given mass data. */ void setFrom(MassData md) { mass = md.mass; inertia = md.inertia; center.setFrom(md.center); } }
Constructors
new MassData() #
Constructs a blank mass data.
MassData() : mass = 0, inertia = 0, center = new Vector() { }