/// <summary>
        ///     Internal constructor.  This class cannot be instantiated externally.
        /// </summary>
        internal SceneManagerEnumerator()
        {
            if (instance == null) {
                instance = this;

                // by default, use the standard scene manager.
                defaultSceneManager = new SceneManager("Default Scene Manager");

                // by default, all scenetypes use the default Scene Manager.  Note: These can be overridden by plugins.
                SetSceneManager(SceneType.Generic, defaultSceneManager);
                SetSceneManager(SceneType.ExteriorClose, defaultSceneManager);
                SetSceneManager(SceneType.ExteriorFar, defaultSceneManager);
                SetSceneManager(SceneType.Interior, defaultSceneManager);
                SetSceneManager(SceneType.Overhead, defaultSceneManager);
            }
        }
        /// <summary>
        ///     Internal constructor.  This class cannot be instantiated externally.
        /// </summary>
        internal SceneManagerEnumerator()
        {
            if (instance == null)
            {
                instance = this;

                // by default, use the standard scene manager.
                defaultSceneManager = new SceneManager("Default Scene Manager");

                // by default, all scenetypes use the default Scene Manager.  Note: These can be overridden by plugins.
                SetSceneManager(SceneType.Generic, defaultSceneManager);
                SetSceneManager(SceneType.ExteriorClose, defaultSceneManager);
                SetSceneManager(SceneType.ExteriorFar, defaultSceneManager);
                SetSceneManager(SceneType.Interior, defaultSceneManager);
                SetSceneManager(SceneType.Overhead, defaultSceneManager);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        ///     Constructor.
        /// </summary>
        /// <remarks>
        ///     This public contructor is intended for the user to decide when the Root object gets instantiated.
        ///     This is a critical step in preparing the engine for use.
        /// </remarks>
        /// <param name="configFileName">Name of the config file to load.</param>
        /// <param name="logFileName">Name of the default log file. (not used)</param>
        public Root(string configFileName, string logFileName)
        {
            if (instance == null) {
                instance = this;

                this.configFileName = configFileName;
                this.meterFrameCount = 0;
                this.pendingMeterFrameCount = 0;

                StringBuilder info = new StringBuilder();

                // write the initial info at the top of the log
                info.AppendFormat("*********Axiom 3D Engine Log *************{0}", Environment.NewLine);
                info.AppendFormat("Copyright {0}{1}", this.Copyright, Environment.NewLine);
                info.AppendFormat("Version: {0}{1}", this.Version, Environment.NewLine);
                info.AppendFormat("Operating System: {0}{1}", Environment.OSVersion.ToString(), Environment.NewLine);
                info.AppendFormat(".Net Framework: {0}{1}", Environment.Version.ToString(), Environment.NewLine);

                // Initializes the Log Manager singleton
                LogManager logMgr = new LogManager();

                /// Since logging is application wide, not just for axiom, it is now the application's
                /// responsibility to initialize logging.  We now assume that the app has initialized the
                /// log first.
                //logMgr.CreateLog(logFileName, true, true);

                logMgr.Write(info.ToString());
                logMgr.Write("*-*-* Axiom Intializing");

                new ArchiveManager();
                sceneManagerList = SceneManagerEnumerator.Instance;

                new MaterialManager();
                new MeshManager();
                new SkeletonManager();
                new ParticleSystemManager();
                PlatformManager.LoadInstance();

                // create a new timer
                timer = PlatformManager.Instance.CreateTimer();

                new OverlayManager();
                new OverlayElementManager();
                new FontManager();
                new ZipArchiveFactory();
                new CodecManager();

                // register all build in codecs
                CodecManager.Instance.RegisterCodecs();

                new HighLevelGpuProgramManager();
                new CompositorManager();

                new PluginManager();

                PluginManager.Instance.LoadAll();
            }
        }