public static Vector Multiply(Matrix m, Vector v) { Vector r = new Vector{ X = (m.m_m[0, 0] * v.X) + (m.m_m[0, 1] * v.Y) + (m.m_m[0, 2] * v.Z), Y = (m.m_m[1, 0] * v.X) + (m.m_m[1, 1] * v.Y) + (m.m_m[1, 2] * v.Z), Z = (m.m_m[2, 0] * v.X) + (m.m_m[2, 1] * v.Y) + (m.m_m[2, 2] * v.Z), }; return r; }
public void VecToRow(int row_index, Vector v) { m_m[row_index, 0] = v.X; m_m[row_index, 1] = v.Y; m_m[row_index, 2] = v.Z; }