public static Matrix43 operator *(Matrix43 Left, Matrix43 Right) { Matrix44 l = new Matrix44(Left, new Vector4(0, 0, 0, 1)); Matrix44 r = new Matrix44(Right, new Vector4(0, 0, 0, 1)); Matrix44 Result = l * r; Matrix43 result2 = new Matrix43(); for (int row = 0; row < 4; row++) { for (int col = 0; col < 3; col++) { result2[row, col] = Result[row,col]; } } return result2; }
public Matrix44(Matrix43 Matrix, Vector4 Column3) { row0 = new Vector4(); row1 = new Vector4(); row2 = new Vector4(); row3 = new Vector4(); row0.W = Column3.X; row1.W = Column3.Y; row2.W = Column3.Z; row3.W = Column3.W; for (int i = 0; i < 12; i++) { this[i / 3, i % 3] = Matrix[i]; } }
public static Matrix43 operator *(Matrix43 Left, Matrix43 Right) { Matrix44 l = new Matrix44(Left, new Vector4(0, 0, 0, 1)); Matrix44 r = new Matrix44(Right, new Vector4(0, 0, 0, 1)); Matrix44 Result = l * r; Matrix43 result2 = new Matrix43(); for (int row = 0; row < 4; row++) { for (int col = 0; col < 3; col++) { result2[row, col] = Result[row, col]; } } return(result2); }
public Matrix44(Matrix43 Matrix) : this(Matrix, new Vector4()) { }
public void MultMatrix43(Matrix43 mtx) { if (MtxMode == NDSMatrixMode.Position || MtxMode == NDSMatrixMode.Position_Vector) CurPosMtx = CurPosMtx * new Matrix44(mtx, new Vector4(0, 0, 0, 1)); if (MtxMode == NDSMatrixMode.Position_Vector) CurDirMtx = CurDirMtx * new Matrix44(mtx, new Vector4(0, 0, 0, 1)); }