void _setMat33Scale(ref b2Mat33 mat, float xfactor, float yfactor) { mat.SetZero(); mat.ex.x = xfactor; mat.ey.y = yfactor; mat.ez.z = 1; }
void _setMat33Translation(ref b2Mat33 mat, cpVect t) { mat.SetZero(); mat.ex.x = 1; mat.ey.y = 1; mat.ez.x = t.x; mat.ez.y = t.y; mat.ez.z = 1; }
void _setMat33Rotation(ref b2Mat33 mat, float angle) { mat.SetZero(); float c = cp.cpfcos(angle), s = cp.cpfsin(angle); mat.ex.x = c; mat.ey.x = -s; mat.ex.y = s; mat.ey.y = c; mat.ez.z = 1; }