public SkyMgr(StateManager stateMgr) { this.mStateMgr = stateMgr; this.mCaelumSystem = new CaelumSystem(this.mStateMgr.Root, this.mStateMgr.SceneMgr, CaelumSystem.CaelumComponent.None); this.mListener = new RootLstn(TypeLstn.FrameStarted, mCaelumSystem.FrameStarted); this.CreateSky(); this.AddListeners(); }
private static void SetupCaelum(Viewport vp, RenderWindow wind) { cs = new CaelumSystem(_root, sceneMgr, CaelumSystem.CaelumComponent.Default); cs.AttachViewport(vp); wind.PreViewportUpdate += new RenderTargetListener.PreViewportUpdateHandler(wind_PreViewportUpdate); cs.EnsureSingleShadowSource = false; cs.EnsureSingleLightSource = true; cs.ManageSceneFog = true; cs.SceneFogDensityMultiplier = 0.0001f; // or some other small value. cs.TimeScale = 1000; cs.ObserverLatitude = 0; cs.ObserverLongitude = 0; cs.Sun.SpecularMultiplier = new ColourValue(.5f, .5f, .5f, 1f); cs.Sun.DiffuseMultiplier = new ColourValue(1, 1, 1, .5f); // cs.GroundFog cs.JulianDay = 18; var d = cs.GetUniversalClock(); }