Пример #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();
 }
Пример #2
0
 public static Vector4d AxisAngle(Basisd b)
 {
     return(AxisAngle(b.Quat())); // Might be a more efficient way to do this.
 }
Пример #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();
 }