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