Пример #1
0
 /// <summary>
 /// copy constructor
 /// </summary>
 public cquat(cquat q)
 {
     this.x = q.x;
     this.y = q.y;
     this.z = q.z;
     this.w = q.w;
 }
Пример #2
0
 /// <summary>
 /// Returns a cquat from component-wise application of Lerp (min * (1-a) + max * a).
 /// </summary>
 public static cquat Lerp(cquat min, cquat max, cquat a) => cquat.Lerp(min, max, a);
Пример #3
0
 /// <summary>
 /// Returns a cquat from component-wise application of Lerp (min * (1-a) + max * a).
 /// </summary>
 public static cquat Lerp(Complex min, Complex max, cquat a) => new cquat(min * (1 - a.x) + max * a.x, min * (1 - a.y) + max * a.y, min * (1 - a.z) + max * a.z, min * (1 - a.w) + max * a.w);
Пример #4
0
 /// <summary>
 /// Returns a cquat from component-wise application of Lerp (min * (1-a) + max * a).
 /// </summary>
 public static cquat Lerp(cquat min, Complex max, Complex a) => new cquat(min.x * (1 - a) + max * a, min.y * (1 - a) + max * a, min.z * (1 - a) + max * a, min.w * (1 - a) + max * a);
Пример #5
0
 /// <summary>
 /// Returns a bvec4 from component-wise application of NotEqual (lhs != rhs).
 /// </summary>
 public static bvec4 NotEqual(Complex lhs, cquat rhs) => new bvec4(lhs != rhs.x, lhs != rhs.y, lhs != rhs.z, lhs != rhs.w);
Пример #6
0
 /// <summary>
 /// Returns a bvec4 from component-wise application of NotEqual (lhs != rhs).
 /// </summary>
 public static bvec4 NotEqual(cquat lhs, cquat rhs) => new bvec4(lhs.x != rhs.x, lhs.y != rhs.y, lhs.z != rhs.z, lhs.w != rhs.w);
Пример #7
0
 /// <summary>
 /// Returns a bvec4 from component-wise application of Equal (lhs == rhs).
 /// </summary>
 public static bvec4 Equal(cquat lhs, cquat rhs) => new bvec4(lhs.x == rhs.x, lhs.y == rhs.y, lhs.z == rhs.z, lhs.w == rhs.w);
Пример #8
0
 /// <summary>
 /// Returns the inner product (dot product, scalar product) of the two quaternions.
 /// </summary>
 public static Complex Dot(cquat lhs, cquat rhs) => ((lhs.x * Complex.Conjugate(rhs.x) + lhs.y * Complex.Conjugate(rhs.y)) + (lhs.z * Complex.Conjugate(rhs.z) + lhs.w * Complex.Conjugate(rhs.w)));
Пример #9
0
 /// <summary>
 /// Returns the number of components (4).
 /// </summary>
 public static int Count(cquat q) => q.Count;
Пример #10
0
 /// <summary>
 /// Returns a string representation of this quaternion using a provided seperator and a format and format provider for each component.
 /// </summary>
 public static string ToString(cquat q, string sep, string format, IFormatProvider provider) => q.ToString(sep, format, provider);
Пример #11
0
 /// <summary>
 /// Returns a string representation of this quaternion using a provided seperator and a format for each component.
 /// </summary>
 public static string ToString(cquat q, string sep, string format) => q.ToString(sep, format);
Пример #12
0
 /// <summary>
 /// Returns a string representation of this quaternion using a provided seperator.
 /// </summary>
 public static string ToString(cquat q, string sep) => q.ToString(sep);
Пример #13
0
 /// <summary>
 /// Returns a string representation of this quaternion using ', ' as a seperator.
 /// </summary>
 public static string ToString(cquat q) => q.ToString();
Пример #14
0
 /// <summary>
 /// Returns an enumerator that iterates through all components.
 /// </summary>
 public static IEnumerator <Complex> GetEnumerator(cquat q) => q.GetEnumerator();
Пример #15
0
 /// <summary>
 /// Returns an array with all values
 /// </summary>
 public static Complex[] Values(cquat q) => q.Values;
Пример #16
0
 /// <summary>
 /// Returns the squared euclidean length of this quaternion.
 /// </summary>
 public static Complex LengthSqr(cquat q) => q.LengthSqr;
Пример #17
0
 /// <summary>
 /// Returns true iff this equals rhs component-wise.
 /// </summary>
 public bool Equals(cquat rhs) => ((x.Equals(rhs.x) && y.Equals(rhs.y)) && (z.Equals(rhs.z) && w.Equals(rhs.w)));
Пример #18
0
 /// <summary>
 /// Returns true iff this equals rhs component-wise.
 /// </summary>
 public static bool Equals(cquat q, cquat rhs) => q.Equals(rhs);
Пример #19
0
 /// <summary>
 /// Returns the cross product between two quaternions.
 /// </summary>
 public static cquat Cross(cquat q1, cquat q2) => new cquat(q1.w * q2.x + q1.x * q2.w + q1.y * q2.z - q1.z * q2.y, q1.w * q2.y + q1.y * q2.w + q1.z * q2.x - q1.x * q2.z, q1.w * q2.z + q1.z * q2.w + q1.x * q2.y - q1.y * q2.x, q1.w * q2.w - q1.x * q2.x - q1.y * q2.y - q1.z * q2.z);
Пример #20
0
 /// <summary>
 /// Returns true iff this equals rhs type- and component-wise.
 /// </summary>
 public static bool Equals(cquat q, object obj) => q.Equals(obj);
Пример #21
0
 /// <summary>
 /// Returns a bvec4 from component-wise application of Equal (lhs == rhs).
 /// </summary>
 public static bvec4 Equal(cquat lhs, Complex rhs) => new bvec4(lhs.x == rhs, lhs.y == rhs, lhs.z == rhs, lhs.w == rhs);
Пример #22
0
 /// <summary>
 /// Returns a hash code for this instance.
 /// </summary>
 public static int GetHashCode(cquat q) => q.GetHashCode();
Пример #23
0
 /// <summary>
 /// Returns a bvec4 from component-wise application of NotEqual (lhs != rhs).
 /// </summary>
 public static bvec4 NotEqual(cquat lhs, Complex rhs) => new bvec4(lhs.x != rhs, lhs.y != rhs, lhs.z != rhs, lhs.w != rhs);
Пример #24
0
 /// <summary>
 /// Returns a bvec4 from component-wise application of Equal (lhs == rhs).
 /// </summary>
 public static bvec4 Equal(cquat lhs, cquat rhs) => cquat.Equal(lhs, rhs);
Пример #25
0
 /// <summary>
 /// Returns a cquat from component-wise application of Lerp (min * (1-a) + max * a).
 /// </summary>
 public static cquat Lerp(cquat min, Complex max, cquat a) => new cquat(min.x * (1 - a.x) + max * a.x, min.y * (1 - a.y) + max * a.y, min.z * (1 - a.z) + max * a.z, min.w * (1 - a.w) + max * a.w);
Пример #26
0
 /// <summary>
 /// Returns a bvec4 from component-wise application of NotEqual (lhs != rhs).
 /// </summary>
 public static bvec4 NotEqual(cquat lhs, cquat rhs) => cquat.NotEqual(lhs, rhs);
Пример #27
0
 /// <summary>
 /// Returns a cquat from component-wise application of Lerp (min * (1-a) + max * a).
 /// </summary>
 public static cquat Lerp(Complex min, cquat max, Complex a) => new cquat(min * (1 - a) + max.x * a, min * (1 - a) + max.y * a, min * (1 - a) + max.z * a, min * (1 - a) + max.w * a);
Пример #28
0
 /// <summary>
 /// Returns the inner product (dot product, scalar product) of the two quaternions.
 /// </summary>
 public static Complex Dot(cquat lhs, cquat rhs) => cquat.Dot(lhs, rhs);
Пример #29
0
 /// <summary>
 /// Returns the euclidean length of this quaternion.
 /// </summary>
 public static double Length(cquat q) => q.Length;
Пример #30
0
 /// <summary>
 /// Returns the cross product between two quaternions.
 /// </summary>
 public static cquat Cross(cquat q1, cquat q2) => cquat.Cross(q1, q2);