C# Класс RootMotion.QuaTools

Helper methods for dealing with Quaternions.
Показать файл Открыть проект

Открытые методы

Метод Описание
FromToAroundAxis ( Vector3 fromDirection, Vector3 toDirection, Vector3 axis ) : Quaternion

Froms to around axis creates a FromToRotation, but makes sure it's axis remains fixed near to the Quaternion singularity point.

FromToRotation ( Quaternion from, Quaternion to ) : Quaternion

Gets the Quaternion from rotation "from" to rotation "to".

GetAxis ( Vector3 v ) : Vector3

Gets the closest direction axis to a vector. Input vector must be normalized!

RotationToLocalSpace ( Quaternion space, Quaternion rotation ) : Quaternion

Gets the rotation that can be used to convert a rotation from one axis space to another.

Описание методов

FromToAroundAxis() публичный статический Метод

Froms to around axis creates a FromToRotation, but makes sure it's axis remains fixed near to the Quaternion singularity point.
public static FromToAroundAxis ( Vector3 fromDirection, Vector3 toDirection, Vector3 axis ) : Quaternion
fromDirection UnityEngine.Vector3 /// From direction. ///
toDirection UnityEngine.Vector3 /// To direction. ///
axis UnityEngine.Vector3 /// Axis. Should be normalized before passing into this method. ///
Результат UnityEngine.Quaternion

FromToRotation() публичный статический Метод

Gets the Quaternion from rotation "from" to rotation "to".
public static FromToRotation ( Quaternion from, Quaternion to ) : Quaternion
from UnityEngine.Quaternion
to UnityEngine.Quaternion
Результат UnityEngine.Quaternion

GetAxis() публичный статический Метод

Gets the closest direction axis to a vector. Input vector must be normalized!
public static GetAxis ( Vector3 v ) : Vector3
v UnityEngine.Vector3
Результат UnityEngine.Vector3

RotationToLocalSpace() публичный статический Метод

Gets the rotation that can be used to convert a rotation from one axis space to another.
public static RotationToLocalSpace ( Quaternion space, Quaternion rotation ) : Quaternion
space UnityEngine.Quaternion
rotation UnityEngine.Quaternion
Результат UnityEngine.Quaternion