Esempio n. 1
0
 /// <summary>
 /// Constructs a quaternion from the given <see cref="Basisd"/>.
 /// </summary>
 /// <param name="basis">The basis to construct from.</param>
 public Quatd(Basisd basis)
 {
     this = basis.Quat();
 }
Esempio n. 2
0
 public static Vector4d AxisAngle(Basisd b)
 {
     return(AxisAngle(b.Quat())); // Might be a more efficient way to do this.
 }
Esempio n. 3
0
 // Transform in Unity is a component, not a struct.
 // Operators are not possible, so put methods here instead.
 // Use "Apply" and "Store" instead of "Set" and "Get" to be unambiguous.
 /// <summary>
 /// Applies the values of this Transformd struct to the given Transform. Note: Very inefficient.
 /// </summary>
 public void ApplyTransform(UnityEngine.Transform transform)
 {
     transform.localPosition = (UnityEngine.Vector3)origin;
     transform.localRotation = (UnityEngine.Quaternion)basis.Quat();
 }