/// <summary>
/// The W component of this instance.
- /// </summary>
+ /// </summary>
public double W;
#endregion
#region Properties
- #pragma warning disable 3005 // Identifier differing only in case is not CLS-compliant, compiler bug in Mono 3.4.0
-
- /// <summary>
- /// Gets or sets an OpenTK.Vector3d with the X, Y and Z components of this instance.
- /// </summary>
- [Obsolete("Use Xyz property instead.")]
- [CLSCompliant(false)]
- [EditorBrowsable(EditorBrowsableState.Never)]
- [XmlIgnore]
- public Vector3d XYZ { get { return Xyz; } set { Xyz = value; } }
-
- #pragma warning restore 3005
-
/// <summary>
/// Gets or sets the X component of this instance.
/// </summary>
/// </summary>
[XmlIgnore]
public double Z { get { return Xyz.Z; } set { Xyz.Z = value; } }
-
+
#endregion
#region Instance
}
else
{
- // This occurs when the angle is zero.
+ // This occurs when the angle is zero.
// Not a problem: just set an arbitrary normalized axis.
result.Xyz = Vector3d.UnitX;
}
#region Slerp
/// <summary>
- /// Do Spherical linear interpolation between two quaternions
+ /// Do Spherical linear interpolation between two quaternions
/// </summary>
/// <param name="q1">The first Quaterniond</param>
/// <param name="q2">The second Quaterniond</param>
#endregion
#endregion
-
+
#region Operators
/// <summary>
#region public override bool Equals (object o)
/// <summary>
- /// Compares this object instance to another object for equality.
+ /// Compares this object instance to another object for equality.
/// </summary>
/// <param name="other">The other object to be used in the comparison.</param>
/// <returns>True if both objects are Quaternions of equal value. Otherwise it returns false.</returns>
#region public override int GetHashCode ()
/// <summary>
- /// Provides the hash code for this object.
+ /// Provides the hash code for this object.
/// </summary>
/// <returns>A hash code formed from the bitwise XOR of this objects members.</returns>
public double Z;
#endregion
-
+
#region Constructors
/// <summary>Constructs left Quaterniond that is left copy of the given Quaterniond.</summary>
public Quaterniond(ref Matrix4d matrix)
{
double scale = System.Math.Pow(matrix.Determinant, 1.0d/3.0d);
-
+
W = System.Math.Sqrt(System.Math.Max(0, scale + matrix[0, 0] + matrix[1, 1] + matrix[2, 2])) / 2;
X = System.Math.Sqrt(System.Math.Max(0, scale + matrix[0, 0] - matrix[1, 1] - matrix[2, 2])) / 2;
Y = System.Math.Sqrt(System.Math.Max(0, scale - matrix[0, 0] + matrix[1, 1] - matrix[2, 2])) / 2;
- Z = System.Math.Sqrt(System.Math.Max(0, scale - matrix[0, 0] - matrix[1, 1] + matrix[2, 2])) / 2;
+ Z = System.Math.Sqrt(System.Math.Max(0, scale - matrix[0, 0] - matrix[1, 1] + matrix[2, 2])) / 2;
if( matrix[2,1] - matrix[1,2] < 0 ) X = -X;
if( matrix[0,2] - matrix[2,0] < 0 ) Y = -Y;
if( matrix[1,0] - matrix[0,1] < 0 ) Z = -Z;
}
#endregion
-
+
#region Functions
public double Modulus
}
#endregion
-
+
#region HashCode
/// <summary>Returns the hash code for this instance.</summary>
}
#endregion
-
+
#region String and Parse
/// <summary>Returns the fully qualified type name of this instance.</summary>
}
#endregion
-
+
#region Constants
/// <summary>A quaterion with all zero components.</summary>
#region IEquatable<Quaterniond> Members
/// <summary>
- /// Compares this Quaterniond instance to another Quaterniond for equality.
+ /// Compares this Quaterniond instance to another Quaterniond for equality.
/// </summary>
/// <param name="other">The other Quaterniond to be used in the comparison.</param>
/// <returns>True if both instances are equal; false otherwise.</returns>