Пример #1
0
        public static BHQuaternion operator -(BHQuaternion q)
        {
            q.SetValues();
            BHQuaternion r = new BHQuaternion();

            UnaryQuaternion(r.mQuaternion, q.mQuaternion);
            r.CopyValues();
            return(r);
        }
Пример #2
0
        public static BHQuaternion Concatenate(BHQuaternion q1, BHQuaternion q2)
        {
            q1.SetValues();
            q2.SetValues();
            BHQuaternion r = new BHQuaternion();

            ConcatenateQuaternion(r.mQuaternion, q1.mQuaternion, q2.mQuaternion);
            r.CopyValues();
            return(r);
        }
Пример #3
0
        public static BHQuaternion Slerp(BHQuaternion q1, BHQuaternion q2, float t)
        {
            q1.SetValues();
            q2.SetValues();
            BHQuaternion r = new BHQuaternion();

            SlerpQuaternion(r.mQuaternion, q1.mQuaternion, q2.mQuaternion, t);
            r.CopyValues();
            return(r);
        }
Пример #4
0
        public static BHQuaternion operator /(BHQuaternion lhs, BHQuaternion rhs)
        {
            lhs.SetValues();
            rhs.SetValues();
            BHQuaternion r = new BHQuaternion();

            DivQuaternion(r.mQuaternion, lhs.mQuaternion, rhs.mQuaternion);
            r.CopyValues();
            return(r);
        }
Пример #5
0
        public static BHQuaternion operator *(BHQuaternion q1, BHQuaternion q2)
        {
            q1.SetValues();
            q2.SetValues();
            BHQuaternion r = new BHQuaternion();

            MulQuaternion(r.mQuaternion, q1.mQuaternion, q2.mQuaternion);
            r.CopyValues();
            return(r);
        }
Пример #6
0
        public static BHQuaternion AxisAngle(BHVector3f axis, float angle)
        {
            BHQuaternion r = new BHQuaternion();

            IntPtr a = CreateValVector3f(axis.x, axis.y, axis.z);

            AxisAngleQuaternion(r.mQuaternion, a, angle);
            DestroyVector3f(a);

            r.CopyValues();
            return(r);
        }