/// <summary> /// Creates new Identity <see cref="M44f"/> with <see cref="Scale3f"/> for scaling. /// </summary> /// <param name="scale"></param> /// <returns>A <see cref="M44f"/> scaling matrix.</returns> public static M44f Scale(Scale3f scale) { return(new M44f(scale.X, 0, 0, 0, 0, scale.Y, 0, 0, 0, 0, scale.Z, 0, 0, 0, 0, 1)); }
/// <summary> /// Multiplacation of a <see cref="Scale3f"/> with a <see cref="V4f"/>. /// </summary> public static V4f Multiply(Scale3f scale, V4f vec) { return(new V4f(scale.X * vec.X, scale.Y * vec.Y, scale.Z * vec.Z, vec.W)); }
public static M34f Multiply(M34f m, Scale3f s) { return(new M34f( m.M00 * s.X, m.M01 * s.Y, m.M02 * s.Z, m.M03, m.M10 * s.X, m.M11 * s.Y, m.M12 * s.Z, m.M13, m.M20 * s.X, m.M21 * s.Y, m.M22 * s.Z, m.M23 )); }
public override bool Equals(object obj) { if (obj is Scale3f) { Scale3f scalingVector = (Scale3f)obj; return((X == scalingVector.X) && (Y == scalingVector.Y) && (Z == scalingVector.Z)); } return(false); }
/// <summary> /// Multiplacation of a <see cref="Scale3f"/> with a <see cref="M22f"/>. /// </summary> public static M33f Multiply(Scale3f scale, M22f mat) { return(new M33f(scale.X * mat.M00, scale.X * mat.M01, 0, scale.Y * mat.M10, scale.Y * mat.M11, 0, 0, 0, scale.Z)); }
/// <summary> /// Multiplacation of a <see cref="Scale3f"/> with a <see cref="M33f"/>. /// </summary> public static M33f Multiply(Scale3f scale, M33f mat) { return(new M33f(scale.X * mat.M00, scale.X * mat.M01, scale.X * mat.M02, scale.Y * mat.M10, scale.Y * mat.M11, scale.Y * mat.M12, scale.Z * mat.M20, scale.Z * mat.M21, scale.Z * mat.M22)); }
public static M33f Multiply(M22f matrix, Scale3f scale) { return(new M33f(matrix.M00 * scale.X, matrix.M01 * scale.Y, 0, matrix.M10 * scale.X, matrix.M11 * scale.Y, 0, 0, 0, scale.Z)); }
public static M33f Multiply(Rot2f rot, Scale3f scale) { float a = (float)System.Math.Cos(rot.Angle); float b = (float)System.Math.Sin(rot.Angle); return(new M33f(a * scale.X, b * scale.Y, 0, -b * scale.X, a * scale.Y, 0, 0, 0, scale.Z)); }
/// <summary> /// Multiplacation of a <see cref="Scale3f"/> with a <see cref="Shift3f"/>. /// </summary> public static M34f Multiply(Scale3f scale, Shift3f shift) { return(new M34f( scale.X, 0, 0, scale.X * shift.X, 0, scale.Y, 0, scale.Y * shift.Y, 0, 0, scale.Z, scale.Z * shift.Z )); }
/// <summary> /// Multiplacation of a <see cref="M44f"/> with a <see cref="Scale3f"/>. /// </summary> public static M44f Multiply(M44f matrix, Scale3f scale) { return(new M44f( matrix.M00 * scale.X, matrix.M01 * scale.Y, matrix.M02 * scale.Z, matrix.M03, matrix.M10 * scale.X, matrix.M11 * scale.Y, matrix.M12 * scale.Z, matrix.M13, matrix.M20 * scale.X, matrix.M21 * scale.Y, matrix.M22 * scale.Z, matrix.M23, matrix.M30 * scale.X, matrix.M31 * scale.Y, matrix.M32 * scale.Z, matrix.M33 )); }
/// <summary> /// Multiplacation of a <see cref="Scale3f"/> with a <see cref="M44f"/>. /// </summary> public static M44f Multiply(Scale3f scale, M44f mat) { return(new M44f( scale.X * mat.M00, scale.X * mat.M01, scale.X * mat.M02, scale.X * mat.M03, scale.Y * mat.M10, scale.Y * mat.M11, scale.Y * mat.M12, scale.Y * mat.M13, scale.Z * mat.M20, scale.Z * mat.M21, scale.Z * mat.M22, scale.Z * mat.M23, mat.M30, mat.M31, mat.M32, mat.M33 )); }
/// <summary> /// Calculates the multiplacation of a <see cref="Scale3f"/> with a float scalar. /// </summary> public static Scale3f operator *(float scalar, Scale3f scale) { return(Scale3f.Multiply(scale, scalar)); }
/// <summary> /// </summary> public static M33f operator *(Scale3f scale, Rot2f rotation) { return(Scale3f.Multiply(scale, rotation)); }
/// <summary> /// </summary> public static M33f operator *(Scale3f scale, Rot3f quaternion) { return(Scale3f.Multiply(scale, quaternion)); }
/// <summary> /// Calculates the multiplacation of a <see cref="Scale3f"/> with a <see cref="M44f"/>. /// </summary> public static M44f operator *(Scale3f scale, M44f matrix) { return(Scale3f.Multiply(scale, matrix)); }
/// <summary> /// Multiplacation of a <see cref="Scale3f"/> with a <see cref="V2f"/>. /// </summary> public static V2f Multiply(Scale3f scale, V2f v) { return(new V2f(v.X * scale.X, v.Y * scale.Y)); }
/// <summary> /// Calculates the division of a float scalar with a <see cref="Scale3f"/>. /// </summary> public static Scale3f operator /(float value, Scale3f scale) { return(Scale3f.Divide(value, scale)); }
/// <summary> /// Calculates the multiplacation of a <see cref="Scale3f"/> with a <see cref="Shift3f"/>. /// </summary> public static M34f operator *(Scale3f scale, Shift3f shift) { return(Scale3f.Multiply(scale, shift)); }
/// <summary> /// Negates all values of a <see cref="Scale3f"/>. /// </summary> public static Scale3f Negate(Scale3f scale) { return(new Scale3f(-scale.X, -scale.Y, -scale.Z)); }
/// <summary> /// Division of a <see cref="Scale3f"/> instance with a float scalar. /// </summary> public static Scale3f Divide(Scale3f scale, float val) { return(Multiply(scale, 1 / val)); }
public static M33f Multiply(Scale3f scale, Rot2f rot) { return(Scale3f.Multiply(scale, (M22f)rot)); }
/// <summary> /// Multiplication of two <see cref="Scale3f"/>s. /// </summary> public static Scale3f Multiply(Scale3f scale0, Scale3f scale1) { return(new Scale3f(scale0.X * scale1.X, scale0.Y * scale1.Y, scale0.Z * scale1.Z)); }
/// <summary> /// Calculates the multiplacation of a <see cref="Scale3f"/> with a <see cref="Scale3f"/>. /// </summary> public static Scale3f operator *(Scale3f scale1, Scale3f scale2) { return(Scale3f.Multiply(scale1, scale2)); }
/// <summary> /// Calculates the reciprocal of a <see cref="Scale3f"/>. /// </summary> public static Scale3f Reciprocal(Scale3f scale) { return(new Scale3f(1 / scale.X, 1 / scale.Y, 1 / scale.Z)); }
/// <summary> /// Calculates the multiplacation of a <see cref="V3f"/> with a <see cref="Scale3f"/>. /// </summary> public static V3f operator *(V3f vector, Scale3f scale) { return(Scale3f.Multiply(scale, vector)); }
/// <summary> /// Negates the values of a <see cref="Scale3f"/> instance. /// </summary> public static Scale3f operator -(Scale3f scalingVector) { return(Scale3f.Negate(scalingVector)); }
/// <summary> /// Calculates the division of a <see cref="Scale3f"/> with a float scalar. /// </summary> public static Scale3f operator /(Scale3f scale, float value) { return(Scale3f.Divide(scale, value)); }
/// <summary> /// Calculates the multiplacation of a <see cref="Scale3f"/> with a <see cref="V4f"/>. /// </summary> public static V4f operator *(Scale3f scale, V4f vector) { return(Scale3f.Multiply(scale, vector)); }
/// <summary> /// Division of a float scalar with a <see cref="Scale3f"/>. /// </summary> public static Scale3f Divide(float val, Scale3f scale) { return(Multiply(Reciprocal(scale), val)); }
/// <summary> /// Multiplacation of a <see cref="Scale3f"/> with a <see cref="V3f"/>. /// </summary> public static V3f Multiply(Scale3f scale, V3f v) { return(new V3f(scale.X * v.X, scale.Y * v.Y, scale.Z * v.Z)); }