rescuecore.tools.mapgenerator
Class BasicBuildingGenerator

java.lang.Object
  extended byrescuecore.tools.mapgenerator.BlocksBuildingGenerator
      extended byrescuecore.tools.mapgenerator.BasicBuildingGenerator
All Implemented Interfaces:
BuildingGenerator

public class BasicBuildingGenerator
extends BlocksBuildingGenerator

A BuildingGenerator that recursively chops a block into rectangular buildings.


Constructor Summary
BasicBuildingGenerator()
           
 
Method Summary
protected  int[][][] fillBlock(RescueMap rm, int[] block, int density, java.util.Random rand)
          Divides a block into a number of rectangular buildings.
protected  int[][][] fillOuterBlock(RescueMap rm, int[] block, int density, java.util.Random rand)
          No buildings returned - just have an empty outer rim.
 
Methods inherited from class rescuecore.tools.mapgenerator.BlocksBuildingGenerator
addBuildings
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicBuildingGenerator

public BasicBuildingGenerator()
Method Detail

fillBlock

protected int[][][] fillBlock(RescueMap rm,
                              int[] block,
                              int density,
                              java.util.Random rand)
Divides a block into a number of rectangular buildings.

Specified by:
fillBlock in class BlocksBuildingGenerator
Parameters:
rm - The RescueMap containing the block.
block - A list of nodes in anti-clockwise order around the block.
density - The density of buildings to add.
rand - The random number generator.
Returns:
Buildings to add as an array of form [building][apex][coordinate]

fillOuterBlock

protected int[][][] fillOuterBlock(RescueMap rm,
                                   int[] block,
                                   int density,
                                   java.util.Random rand)
No buildings returned - just have an empty outer rim.

Specified by:
fillOuterBlock in class BlocksBuildingGenerator
Parameters:
rm - The RescueMap containing the block.
block - A list of nodes in anti-clockwise order around the block.
density - The density of buildings to add.
rand - The random number generator.
Returns:
Buildings to add as an array of form [building][apex][coordinate]