Exemple #1
0
 void ProcessMatrix()
 {
     _local        = new Matrix4x5(localPosition, localRotation);
     _localToWorld = parent ? _parent.localToWorldMatrix * _local : _local;
     _worldToLocal = Matrix4x5.Inverse(_localToWorld);
     _matrixDirty  = false;
 }
Exemple #2
0
 /// <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);
 }
Exemple #3
0
 /// <summary>
 /// Transform the inertia.
 /// </summary>
 public static Tensor4 Transform(Tensor4 I, Matrix4x5 T, float mass)
 {
     return(Transform(I, T.rotation) + Transform(T.position, mass));
 }