Axiom.Demos.SkyDome.CreateScene C# (CSharp) Method

CreateScene() public method

public CreateScene ( ) : void
return void
		public override void CreateScene()
		{
			// set ambient light
			scene.AmbientLight = ColorEx.Gray;

			// create a skydome
			scene.SetSkyDome( true, "Examples/CloudySky", 5, 8 );

			// create a light
			Light light = scene.CreateLight( "MainLight" );
			light.Position = new Vector3( 20, 80, 50 );

			// add a floor plane
			Plane p = new Plane();
			p.Normal = Vector3.UnitY;
			p.D = 200;
			MeshManager.Instance.CreatePlane( "FloorPlane", ResourceGroupManager.DefaultResourceGroupName, p, 2000, 2000, 1, 1, true, 1, 5, 5, Vector3.UnitZ );

			// add the floor entity
			Entity floor = scene.CreateEntity( "Floor", "FloorPlane" );
			floor.MaterialName = "Examples/RustySteel";
			scene.RootSceneNode.CreateChildSceneNode().AttachObject( floor );

			ogre = scene.CreateEntity( "Ogre", "ogrehead.mesh" );
			scene.RootSceneNode.CreateChildSceneNode().AttachObject( ogre );
		}