Exemple #1
0
        public static Quaternion Barycentric(Quaternion q1, Quaternion q2, Quaternion q3, float f, float g)
        {
            Quaternion result = new Quaternion();

            unsafe
            {
                IDllImportApi.D3DXQuaternionBaryCentric((Quaternion *)&result, (Quaternion *)&q1,
                                                        (Quaternion *)&q2, (Quaternion *)&q3, f, g);
            }

            return(result);
        }
Exemple #2
0
 public static void Barycentric(ref Quaternion q1, ref Quaternion q2, ref Quaternion q3, float f, float g, out Quaternion result)
 {
     unsafe
     {
         fixed(Quaternion *pinResult = &result)
         {
             fixed(Quaternion *pin1 = &q1)
             {
                 fixed(Quaternion *pin2 = &q2)
                 {
                     fixed(Quaternion *pin3 = &q3)
                     {
                         IDllImportApi.D3DXQuaternionBaryCentric(pinResult, pin1, pin2, pin3, f, g);
                     }
                 }
             }
         }
     }
 }