Beispiel #1
0
 /// <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;
 }
Beispiel #2
0
 /// <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;
 }
Beispiel #3
0
 /// <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;
 }
Beispiel #4
0
 /// <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);
Beispiel #5
0
 /// <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);
Beispiel #6
0
 /// <summary>
 /// Returns true iff this equals rhs type- and component-wise.
 /// </summary>
 public static bool Equals(hvec4 v, object obj) => v.Equals(obj);
Beispiel #7
0
 /// <summary>
 /// Returns the number of components (4).
 /// </summary>
 public static int Count(hvec4 v) => v.Count;
Beispiel #8
0
 /// <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);
Beispiel #9
0
 /// <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);
Beispiel #10
0
 /// <summary>
 /// Returns the max-norm of this vector.
 /// </summary>
 public static float NormMax(hvec4 v) => v.NormMax;
Beispiel #11
0
 /// <summary>
 /// Returns the two-norm (euclidean length) of this vector.
 /// </summary>
 public static float Norm2(hvec4 v) => v.Norm2;
Beispiel #12
0
 /// <summary>
 /// Returns a string representation of this vector using a provided seperator.
 /// </summary>
 public static string ToString(hvec4 v, string sep) => v.ToString(sep);
Beispiel #13
0
 /// <summary>
 /// Returns the one-norm of this vector.
 /// </summary>
 public static float Norm1(hvec4 v) => v.Norm1;
Beispiel #14
0
 /// <summary>
 /// Returns the sum of all components.
 /// </summary>
 public static Half Sum(hvec4 v) => v.Sum;
Beispiel #15
0
 /// <summary>
 /// Returns the squared euclidean length of this vector.
 /// </summary>
 public static float LengthSqr(hvec4 v) => v.LengthSqr;
Beispiel #16
0
 /// <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);
Beispiel #17
0
 /// <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);
Beispiel #18
0
 /// <summary>
 /// Returns the p-norm of this vector.
 /// </summary>
 public static double NormP(hvec4 v, double p) => v.NormP(p);
Beispiel #19
0
 /// <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);
Beispiel #20
0
 /// <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;
Beispiel #21
0
 /// <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);
Beispiel #22
0
 /// <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;
Beispiel #23
0
 /// <summary>
 /// Returns true iff this equals rhs component-wise.
 /// </summary>
 public static bool Equals(hvec4 v, hvec4 rhs) => v.Equals(rhs);
Beispiel #24
0
 /// <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);
Beispiel #25
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 public static int GetHashCode(hvec4 v) => v.GetHashCode();
Beispiel #26
0
 /// <summary>
 /// Returns the squared euclidean distance between the two vectors.
 /// </summary>
 public static float DistanceSqr(hvec4 lhs, hvec4 rhs) => hvec4.DistanceSqr(lhs, rhs);
Beispiel #27
0
 /// <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);
Beispiel #28
0
 /// <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);
Beispiel #29
0
 /// <summary>
 /// Returns a bvec4 from component-wise application of GreaterThan (lhs &gt; rhs).
 /// </summary>
 public static bvec4 GreaterThan(hvec4 lhs, hvec4 rhs) => hvec4.GreaterThan(lhs, rhs);
Beispiel #30
0
 /// <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);