Exemple #1
0
 /// <summary>
 /// Converts a <see cref="Fusee.Math.Core.Vector3F"/> to <see cref="Microsoft.DirectX.Vector3"/>.
 /// </summary>
 /// <param name="value">The vector to convert.</param>
 /// <returns>A <see cref="Microsoft.DirectX.Vector3"/> value.</returns>
 public static Microsoft.DirectX.Vector3 ToDirectX(Fusee.Math.Core.Vector3F value)
 {
     return(new Microsoft.DirectX.Vector3(value.X, value.Y, value.Z));
 }
Exemple #2
0
 /// <summary>
 /// Copys a <see cref="Fusee.Math.Core.Vector3F"/> to an existing double array.
 /// </summary>
 /// <param name="value">The source vector to convert.</param>
 /// <param name="pDst">A pointer to the destination double array [x, y, z]</param>
 public static unsafe void Vector3FToArrayDouble(Fusee.Math.Core.Vector3F value, double *pDst)
 {
     pDst[0] = value.X;
     pDst[1] = value.Y;
     pDst[2] = value.Z;
 }
Exemple #3
0
 /// <summary>
 /// Converts a <see cref="Fusee.Math.Core.Vector3F"/> to  a double array.
 /// </summary>
 /// <param name="value">The vector to convert.</param>
 /// <returns>A double array containing three values [x, y, z]</returns>
 public static double[] Vector3FToArrayDouble(Fusee.Math.Core.Vector3F value)
 {
     return(new double[] { value.X, value.Y, value.Z });
 }
Exemple #4
0
 /// <summary>
 /// Copys a <see cref="Fusee.Math.Core.Vector3F"/> to an existing float array.
 /// </summary>
 /// <param name="value">The source vector to convert.</param>
 /// <param name="pDst">A pointer to the destination float array [x, y, z]</returns>
 public static unsafe void Vector3FToArrayFloat(Fusee.Math.Core.Vector3F value, float *pDst)
 {
     pDst[0] = value.X;
     pDst[1] = value.Y;
     pDst[2] = value.Z;
 }
Exemple #5
0
        // TODO: add all the other FromMatrix methods
        // TODO: add all 16 from and to methods for all the other matrix types
        #endregion

        #region Vector2 Conversion
        // TODO:
        #endregion

        #region Vector3 Conversion
        /// <summary>
        /// Converts a <see cref="Fusee.Math.Core.Vector3F"/> to  a float array.
        /// </summary>
        /// <param name="value">The vector to convert.</param>
        /// <returns>A float array containing three values [x, y, z]</returns>
        public static float[] Vector3FToArrayFloat(Fusee.Math.Core.Vector3F value)
        {
            return(new float[] { value.X, value.Y, value.Z });
        }