public static Matrix33 CreateScale(Vector3 Scale) { Matrix33 result = Matrix33.Identity; result[0, 0] = Scale.X; result[1, 1] = Scale.Y; result[2, 2] = Scale.X; return(result); }
public Matrix44(Matrix33 Matrix, float M14, float M24, float M34, Vector4 Row3) { row0 = new Vector4(); row1 = new Vector4(); row2 = new Vector4(); row3 = Row3; for (int i = 0; i < 9; i++) { this[i / 3, i % 3] = Matrix[i]; } row0.W = M14; row1.W = M24; row2.W = M34; }
public static Matrix33 operator *(Matrix33 Left, Matrix33 Right) { Matrix33 result = new Matrix33(); for (int row = 0; row < 3; row++) { for (int col = 0; col < 3; col++) { for (int inner = 0; inner < 3; inner++) { result[row, col] += Left[inner, col] * Right[row, inner]; } } } return result; }
public static Matrix33 operator *(Matrix33 Left, Matrix33 Right) { Matrix33 result = new Matrix33(); for (int row = 0; row < 3; row++) { for (int col = 0; col < 3; col++) { for (int inner = 0; inner < 3; inner++) { result[row, col] += Left[inner, col] * Right[row, inner]; } } } return(result); }
public Matrix44(Matrix33 Matrix) : this(Matrix, 0, 0, 0, new Vector4()) { }
public void MultMatrix33(Matrix33 mtx) { if (MtxMode == NDSMatrixMode.Position || MtxMode == NDSMatrixMode.Position_Vector) CurPosMtx = CurPosMtx * new Matrix44(mtx, 0, 0, 0, new Vector4(0, 0, 0, 1)); if (MtxMode == NDSMatrixMode.Position_Vector) CurDirMtx = CurDirMtx * new Matrix44(mtx, 0, 0, 0, new Vector4(0, 0, 0, 1)); }