public void calculateInertiaTensor() {
		if (collisionObject instanceof SphereObject) {
			double d = 2D / 5D * mass
					* ((SphereObject) collisionObject).getRadius()
					* ((SphereObject) collisionObject).getRadius();
			setInertiaLocal(new Matrix3d(d, 0, 0, 0, d, 0, 0, 0, d));
		} else if (collisionObject instanceof MeshObject) {
			MeshObject mesh = (MeshObject) collisionObject;
			Vector3d[] vertices = mesh.getLocalVertices();
			Matrix3d inertia = new Matrix3d();
			for (Vector3d v : vertices) {
				Matrix3d mat = new Matrix3d(v.x * v.x, v.x * v.y, v.x * v.z,
						v.y * v.x, v.y * v.y, v.y * v.z, v.z * v.x, v.z * v.y,
						v.z * v.z);
				inertia.add(mat);
			}
			inertia.mul(mass / vertices.length);
			setInertiaLocal(inertia);
		}
	}