コード例 #1
0
 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;
 }
コード例 #2
0
 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];
     }
 }
コード例 #3
0
 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];
     }
 }
コード例 #4
0
        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);
        }
コード例 #5
0
 public Matrix44(Matrix43 Matrix)
     : this(Matrix, new Vector4())
 {
 }
コード例 #6
0
 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));
 }
コード例 #7
0
 public Matrix44(Matrix43 Matrix)
     : this(Matrix, new Vector4())
 {
 }