public GeoClipMap(Game game, short n)
            : base(game)
        {

            Game.Services.AddService(this.GetType(), this);

            for (int l = 0; l < layers.Length; l++)
            {
                layers[l] = new GeoClipMapLayer(game, n);
                layers[l].Scale = Scale;

                for (int s = 0; s < l; s++)
                    layers[l].Scale /= 2;

                if (l != 0)
                    layers[l].CorseScale = layers[l].Scale;

                if (l != 0 && ((l + 1) % 2) == 0)
                {
                    //layers[l].Rotate(Vector3.Up, MathHelper.Pi);
                }
            }

            centre = new GeoClipMapCentre(game, n);
            centre.Scale = Scale;

            int lc = layers.Length;
            for (int s = 0; s < lc; s++)
                centre.Scale /= 2;
        }
Exemplo n.º 2
0
        public GeoClipMap(Game game, short n, string terrainAsset)
            : base(game)
        {
            Game.Services.AddService(this.GetType(), this);

            TerrainMap = terrainAsset;
            for (int l = 0; l < layers.Length; l++)
            {
                layers[l]       = new GeoClipMapLayer(game, n, TerrainMap);
                layers[l].Scale = Scale;

                for (int s = 0; s < l; s++)
                {
                    layers[l].Scale /= 2;
                }

                if (l != 0)
                {
                    layers[l].CorseScale = layers[l].Scale;
                }

                if (l != 0 && ((l + 1) % 2) == 0)
                {
                    //layers[l].Rotate(Vector3.Up, MathHelper.Pi);
                }
            }

            centre       = new GeoClipMapCentre(game, n);
            centre.Scale = Scale;

            int lc = layers.Length;

            for (int s = 0; s < lc; s++)
            {
                centre.Scale /= 2;
            }
        }