/// <summary> /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix. /// </summary> public hmat2x4(hvec4 c0, hvec4 c1) { this.m00 = c0.x; this.m01 = c0.y; this.m02 = c0.z; this.m03 = c0.w; this.m10 = c1.x; this.m11 = c1.y; this.m12 = c1.z; this.m13 = c1.w; }
/// <summary> /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix. /// </summary> public hmat3x4(hvec4 c0, hvec4 c1) { this.m00 = c0.x; this.m01 = c0.y; this.m02 = c0.z; this.m03 = c0.w; this.m10 = c1.x; this.m11 = c1.y; this.m12 = c1.z; this.m13 = c1.w; this.m20 = Half.Zero; this.m21 = Half.Zero; this.m22 = Half.One; this.m23 = Half.Zero; }
/// <summary> /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix. /// </summary> public hmat3x4(hvec4 c0, hvec4 c1, hvec4 c2) { this.m00 = c0.x; this.m01 = c0.y; this.m02 = c0.z; this.m03 = c0.w; this.m10 = c1.x; this.m11 = c1.y; this.m12 = c1.z; this.m13 = c1.w; this.m20 = c2.x; this.m21 = c2.y; this.m22 = c2.z; this.m23 = c2.w; }
/// <summary> /// Returns a bvec4 from component-wise application of NotEqual (lhs != rhs). /// </summary> public static bvec4 NotEqual(hvec4 lhs, hvec4 rhs) => hvec4.NotEqual(lhs, rhs);
/// <summary> /// Returns true iff distance between lhs and rhs is less than or equal to epsilon /// </summary> public static bool ApproxEqual(hvec4 lhs, hvec4 rhs, float eps = 0.1f) => hvec4.ApproxEqual(lhs, rhs, eps);
/// <summary> /// Returns true iff this equals rhs type- and component-wise. /// </summary> public static bool Equals(hvec4 v, object obj) => v.Equals(obj);
/// <summary> /// Returns the number of components (4). /// </summary> public static int Count(hvec4 v) => v.Count;
/// <summary> /// Returns a string representation of this vector using a provided seperator and a format for each component. /// </summary> public static string ToString(hvec4 v, string sep, string format) => v.ToString(sep, format);
/// <summary> /// Returns a hvec4 with independent and identically distributed values according to a normal/Gaussian distribution with specified mean and variance. /// </summary> public static hvec4 RandomNormal(Random random, hvec4 mean, hvec4 variance) => hvec4.RandomNormal(random, mean, variance);
/// <summary> /// Returns the max-norm of this vector. /// </summary> public static float NormMax(hvec4 v) => v.NormMax;
/// <summary> /// Returns the two-norm (euclidean length) of this vector. /// </summary> public static float Norm2(hvec4 v) => v.Norm2;
/// <summary> /// Returns a string representation of this vector using a provided seperator. /// </summary> public static string ToString(hvec4 v, string sep) => v.ToString(sep);
/// <summary> /// Returns the one-norm of this vector. /// </summary> public static float Norm1(hvec4 v) => v.Norm1;
/// <summary> /// Returns the sum of all components. /// </summary> public static Half Sum(hvec4 v) => v.Sum;
/// <summary> /// Returns the squared euclidean length of this vector. /// </summary> public static float LengthSqr(hvec4 v) => v.LengthSqr;
/// <summary> /// Returns a vector pointing in the same direction as another (faceforward orients a vector to point away from a surface as defined by its normal. If dot(Nref, I) is negative faceforward returns N, otherwise it returns -N). /// </summary> public static hvec4 FaceForward(hvec4 N, hvec4 I, hvec4 Nref) => hvec4.FaceForward(N, I, Nref);
/// <summary> /// Returns a hvec4 with independent and identically distributed uniform values between 'minValue' and 'maxValue'. /// </summary> public static hvec4 RandomUniform(Random random, hvec4 minValue, hvec4 maxValue) => hvec4.RandomUniform(random, minValue, maxValue);
/// <summary> /// Returns the p-norm of this vector. /// </summary> public static double NormP(hvec4 v, double p) => v.NormP(p);
/// <summary> /// Returns a hvec4 with independent and identically distributed values according to a normal/Gaussian distribution with specified mean and variance. /// </summary> public static hvec4 RandomGaussian(Random random, hvec4 mean, hvec4 variance) => hvec4.RandomGaussian(random, mean, variance);
/// <summary> /// Returns a copy of this vector with length one (undefined if this has zero length). /// </summary> public static hvec4 Normalized(hvec4 v) => v.Normalized;
/// <summary> /// Returns a string representation of this vector using a provided seperator and a format and format provider for each component. /// </summary> public static string ToString(hvec4 v, string sep, string format, IFormatProvider provider) => v.ToString(sep, format, provider);
/// <summary> /// Returns a copy of this vector with length one (returns zero if length is zero). /// </summary> public static hvec4 NormalizedSafe(hvec4 v) => v.NormalizedSafe;
/// <summary> /// Returns true iff this equals rhs component-wise. /// </summary> public static bool Equals(hvec4 v, hvec4 rhs) => v.Equals(rhs);
/// <summary> /// Returns the inner product (dot product, scalar product) of the two vectors. /// </summary> public static Half Dot(hvec4 lhs, hvec4 rhs) => hvec4.Dot(lhs, rhs);
/// <summary> /// Returns a hash code for this instance. /// </summary> public static int GetHashCode(hvec4 v) => v.GetHashCode();
/// <summary> /// Returns the squared euclidean distance between the two vectors. /// </summary> public static float DistanceSqr(hvec4 lhs, hvec4 rhs) => hvec4.DistanceSqr(lhs, rhs);
/// <summary> /// Returns a bvec4 from component-wise application of Equal (lhs == rhs). /// </summary> public static bvec4 Equal(hvec4 lhs, hvec4 rhs) => hvec4.Equal(lhs, rhs);
/// <summary> /// Calculate the reflection direction for an incident vector (N should be normalized in order to achieve the desired result). /// </summary> public static hvec4 Reflect(hvec4 I, hvec4 N) => hvec4.Reflect(I, N);
/// <summary> /// Returns a bvec4 from component-wise application of GreaterThan (lhs > rhs). /// </summary> public static bvec4 GreaterThan(hvec4 lhs, hvec4 rhs) => hvec4.GreaterThan(lhs, rhs);
/// <summary> /// Calculate the refraction direction for an incident vector (The input parameters I and N should be normalized in order to achieve the desired result). /// </summary> public static hvec4 Refract(hvec4 I, hvec4 N, Half eta) => hvec4.Refract(I, N, eta);