Exemplo n.º 1
0
 public bool Equals(Matrix4x3 M) =>
     (m11 == M.m11 &&
      m12 == M.m12 &&
      m13 == M.m13 &&
      m21 == M.m21 &&
      m22 == M.m22 &&
      m23 == M.m23 &&
      m31 == M.m31 &&
      m32 == M.m32 &&
      m33 == M.m33 &&
      m41 == M.m41 &&
      m42 == M.m42 &&
      m43 == M.m43);
Exemplo n.º 2
0
 public static void SerializeMatrix(IDataBlock block, Matrix4x3 mat)
 {
     block.Writer.Write(mat.m11);
     block.Writer.Write(mat.m12);
     block.Writer.Write(mat.m13);
     block.Writer.Write(mat.m21);
     block.Writer.Write(mat.m22);
     block.Writer.Write(mat.m23);
     block.Writer.Write(mat.m31);
     block.Writer.Write(mat.m32);
     block.Writer.Write(mat.m33);
     block.Writer.Write(mat.m41);
     block.Writer.Write(mat.m42);
     block.Writer.Write(mat.m43);
 }
Exemplo n.º 3
0
        public void Vector3DTransform(Matrix4x3 Transform)
        {
            if (Transform.IsIdentity)
            {
                return;
            }

            float newX = X * Transform.m11 + Y * Transform.m21 + Z * Transform.m31;
            float newY = X * Transform.m12 + Y * Transform.m22 + Z * Transform.m32;
            float newZ = X * Transform.m13 + Y * Transform.m23 + Z * Transform.m33;

            X = newX;
            Y = newY;
            Z = newZ;
        }
Exemplo n.º 4
0
        public void Point3DTransform(Matrix4x3 Transform)
        {
            if (Transform.IsIdentity)
            {
                return;
            }

            float newX = (X * Transform.m11 + Y * Transform.m21 + Z * Transform.m31 + Transform.m41);
            float newY = (X * Transform.m12 + Y * Transform.m22 + Z * Transform.m32 + Transform.m42);
            float newZ = (X * Transform.m13 + Y * Transform.m23 + Z * Transform.m33 + Transform.m43);

            X = newX;
            Y = newY;
            Z = newZ;
        }
Exemplo n.º 5
0
        public MatrixBlock_F900(EndianReader reader)
            : base(reader, 0xF900)
        {
            var m11 = reader.ReadSingle();
            var m12 = reader.ReadSingle();
            var m13 = reader.ReadSingle();
            reader.ReadSingle(); //0.0f

            var m21 = reader.ReadSingle();
            var m22 = reader.ReadSingle();
            var m23 = reader.ReadSingle();
            reader.ReadSingle(); //0.0f

            var m31 = reader.ReadSingle();
            var m32 = reader.ReadSingle();
            var m33 = reader.ReadSingle();
            reader.ReadSingle(); //0.0f

            var m41 = reader.ReadSingle();
            var m42 = reader.ReadSingle();
            var m43 = reader.ReadSingle();
            reader.ReadSingle(); //1.0f

            Data = new Matrix4x3(
                m11, m12, m13,
                m21, m22, m23,
                m31, m32, m33,
                m41, m42, m43);
        }
Exemplo n.º 6
0
        public void Vector3DTransform(Matrix4x3 Transform)
        {
            if (Transform.IsIdentity) return;

            float newX = X * Transform.m11 + Y * Transform.m21 + Z * Transform.m31;
            float newY = X * Transform.m12 + Y * Transform.m22 + Z * Transform.m32;
            float newZ = X * Transform.m13 + Y * Transform.m23 + Z * Transform.m33;

            X = newX;
            Y = newY;
            Z = newZ;
        }
Exemplo n.º 7
0
        public void Point3DTransform(Matrix4x3 Transform)
        {
            if (Transform.IsIdentity) return;

            float newX = (X * Transform.m11 + Y * Transform.m21 + Z * Transform.m31 + Transform.m41);
            float newY = (X * Transform.m12 + Y * Transform.m22 + Z * Transform.m32 + Transform.m42);
            float newZ = (X * Transform.m13 + Y * Transform.m23 + Z * Transform.m33 + Transform.m43);

            X = newX;
            Y = newY;
            Z = newZ;
        }