Exemplo n.º 1
0
 public static void TransformWithoutOverlap(ref Vector3Wide v, ref Matrix3x3Wide m, out Vector3Wide result)
 {
     result.X = v.X * m.X.X + v.Y * m.Y.X + v.Z * m.Z.X;
     result.Y = v.X * m.X.Y + v.Y * m.Y.Y + v.Z * m.Z.Y;
     result.Z = v.X * m.X.Z + v.Y * m.Y.Z + v.Z * m.Z.Z;
 }
Exemplo n.º 2
0
 public static void Transform(ref Vector3Wide v, ref Matrix3x3Wide m, out Vector3Wide result)
 {
     TransformWithoutOverlap(ref v, ref m, out var temp);
     result = temp;
 }
Exemplo n.º 3
0
        public static void MultiplyByTransposeWithoutOverlap(ref Matrix3x3Wide a, ref Matrix3x3Wide b, out Matrix3x3Wide result)
        {
            result.X.X = a.X.X * b.X.X + a.X.Y * b.X.Y + a.X.Z * b.X.Z;
            result.X.Y = a.X.X * b.Y.X + a.X.Y * b.Y.Y + a.X.Z * b.Y.Z;
            result.X.Z = a.X.X * b.Z.X + a.X.Y * b.Z.Y + a.X.Z * b.Z.Z;

            result.Y.X = a.Y.X * b.X.X + a.Y.Y * b.X.Y + a.Y.Z * b.X.Z;
            result.Y.Y = a.Y.X * b.Y.X + a.Y.Y * b.Y.Y + a.Y.Z * b.Y.Z;
            result.Y.Z = a.Y.X * b.Z.X + a.Y.Y * b.Z.Y + a.Y.Z * b.Z.Z;

            result.Z.X = a.Z.X * b.X.X + a.Z.Y * b.X.Y + a.Z.Z * b.X.Z;
            result.Z.Y = a.Z.X * b.Y.X + a.Z.Y * b.Y.Y + a.Z.Z * b.Y.Z;
            result.Z.Z = a.Z.X * b.Z.X + a.Z.Y * b.Z.Y + a.Z.Z * b.Z.Z;
        }