# Class MassData

java.lang.Object
com.codename1.gaming.physics.box2d.collision.shapes.MassData

public class MassData extends Object
This holds the mass data computed for a shape.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `final Vec2`
  `center`
  The position of the shape's centroid relative to the shape's origin.
  `float`
  `I`
  The rotational inertia of the shape about the local origin.
  `float`
  `mass`
  The mass of the shape, usually in kilograms.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `MassData()`
  Blank mass data
  `MassData(MassData md)`
  Copies from the given mass data

- ## Method Summary

  Modifier and Type
  Method
  Description
  `MassData`
  `clone()`
  Return a copy of this object.
  `void`
  `set(MassData md)`

  ### Methods inherited from class Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### mass

    public float mass
    The mass of the shape, usually in kilograms.

  - ### center

    public final Vec2 center
    The position of the shape's centroid relative to the shape's origin.

  - ### I

    public float I
    The rotational inertia of the shape about the local origin.

- ## Constructor Details

  - ### MassData

    public MassData()
    Blank mass data

  - ### MassData

    public MassData(MassData md)
    Copies from the given mass data
    Parameters:
      `md` - mass data to copy from

- ## Method Details

  - ### set

    public void set(MassData md)

  - ### clone

    public MassData clone()
    Return a copy of this object.
    Overrides:
      `clone` in class `Object`