public static m_Quaternion GetCopyFromQuaternion(Quaternion q) { m_Quaternion res = new m_Quaternion(); res.x = q.x; res.y = q.y; res.z = q.z; res.w = q.w; return(res); }
static public m_Quaternion AngleAxis(float angle, Vector3 axis) { m_Quaternion rot = new m_Quaternion(); rot.w = Mathf.Cos(angle * 0.5f * Mathf.Deg2Rad); float _sin = Mathf.Sin(angle * 0.5f * Mathf.Deg2Rad); rot.x = _sin * axis.x; rot.y = _sin * axis.y; rot.z = _sin * axis.z; return(rot); }
public void SetRotate(m_Quaternion rot) { q = rot; dirty = true; inverseDirty = true; }