ContinuousProjection

constructor(context: AgentModel.Context<A>, xRange: ClosedRange<Double>, yRange: ClosedRange<Double>, torus: Boolean = false, cellSize: Double = run { val xSize = xRange.endInclusive - xRange.start val ySize = yRange.endInclusive - yRange.start val smaller = minOf(xSize, ySize) if (smaller > 0.0) smaller / Defaults.cellSizeDivisor else 1.0 }, name: String = "continuous")(source)

Parameters

context

the context whose agents this projection positions

xRange

logical x bounds (used for torus wrapping)

yRange

logical y bounds (used for torus wrapping)

torus

if true, distances wrap at the bounds

cellSize

side length of each spatial-hash cell. Defaults to min(xSize, ySize) / 10.0, or 1.0 for degenerate ranges. Must be positive.

name

display name