/// <summary> /// Create SkyX and add to the scene /// </summary> public void Create() { if (IsCreated) { return; } MeshManager.Create(); MeshManager.MaterialName = GpuManager.SkydomeMaterialName; AtmosphereManager.Update(AtmosphereManager.Options, true); _lastCameraPosition = Camera.DerivedPosition; _lastCameraFarClipDistance = Camera.FarClipDistance; MoonManager.Create(); IsCreated = true; }
private string getConfigStringFromSkyXAtmosphereOptions(AtmosphereManager.AtmosphereOptions Options) { var hour = Options.Time.x; var min = (int)((Options.Time.x - hour) * 60); var timeStr = hour + ":" + min; var str = "MogreLib SkyX Plugin demo (Press F1 to show/hide information)" + (_showInformation ? " - Simuation paused - \n" : "\n-------------------------------------------------------------\nTime: " + timeStr + "\n"); if (_showInformation) { str += "-------------------------------------------------------------\n"; str += "Time: " + timeStr + " [1, Shift+1] (+/-).\n"; str += "Rayleigh multiplier: " + Options.RayleighMultiplier + " [2, Shift+2] (+/-).\n"; str += "Mie multiplier: " + Options.MieMultiplier + " [3, Shift+3] (+/-).\n"; str += "Exposure: " + Options.Exposure + " [4, Shift+4] (+/-).\n"; str += "Inner radius: " + Options.InnerRadius + " [5, Shift+5] (+/-).\n"; str += "Outer radius: " + Options.OuterRadius + " [6, Shift+6] (+/-).\n"; str += "Number of samples: " + Options.NumberOfSamples + " [7, Shift+7] (+/-).\n"; str += "Height position: " + Options.HeightPosition + " [8, Shift+8] (+/-).\n"; if (_skyX.VCloudsManager.IsCreated) { str += "Wind direction: " + _skyX.VCloudsManager.VClouds.WindDirection.ValueDegrees.ToString() + " degrees [0, Shift+0] (+/-).\n"; str += "Clouds roughness: " + _skyX.VCloudsManager.VClouds.NoiseScale + " [p, Shift+p] (+/-).\n"; } } return str; }