void ProcessMatrix() { _local = new Matrix4x5(localPosition, localRotation); _localToWorld = parent ? _parent.localToWorldMatrix * _local : _local; _worldToLocal = Matrix4x5.Inverse(_localToWorld); _matrixDirty = false; }
/// <summary> /// Inverse the matrix /// </summary> public static Matrix4x5 Inverse(Matrix4x5 t) { t.rotation = Matrix4.Transpose(t.rotation); t.position = t.rotation * -t.position; return(t); }
/// <summary> /// Transform the inertia. /// </summary> public static Tensor4 Transform(Tensor4 I, Matrix4x5 T, float mass) { return(Transform(I, T.rotation) + Transform(T.position, mass)); }