コード例 #1
0
ファイル: dmat2.cs プロジェクト: marcusanth/GlmSharp
 /// <summary>
 /// Constructs this matrix from a dmat4. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public dmat2(dmat4 m)
 {
     this.m00 = m.m00;
     this.m01 = m.m01;
     this.m10 = m.m10;
     this.m11 = m.m11;
 }
コード例 #2
0
ファイル: util.cs プロジェクト: bennywwg/csgeom
 public static void Transform(this CSGeom.D2.Loop loop, dmat4 transform)
 {
     for (int i = 0; i < loop.Count; i++)
     {
         dvec2 tmp = new dvec2(transform * new dvec4(loop[i].x, loop[i].y, 0, 1));
         loop[i] = new CSGeom.gvec2(tmp.x, tmp.y);
     }
 }
コード例 #3
0
 /// <summary>
 /// Constructs this matrix from a dmat4. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public dmat3x2(dmat4 m)
 {
     this.m00 = m.m00;
     this.m01 = m.m01;
     this.m10 = m.m10;
     this.m11 = m.m11;
     this.m20 = m.m20;
     this.m21 = m.m21;
 }
コード例 #4
0
 /// <summary>
 /// Constructs this matrix from a dmat4. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public dmat2x3(dmat4 m)
 {
     this.m00 = m.m00;
     this.m01 = m.m01;
     this.m02 = m.m02;
     this.m10 = m.m10;
     this.m11 = m.m11;
     this.m12 = m.m12;
 }
コード例 #5
0
ファイル: dmat2x4.cs プロジェクト: marcusanth/GlmSharp
 /// <summary>
 /// Constructs this matrix from a dmat4. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public dmat2x4(dmat4 m)
 {
     this.m00 = m.m00;
     this.m01 = m.m01;
     this.m02 = m.m02;
     this.m03 = m.m03;
     this.m10 = m.m10;
     this.m11 = m.m11;
     this.m12 = m.m12;
     this.m13 = m.m13;
 }
コード例 #6
0
 /// <summary>
 /// Constructs this matrix from a dmat4. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public dmat3(dmat4 m)
 {
     this.m00 = m.m00;
     this.m01 = m.m01;
     this.m02 = m.m02;
     this.m10 = m.m10;
     this.m11 = m.m11;
     this.m12 = m.m12;
     this.m20 = m.m20;
     this.m21 = m.m21;
     this.m22 = m.m22;
 }
コード例 #7
0
ファイル: dmat3x4.cs プロジェクト: marcusanth/GlmSharp
 /// <summary>
 /// Constructs this matrix from a dmat4. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public dmat3x4(dmat4 m)
 {
     this.m00 = m.m00;
     this.m01 = m.m01;
     this.m02 = m.m02;
     this.m03 = m.m03;
     this.m10 = m.m10;
     this.m11 = m.m11;
     this.m12 = m.m12;
     this.m13 = m.m13;
     this.m20 = m.m20;
     this.m21 = m.m21;
     this.m22 = m.m22;
     this.m23 = m.m23;
 }
コード例 #8
0
        public int TransformNode(Node node, float ifps)
        {
            float  deltaAngle = 60;
            float  moveSpeed  = 3;
            dmat4  transform  = node.getTransform();
            Random rand       = new Random();

            quat deltaRotation = new quat(rand.Next(-2, 2), rand.Next(-2, 2), rand.Next(-2, 2), deltaAngle * ifps);



            node.setWorldScale(currentObjectsScale);
            node.setWorldRotation(node.getWorldRotation() * deltaRotation);
            node.setWorldPosition(node.getWorldPosition() + forwardDirection * ifps * moveSpeed);

            return(1);
        }
コード例 #9
0
 /// <summary>
 /// Multiply matrix x by matrix y component-wise, i.e., result[i][j] is the scalar product of x[i][j] and y[i][j].
 /// Note: to get linear algebraic matrix multiplication, use the multiply operator (*).
 /// </summary>
 protected dmat4 matrixCompMult(dmat4 x, dmat4 y)
 {
     throw _invalidAccess;
 }
コード例 #10
0
ファイル: dmat4.glm.cs プロジェクト: marcusanth/GlmSharp
 /// <summary>
 /// Returns an enumerator that iterates through all fields.
 /// </summary>
 public static IEnumerator <double> GetEnumerator(dmat4 m) => m.GetEnumerator();
コード例 #11
0
ファイル: dmat4.glm.cs プロジェクト: marcusanth/GlmSharp
 /// <summary>
 /// Creates a quaternion from the rotational part of this matrix.
 /// </summary>
 public static dquat ToQuaternion(dmat4 m) => m.ToQuaternion;
コード例 #12
0
ファイル: dmat4.glm.cs プロジェクト: marcusanth/GlmSharp
 /// <summary>
 /// Creates a 1D array with all values (internal order)
 /// </summary>
 public static double[] Values1D(dmat4 m) => m.Values1D;
コード例 #13
0
ファイル: dmat4.glm.cs プロジェクト: marcusanth/GlmSharp
 /// <summary>
 /// Creates a 2D array with all values (address: Values[x, y])
 /// </summary>
 public static double[,] Values(dmat4 m) => m.Values;
コード例 #14
0
 /// <summary>Returns the determinant of m. </summary>
 protected double determinant(dmat4 m)
 {
     throw _invalidAccess;
 }
コード例 #15
0
 /// <summary>initialized the matrix with the upperleft part of m</summary>
 public dmat4x3(dmat4 m)
 {
     throw _invalidAccess;
 }
コード例 #16
0
 /// <summary>initialized the matrix with the upperleft part of m</summary>
 public dmat3x4(dmat4 m)
 {
     throw _invalidAccess;
 }
コード例 #17
0
 /// <summary>initialized the matrix with the upperleft part of m</summary>
 public dmat4x3(dmat4 m)
 {
     throw _invalidAccess;
 }
コード例 #18
0
 /// <summary>
 /// Returns a matrix that is the transpose of m. 
 /// The input matrix m is not modified.
 /// </summary>
 protected dmat4 transpose(dmat4 m)
 {
     throw _invalidAccess;
 }
コード例 #19
0
ファイル: dquat.cs プロジェクト: marcusanth/GlmSharp
 /// <summary>
 /// Creates a quaternion from the rotational part of a dmat4.
 /// </summary>
 public dquat(dmat4 m)
     : this(FromMat4(m))
 {
 }
コード例 #20
0
 /// <summary>Returns the determinant of m. </summary>
 protected double determinant(dmat4 m)
 {
     throw _invalidAccess;
 }
コード例 #21
0
 /// <summary>
 /// Returns a matrix that is the transpose of m.
 /// The input matrix m is not modified.
 /// </summary>
 protected dmat4 transpose(dmat4 m)
 {
     throw _invalidAccess;
 }
コード例 #22
0
 /// <summary>
 /// Multiply matrix x by matrix y component-wise, i.e., result[i][j] is the scalar product of x[i][j] and y[i][j].
 /// Note: to get linear algebraic matrix multiplication, use the multiply operator (*).
 /// </summary>
 protected dmat4 matrixCompMult(dmat4 x, dmat4 y)
 {
     throw _invalidAccess;
 }
コード例 #23
0
ファイル: dquat.cs プロジェクト: marcusanth/GlmSharp
 /// <summary>
 /// Creates a quaternion from the rotational part of a dmat3.
 /// </summary>
 public static dquat FromMat4(dmat4 m) => FromMat3(new dmat3(m));
コード例 #24
0
 /// <summary>Returns the determinant of m. </summary>
 protected float determinant(dmat4 m)
 {
     throw _invalidAccess;
 }
コード例 #25
0
 /// <summary>initialized the matrix with the upperleft part of m</summary>
 public dmat3x4(dmat4 m)
 {
     throw _invalidAccess;
 }