Ejemplo n.º 1
0
        /// <summary>
        /// This method remaps a number between 0.0 and 1.0 to an integer value between lowestPower and highestPower
        /// </summary>
        private static int ComputeSamplesFromNormalizedValue(double value, int lowestPower, int highestPower)
        {
            // Calculate the size of the image
            // Samples range from 2^2 (4) - 2^9 (512)
            var expRange = highestPower - lowestPower;
            var t        = expRange * value;
            var finalExp = (int)Math.Pow(2, (int)(lowestPower + t));

            return(finalExp);
        }
Ejemplo n.º 2
0
        private static IList <UV> SetupSampleUVs()
        {
            var uvs = new List <UV>();

            for (int i = 0; i < 100; i++)
            {
                uvs.Add(UV.ByCoordinates(Math.Rand(), Math.Rand()));
            }

            return(uvs);
        }