protected override void Initialize() { Window.Title = "3D Engine Test"; var waterLevel = 5.9f; var cam = new RiemersFirstPersonCamera(this); var pm = new HeightMapPerlin(this, 64, 64, 4.9f, 28.5f, 10, 0.7f, 4); var hmm = new HeightMapMirror(pm); var hm = new HeightMapIslandTrim(hmm, 25.0f, waterLevel - 1.0f, 0.5f, IslandShape.Circle, IslandTrimMethod.Ditch); hm.Landformations.Add(new LandformVolcano(new Point(34, 64), 29, 35)); hm.Landformations.Add(new LandformCrater(new Point(45, 35), 12)); var terrain = new Terrain(this, hm, cam); var noise = new EffectPerlinNoise(this); var sky = new EffectSkyDome(this, cam, noise); //var trees = new TextureTrees( this, cam, terrain ); var bg = new ClearComponent(this); var refractionMap = new RefractionMap(this, cam, waterLevel); refractionMap.RenderedComponents.Add(terrain); var reflectionMap = new ReflectionMap(this, cam, waterLevel); reflectionMap.RenderedComponents.Add(bg); reflectionMap.RenderedComponents.Add(sky); reflectionMap.RenderedComponents.Add(terrain); //reflectionMap.RenderedComponents.Add( trees ); var water = new EffectWater(this, cam, terrain, reflectionMap, refractionMap); Components.Add(noise); Components.Add(cam); Components.Add(refractionMap); Components.Add(reflectionMap); Components.Add(bg); Components.Add(sky); Components.Add(terrain); Components.Add(new Environment(this)); Components.Add(water); //Components.Add( trees ); base.Initialize(); }
protected override void Initialize() { Window.Title = "3D Engine Test"; var waterLevel = 5.9f; var cam = new RiemersFirstPersonCamera( this ); var pm = new HeightMapPerlin( this, 64, 64, 4.9f, 28.5f, 10, 0.7f, 4 ); var hmm = new HeightMapMirror( pm ); var hm = new HeightMapIslandTrim( hmm, 25.0f, waterLevel - 1.0f, 0.5f, IslandShape.Circle, IslandTrimMethod.Ditch ); hm.Landformations.Add( new LandformVolcano( new Point( 34, 64 ), 29, 35 ) ); hm.Landformations.Add( new LandformCrater( new Point( 45, 35 ), 12 ) ); var terrain = new Terrain( this, hm, cam ); var noise = new EffectPerlinNoise( this ); var sky = new EffectSkyDome( this, cam, noise ); //var trees = new TextureTrees( this, cam, terrain ); var bg = new ClearComponent( this ); var refractionMap = new RefractionMap( this, cam, waterLevel ); refractionMap.RenderedComponents.Add( terrain ); var reflectionMap = new ReflectionMap( this, cam, waterLevel ); reflectionMap.RenderedComponents.Add( bg ); reflectionMap.RenderedComponents.Add( sky ); reflectionMap.RenderedComponents.Add( terrain ); //reflectionMap.RenderedComponents.Add( trees ); var water = new EffectWater( this, cam, terrain, reflectionMap, refractionMap ); Components.Add( noise ); Components.Add( cam ); Components.Add( refractionMap ); Components.Add( reflectionMap ); Components.Add( bg ); Components.Add( sky ); Components.Add( terrain ); Components.Add( new Environment( this ) ); Components.Add( water ); //Components.Add( trees ); base.Initialize(); }