LoadBRDF() public static method

Loads a MERL BRDF file
public static LoadBRDF ( FileInfo _BRDFFile ) : BRDFSlices.Vector3[
_BRDFFile FileInfo
return BRDFSlices.Vector3[
Example #1
0
        static void Main(string[] args)
        {
            try
            {
                // Analyze arguments
                if (args.Length != 1)
                {
                    throw new Exception("Usage: BRDFSlices \"Path to MERL BRDF\"");
                }

                FileInfo SourceBRDF = new FileInfo(args[0]);
                if (!SourceBRDF.Exists)
                {
                    throw new Exception("Source BRDF file \"" + SourceBRDF.FullName + "\" does not exist!");
                }

                // Load the BRDF
                Vector3[,,]     BRDF = DisplayForm.LoadBRDF(SourceBRDF);


                DisplayForm F = new DisplayForm(BRDF);
                Application.Run(F);
            }
            catch (Exception _e)
            {
                MessageBox.Show("An error occurred!\r\n\r\n" + _e.Message + "\r\n\r\n" + _e.StackTrace, "BRDF Fitting", MessageBoxButtons.OK, MessageBoxIcon.Warning);
            }
        }