コード例 #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;
 }
コード例 #2
0
ファイル: gmat2x4.cs プロジェクト: marcusanth/GlmSharp
 /// <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;
 }
コード例 #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;
 }
コード例 #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);
 }
コード例 #5
0
ファイル: gmat4.cs プロジェクト: marcusanth/GlmSharp
 /// <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);
 }
コード例 #6
0
ファイル: gmat4.cs プロジェクト: marcusanth/GlmSharp
 /// <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;
 }
コード例 #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));
コード例 #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));
コード例 #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));
コード例 #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)));
コード例 #11
0
ファイル: gvec3.cs プロジェクト: marcusanth/GlmSharp
 /// <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;
 }
コード例 #12
0
ファイル: gvec4.glm.cs プロジェクト: marcusanth/GlmSharp
 /// <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;
コード例 #13
0
ファイル: gvec4.glm.cs プロジェクト: marcusanth/GlmSharp
 /// <summary>
 /// Returns a string representation of this vector using ', ' as a seperator.
 /// </summary>
 public static string ToString <T>(gvec4 <T> v) => v.ToString();
コード例 #14
0
ファイル: gvec4.glm.cs プロジェクト: marcusanth/GlmSharp
 /// <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);
コード例 #15
0
ファイル: gvec4.glm.cs プロジェクト: marcusanth/GlmSharp
 /// <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);
コード例 #16
0
ファイル: gvec4.glm.cs プロジェクト: marcusanth/GlmSharp
 /// <summary>
 /// Returns true iff this equals rhs component-wise.
 /// </summary>
 public static bool Equals <T>(gvec4 <T> v, gvec4 <T> rhs) => v.Equals(rhs);
コード例 #17
0
ファイル: gvec4.glm.cs プロジェクト: marcusanth/GlmSharp
 /// <summary>
 /// Returns the number of components (4).
 /// </summary>
 public static int Count <T>(gvec4 <T> v) => v.Count;
コード例 #18
0
ファイル: gvec4.glm.cs プロジェクト: marcusanth/GlmSharp
 /// <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);
コード例 #19
0
 /// <summary>
 /// from-vector constructor (additional fields are truncated)
 /// </summary>
 public gvec2(gvec4 <T> v)
 {
     this.x = v.x;
     this.y = v.y;
 }
コード例 #20
0
ファイル: gvec4.glm.cs プロジェクト: marcusanth/GlmSharp
 /// <summary>
 /// Returns an array with all values
 /// </summary>
 public static T[] Values <T>(gvec4 <T> v) => v.Values;
コード例 #21
0
ファイル: gvec4.glm.cs プロジェクト: marcusanth/GlmSharp
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 public static int GetHashCode <T>(gvec4 <T> v) => v.GetHashCode();
コード例 #22
0
ファイル: gvec4.glm.cs プロジェクト: marcusanth/GlmSharp
 /// <summary>
 /// Returns an enumerator that iterates through all components.
 /// </summary>
 public static IEnumerator <T> GetEnumerator <T>(gvec4 <T> v) => v.GetEnumerator();