Continuous Projection
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
x Range
logical x bounds (used for torus wrapping)
y Range
logical y bounds (used for torus wrapping)
torus
if true, distances wrap at the bounds
cell Size
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