MapBuilder

class MapBuilder(cells: MutableMap<Vec3I, MutableCell> = mutableMapOf(), val random: Random = Random.Default)

Constructors

Link copied to clipboard
fun MapBuilder(cells: MutableMap<Vec3I, MutableCell> = mutableMapOf(), random: Random = Random.Default)

Functions

Link copied to clipboard
fun add(position: Vec3I, cell: MutableCell)
Link copied to clipboard
fun addPositions(positions: Iterable<Vec3I>, cell: MutableCell): MapBuilder
Link copied to clipboard
fun build(): Map<Vec3I, MutableCell>
Link copied to clipboard
fun contains(position: Vec3I): Boolean
Link copied to clipboard
fun cube(    start: Vec3I,     end: Vec3I,     cell: MutableCell): MapBuilder
Link copied to clipboard
fun floor(y: Int): FloorBuilder
Link copied to clipboard
operator fun get(position: Vec3I): MutableCell?
Link copied to clipboard
fun getBoundaries(y: Int): Boundaries
fun getBoundaries(positions: Set<Vec3I> = cells.keys): Boundaries
Link copied to clipboard
fun line(    start: Vec3I,     end: Vec3I,     cell: MutableCell,     extraWidth: Float = 0.15f): MapBuilder
Link copied to clipboard
fun offset(offset: Vec3I): MapBuilder
Link copied to clipboard
fun remove(position: Vec3I)
Link copied to clipboard
fun removeCube(start: Vec3I, end: Vec3I): MapBuilder

Properties

Link copied to clipboard
val random: Random

Extensions

Link copied to clipboard
fun MapBuilder.generateBranches(    start: Vec3I,     radius: Int,     cell: MutableCell)
Link copied to clipboard
fun MapBuilder.makeTree(    height: Int,     radius: Int,     cell: MutableCell)
Link copied to clipboard
fun MapBuilder.startBranch(    direction: Vec3F,     position: Vec3I,     length: Float,     cell: MutableCell,     level: Int)