public TerrainTexturePack(TerrainTexture baseTexture, TerrainTexture redTexture, TerrainTexture greenTexture, TerrainTexture blueTexture)
 {
     this.baseTexture  = baseTexture;
     this.redTexture   = redTexture;
     this.greenTexture = greenTexture;
     this.blueTexture  = blueTexture;
 }
Exemple #2
0
 public Terrain(float gridX, float gridZ, Loader loader, TerrainTexturePack texturePack, TerrainTexture blendMap, Bitmap hegihtMap)
 {
     this.texturePack = texturePack;
     this.blendMap    = blendMap;
     this.x           = gridX * SIZE;
     this.z           = gridZ * SIZE;
     this.model       = GenerateTerrain(loader, hegihtMap);
 }
Exemple #3
0
        private Terrain LoadTerrain(Loader loader)
        {
            TerrainTexture     baseTexture  = new TerrainTexture(loader.LoadRepeatTexture("grassy"));
            TerrainTexture     redTexture   = new TerrainTexture(loader.LoadRepeatTexture("dirt"));
            TerrainTexture     greenTexture = new TerrainTexture(loader.LoadRepeatTexture("pinkFlowers"));
            TerrainTexture     blueTexture  = new TerrainTexture(loader.LoadRepeatTexture("path"));
            TerrainTexturePack texturePack  = new TerrainTexturePack(baseTexture, redTexture, greenTexture, blueTexture);

            TerrainTexture blendMapTexture = new TerrainTexture(loader.LoadRepeatTexture("blendMap2"));
            Bitmap         heightMapImage  = loader.LoadBitmap("heightmap2");

            return(new Terrain(0, -1f, loader, texturePack, blendMapTexture, heightMapImage));
        }