computeMass method
Compute the mass properties of this shape using its dimensions and
density. The inertia tensor is computed about the local origin.
density
should be in kilograms per meter squared.
Implementation
@override
void computeMass(MassData massData, double density) {
massData.mass = 0.0;
massData.center
..setFrom(vertex1)
..add(vertex2)
..scale(0.5);
massData.I = 0.0;
}