static void Main(string[] args) { DataManager datamanager = new DataManager(); datamanager.InitializeData(); // Select a starting material/observer/light set. Material material = datamanager.GetMaterialByPartialName("Lime Green"); Observer observer = datamanager.GetObserverByPartialName("1964"); LightSource lightsource = datamanager.GetLightSourceByPartialName("SP35"); Console.WriteLine("Material selected is: " + material); Console.WriteLine("Observer selected is: " + observer); Console.WriteLine("Light source selected is: " + lightsource); Utilities.CreateMetamericMaterialSmart(lightsource, material, observer); // Wait for me to type something before closing the console window. Console.ReadKey(); }
/// <summary> /// Calculate the tristimulus values from the data manager object. /// </summary> /// <param name="dataManager">The datamanager object that contains all the light sources, materials, observers</param> /// <returns>A Vector3 containing X, Y and Z values in each cell respectively.</returns> public static Vector3 CalculateTristimulusValues(DataManager dataManager) { LightSource ls = dataManager.LightSources[0]; Material mat = dataManager.Materials[0]; Observer obs = dataManager.Observers[0]; return CalculateTristimulusValues(ls, mat, obs); }