private void Load() { SetLights(); SetShadows(); SetSky(); SetFog(); ground = new Ground(mSceneMgr); usa = new Plane(Vector3.NEGATIVE_UNIT_X, -500); flagMeshPtr = MeshManager.Singleton.CreatePlane("flag", ResourceGroupManager.DEFAULT_RESOURCE_GROUP_NAME, usa, 60, 100, 10, 6, true, 1, 1, 1, Vector3.UNIT_Z); flagEntity = mSceneMgr.CreateEntity("flag"); flagEntity.SetMaterialName("flagMaterial"); flagNode = mSceneMgr.CreateSceneNode(); flagNode.AttachObject(flagEntity); flagNode.Position = new Vector3(0, 100, 0); fStickEntity = mSceneMgr.CreateEntity("stick.mesh"); fStickNode = mSceneMgr.CreateSceneNode(); fStickNode.AttachObject(fStickEntity); fStickNode.Position = new Vector3(501, 70, 45); mSceneMgr.RootSceneNode.AddChild(flagNode); mSceneMgr.RootSceneNode.AddChild(fStickNode); #region cube cube = new Cube(mSceneMgr); MeshPtr cubePtr = cube.getCube("myCube", "Wall", 1000, 100, 1000); cubeEntity = mSceneMgr.CreateEntity("Cube_Entity", "myCube"); cubeNode = mSceneMgr.RootSceneNode.CreateChildSceneNode("Cube_Node"); cubeNode.AttachObject(cubeEntity); wall1 = new Plane(Vector3.NEGATIVE_UNIT_X, -500); Physics.AddBoundary(wall1); wall2 = new Plane(Vector3.UNIT_X, -500); Physics.AddBoundary(wall2); wall3 = new Plane(Vector3.NEGATIVE_UNIT_Z, -500); Physics.AddBoundary(wall3); wall4 = new Plane(Vector3.UNIT_Z, -500); Physics.AddBoundary(wall4); //cube2 = new Cube(mSceneMgr); //MeshPtr cubePtr2 = cube2.getCube("myCube2", "Wall", 100, 100, 100); //cubeEntity2 = mSceneMgr.CreateEntity("Cube_Entity2", "myCube"); //cubeNode2 = mSceneMgr.RootSceneNode.CreateChildSceneNode("Cube_Node"); //cubeNode2.AttachObject(cubeEntity2); //cube3 = new Cube(mSceneMgr); //MeshPtr cubePtr3 = cube3.getCube("myCube3", "Wall", 100, 100, 100); //cubeEntity3 = mSceneMgr.CreateEntity("Cube_Entity3", "myCube"); //cubeNode3 = mSceneMgr.RootSceneNode.CreateChildSceneNode("Cube_Node"); //cubeNode3.AttachObject(cubeEntity3); //cube4 = new Cube(mSceneMgr); //MeshPtr cubePtr4 = cube4.getCube("myCube4", "Wall", 100, 100, 100); //cubeEntity4 = mSceneMgr.CreateEntity("Cube_Entity4", "myCube"); //cubeNode4 = mSceneMgr.RootSceneNode.CreateChildSceneNode("Cube_Node"); //cubeNode4.AttachObject(cubeEntity4); #endregion Physics.AddBoundary(ground.Plane); }