Exemplo n.º 1
0
 /// <summary>
 /// Constructor
 /// </summary>
 public SceneManager( )
 {
     tileManager       = null;
     renderableManager = null;
     textureManager    = null;
     data2DManager     = null;
     pageManager       = null;
     needOptionsUpdate = false;
     worldGeomIsSetup  = false;
 }
Exemplo n.º 2
0
        /// <summary>
        /// Loads the LandScape using parameters in the given config file.
        /// </summary>
        /// <param name="filename"></param>
        public override void LoadWorldGeometry(string filename)
        {
            if (worldGeomIsSetup == true)
            {
                ClearScene();
            }
            // Load the configuration file
            options = PagingLandscape.Options.Instance;
            options.Load(filename);

            // Create the Tile and Renderable and 2D Data Manager
            tileManager       = TileManager.Instance;
            renderableManager = RenderableManager.Instance;
            textureManager    = Texture.TextureManager.Instance;
            data2DManager     = Data2DManager.Instance;
            pageManager       = new PageManager(this.rootSceneNode);
            worldGeomIsSetup  = true;
        }
Exemplo n.º 3
0
        /// <summary>
        /// Empties the entire scene, inluding all SceneNodes, Cameras, Entities and Lights etc.
        /// </summary>
        public override void ClearScene()
        {
            if (worldGeomIsSetup == true)
            {
                worldGeomIsSetup = false;

                // Delete the Managers
                if (pageManager != null)
                {
                    pageManager.Dispose();
                    pageManager = null;
                }
                if (tileManager != null)
                {
                    tileManager.Dispose();
                    tileManager = null;
                }
                if (renderableManager != null)
                {
                    renderableManager.Dispose();
                    renderableManager = null;
                }
                if (textureManager != null)
                {
                    textureManager.Dispose();
                    textureManager = null;
                }
                if (data2DManager != null)
                {
                    data2DManager.Dispose();
                    data2DManager = null;
                }
            }
            //Call the default
            base.ClearScene();
        }