public static Matrix33 CreateScale(Vector3 s) { var matrix = new Matrix33(); matrix.SetScale(s); return(matrix); }
public static Matrix33 CreateRotationAA(float c, float s, Vector3 axis) { var matrix = new Matrix33(); matrix.SetRotationAA(c, s, axis); return(matrix); }
public static Matrix33 CreateIdentity() { var matrix = new Matrix33(); matrix.SetIdentity(); return(matrix); }
public static Matrix33 CreateFromVectors(Vector3 vx, Vector3 vy, Vector3 vz) { var matrix = new Matrix33(); matrix.SetFromVectors(vx, vy, vz); return(matrix); }
public static Matrix33 operator *(Matrix33 left, Matrix33 right) { var m = new Matrix33(); m.M00 = left.M00 * right.M00 + left.M01 * right.M10 + left.M02 * right.M20; m.M01 = left.M00 * right.M01 + left.M01 * right.M11 + left.M02 * right.M21; m.M02 = left.M00 * right.M02 + left.M01 * right.M12 + left.M02 * right.M22; m.M10 = left.M10 * right.M00 + left.M11 * right.M10 + left.M12 * right.M20; m.M11 = left.M10 * right.M01 + left.M11 * right.M11 + left.M12 * right.M21; m.M12 = left.M10 * right.M02 + left.M11 * right.M12 + left.M12 * right.M22; m.M20 = left.M20 * right.M00 + left.M21 * right.M10 + left.M22 * right.M20; m.M21 = left.M20 * right.M01 + left.M21 * right.M11 + left.M22 * right.M21; m.M22 = left.M20 * right.M02 + left.M21 * right.M12 + left.M22 * right.M22; return(m); }
public void SetScale(Vector3 s, Vector3 t = default(Vector3)) { this = new Matrix34(Matrix33.CreateScale(s)); SetTranslation(t); }
/*! * Create a rotation matrix around an arbitrary axis (Eulers Theorem). * The axis is specified as an normalized Vector3. The angle is assumed to be in radians. * This function also assumes a translation-vector and stores it in the right column. * * Example: * Matrix34 m34; * Vector3 axis=GetNormalized( Vector3(-1.0f,-0.3f,0.0f) ); * m34.SetRotationAA( 3.14314f, axis, Vector3(5,5,5) ); */ public void SetRotationAA(float c, float s, Vector3 axis, Vector3 t = default(Vector3)) { this = new Matrix34(Matrix33.CreateRotationAA(c, s, axis)); M03 = t.X; M13 = t.Y; M23 = t.Z; }
public void SetRotation33(Matrix33 m33) { M00 = m33.M00; M01 = m33.M01; M02 = m33.M02; M10 = m33.M10; M11 = m33.M11; M12 = m33.M12; M20 = m33.M20; M21 = m33.M21; M22 = m33.M22; }
public Matrix34(Matrix33 m33) : this() { }