Esempio n. 1
0
 /// <summary>
 /// from-vector constructor
 /// </summary>
 public gvec4(gvec4 <T> v)
 {
     this.x = v.x;
     this.y = v.y;
     this.z = v.z;
     this.w = v.w;
 }
Esempio n. 2
0
 /// <summary>
 /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public gmat2x4(gvec4 <T> c0, gvec4 <T> 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;
 }
Esempio n. 3
0
 /// <summary>
 /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public gmat3x4(gvec4 <T> c0, gvec4 <T> c1, gvec4 <T> 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;
 }
Esempio n. 4
0
 /// <summary>
 /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public gmat3x4(gvec4 <T> c0, gvec4 <T> 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 = default(T);
     this.m21 = default(T);
     this.m22 = default(T);
     this.m23 = default(T);
 }
Esempio n. 5
0
 /// <summary>
 /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public gmat4(gvec4 <T> c0, gvec4 <T> c1, gvec4 <T> 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;
     this.m30 = default(T);
     this.m31 = default(T);
     this.m32 = default(T);
     this.m33 = default(T);
 }
Esempio n. 6
0
 /// <summary>
 /// Constructs this matrix from a series of column vectors. Non-overwritten fields are from an Identity matrix.
 /// </summary>
 public gmat4(gvec4 <T> c0, gvec4 <T> c1, gvec4 <T> c2, gvec4 <T> c3)
 {
     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;
     this.m30 = c3.x;
     this.m31 = c3.y;
     this.m32 = c3.z;
     this.m33 = c3.w;
 }
Esempio n. 7
0
 /// <summary>
 /// Returns a bvec4 from component-wise application of NotEqual (!EqualityComparer&lt;T&gt;.Default.Equals(lhs, rhs)).
 /// </summary>
 public static bvec4 NotEqual(T lhs, gvec4 <T> rhs) => new bvec4(!EqualityComparer <T> .Default.Equals(lhs, rhs.x), !EqualityComparer <T> .Default.Equals(lhs, rhs.y), !EqualityComparer <T> .Default.Equals(lhs, rhs.z), !EqualityComparer <T> .Default.Equals(lhs, rhs.w));
Esempio n. 8
0
 /// <summary>
 /// Returns a bvec4 from component-wise application of NotEqual (!EqualityComparer&lt;T&gt;.Default.Equals(lhs, rhs)).
 /// </summary>
 public static bvec4 NotEqual(gvec4 <T> lhs, T rhs) => new bvec4(!EqualityComparer <T> .Default.Equals(lhs.x, rhs), !EqualityComparer <T> .Default.Equals(lhs.y, rhs), !EqualityComparer <T> .Default.Equals(lhs.z, rhs), !EqualityComparer <T> .Default.Equals(lhs.w, rhs));
Esempio n. 9
0
 /// <summary>
 /// Returns a bvec4 from component-wise application of Equal (EqualityComparer&lt;T&gt;.Default.Equals(lhs, rhs)).
 /// </summary>
 public static bvec4 Equal(gvec4 <T> lhs, gvec4 <T> rhs) => new bvec4(EqualityComparer <T> .Default.Equals(lhs.x, rhs.x), EqualityComparer <T> .Default.Equals(lhs.y, rhs.y), EqualityComparer <T> .Default.Equals(lhs.z, rhs.z), EqualityComparer <T> .Default.Equals(lhs.w, rhs.w));
Esempio n. 10
0
 /// <summary>
 /// Returns true iff this equals rhs component-wise.
 /// </summary>
 public bool Equals(gvec4 <T> rhs) => ((EqualityComparer <T> .Default.Equals(x, rhs.x) && EqualityComparer <T> .Default.Equals(y, rhs.y)) && (EqualityComparer <T> .Default.Equals(z, rhs.z) && EqualityComparer <T> .Default.Equals(w, rhs.w)));
Esempio n. 11
0
 /// <summary>
 /// from-vector constructor (additional fields are truncated)
 /// </summary>
 public gvec3(gvec4 <T> v)
 {
     this.x = v.x;
     this.y = v.y;
     this.z = v.z;
 }
Esempio n. 12
0
 /// <summary>
 /// Returns an object that can be used for arbitrary swizzling (e.g. swizzle.zy)
 /// </summary>
 public static swizzle_gvec4 <T> swizzle <T>(gvec4 <T> v) => v.swizzle;
Esempio n. 13
0
 /// <summary>
 /// Returns a string representation of this vector using ', ' as a seperator.
 /// </summary>
 public static string ToString <T>(gvec4 <T> v) => v.ToString();
Esempio n. 14
0
 /// <summary>
 /// Returns a bvec4 from component-wise application of NotEqual (!EqualityComparer&lt;T&gt;.Default.Equals(lhs, rhs)).
 /// </summary>
 public static bvec4 NotEqual <T>(gvec4 <T> lhs, gvec4 <T> rhs) => gvec4 <T> .NotEqual(lhs, rhs);
Esempio n. 15
0
 /// <summary>
 /// Returns true iff this equals rhs type- and component-wise.
 /// </summary>
 public static bool Equals <T>(gvec4 <T> v, object obj) => v.Equals(obj);
Esempio n. 16
0
 /// <summary>
 /// Returns true iff this equals rhs component-wise.
 /// </summary>
 public static bool Equals <T>(gvec4 <T> v, gvec4 <T> rhs) => v.Equals(rhs);
Esempio n. 17
0
 /// <summary>
 /// Returns the number of components (4).
 /// </summary>
 public static int Count <T>(gvec4 <T> v) => v.Count;
Esempio n. 18
0
 /// <summary>
 /// Returns a string representation of this vector using a provided seperator.
 /// </summary>
 public static string ToString <T>(gvec4 <T> v, string sep) => v.ToString(sep);
Esempio n. 19
0
 /// <summary>
 /// from-vector constructor (additional fields are truncated)
 /// </summary>
 public gvec2(gvec4 <T> v)
 {
     this.x = v.x;
     this.y = v.y;
 }
Esempio n. 20
0
 /// <summary>
 /// Returns an array with all values
 /// </summary>
 public static T[] Values <T>(gvec4 <T> v) => v.Values;
Esempio n. 21
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 public static int GetHashCode <T>(gvec4 <T> v) => v.GetHashCode();
Esempio n. 22
0
 /// <summary>
 /// Returns an enumerator that iterates through all components.
 /// </summary>
 public static IEnumerator <T> GetEnumerator <T>(gvec4 <T> v) => v.GetEnumerator();