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

public static GetQuatExp ( Quaternion q ) : Quaternion
q UnityEngine.Quaternion
Результат UnityEngine.Quaternion
Пример #1
0
        public static Quaternion GetSquadIntermediate(Quaternion q0, Quaternion q1, Quaternion q2)
        {
            Quaternion quatConjugate = MathUtils.GetQuatConjugate(q1);
            Quaternion quatLog       = MathUtils.GetQuatLog(quatConjugate * q0);
            Quaternion quatLog2      = MathUtils.GetQuatLog(quatConjugate * q2);
            Quaternion q3            = new Quaternion(-0.25f * (quatLog.x + quatLog2.x), -0.25f * (quatLog.y + quatLog2.y), -0.25f * (quatLog.z + quatLog2.z), -0.25f * (quatLog.w + quatLog2.w));

            return(q1 * MathUtils.GetQuatExp(q3));
        }
Пример #2
0
        public static Quaternion GetSquadIntermediate(Quaternion q0, Quaternion q1, Quaternion q2)
        {
            Quaternion quatConjugate = MathUtils.GetQuatConjugate(q1);
            Quaternion quatLog1      = MathUtils.GetQuatLog(quatConjugate * q0);
            Quaternion quatLog2      = MathUtils.GetQuatLog(quatConjugate * q2);
            Quaternion q             = new Quaternion((float)(-0.25 * ((double)quatLog1.x + (double)quatLog2.x)), (float)(-0.25 * ((double)quatLog1.y + (double)quatLog2.y)), (float)(-0.25 * ((double)quatLog1.z + (double)quatLog2.z)), (float)(-0.25 * ((double)quatLog1.w + (double)quatLog2.w)));

            return(q1 * MathUtils.GetQuatExp(q));
        }