LoadWorldGeometry() public méthode

Loads the source of the 'world' geometry, i.e. the large, mainly static geometry making up the world e.g. rooms, landscape etc.
Depending on the type of SceneManager (subclasses will be specialized for particular world geometry types) you have requested via the Root or SceneManagerEnumerator classes, you can pass a filename to this method and it will attempt to load the world-level geometry for use. If you try to load an inappropriate type of world data an exception will be thrown. The default SceneManager cannot handle any sort of world geometry and so will always throw an exception. However subclasses like BspSceneManager can load particular types of world geometry e.g. "q3dm1.bsp".
public LoadWorldGeometry ( string fileName ) : void
fileName string
Résultat void
Exemple #1
0
        protected void GenerateScene()
        {
            ((Axiom.SceneManagers.Multiverse.SceneManager)scene).SetWorldParams(terrainGenerator, new DefaultLODSpec());
            scene.LoadWorldGeometry("");

            Axiom.SceneManagers.Multiverse.TerrainManager.Instance.ShowOcean = displayOcean;

            scene.AmbientLight = new ColorEx(0.8f, 0.8f, 0.8f);

            Light light = scene.CreateLight("MainLight");

            light.Type = LightType.Directional;
            Vector3 lightDir = new Vector3(-80 * oneMeter, -70 * oneMeter, -80 * oneMeter);

            lightDir.Normalize();
            light.Direction = lightDir;
            light.Position  = -lightDir;
            light.Diffuse   = ColorEx.White;
            light.SetAttenuation(1000 * oneMeter, 1, 0, 0);

            return;
        }