Beispiel #1
0
        public static BHQuaternion YawPitchRoll(float yaw, float pitch, float roll)
        {
            BHQuaternion r = new BHQuaternion();

            YawPitchRollQuaternion(r.mQuaternion, yaw, pitch, roll);
            return(r);
        }
Beispiel #2
0
        public static BHQuaternion operator -(BHQuaternion q)
        {
            q.SetValues();
            BHQuaternion r = new BHQuaternion();

            UnaryQuaternion(r.mQuaternion, q.mQuaternion);
            r.CopyValues();
            return(r);
        }
Beispiel #3
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);
        }
Beispiel #4
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);
        }
Beispiel #5
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);
        }
Beispiel #6
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);
        }
Beispiel #7
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);
        }
Beispiel #8
0
 public float Dot(BHQuaternion q)
 {
     q.SetValues();
     return(DotQuaternion(mQuaternion, q.mQuaternion));
 }