/// <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; }
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); } }
/// <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; }
/// <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; }
/// <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; }
/// <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; }
/// <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; }
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); }
/// <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; }
/// <summary> /// Returns an enumerator that iterates through all fields. /// </summary> public static IEnumerator <double> GetEnumerator(dmat4 m) => m.GetEnumerator();
/// <summary> /// Creates a quaternion from the rotational part of this matrix. /// </summary> public static dquat ToQuaternion(dmat4 m) => m.ToQuaternion;
/// <summary> /// Creates a 1D array with all values (internal order) /// </summary> public static double[] Values1D(dmat4 m) => m.Values1D;
/// <summary> /// Creates a 2D array with all values (address: Values[x, y]) /// </summary> public static double[,] Values(dmat4 m) => m.Values;
/// <summary>Returns the determinant of m. </summary> protected double determinant(dmat4 m) { throw _invalidAccess; }
/// <summary>initialized the matrix with the upperleft part of m</summary> public dmat4x3(dmat4 m) { throw _invalidAccess; }
/// <summary>initialized the matrix with the upperleft part of m</summary> public dmat3x4(dmat4 m) { throw _invalidAccess; }
/// <summary>initialized the matrix with the upperleft part of m</summary> public dmat4x3(dmat4 m) { throw _invalidAccess; }
/// <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; }
/// <summary> /// Creates a quaternion from the rotational part of a dmat4. /// </summary> public dquat(dmat4 m) : this(FromMat4(m)) { }
/// <summary>Returns the determinant of m. </summary> protected double determinant(dmat4 m) { throw _invalidAccess; }
/// <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; }
/// <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; }
/// <summary> /// Creates a quaternion from the rotational part of a dmat3. /// </summary> public static dquat FromMat4(dmat4 m) => FromMat3(new dmat3(m));
/// <summary>Returns the determinant of m. </summary> protected float determinant(dmat4 m) { throw _invalidAccess; }
/// <summary>initialized the matrix with the upperleft part of m</summary> public dmat3x4(dmat4 m) { throw _invalidAccess; }