Symmetric Pre Computed Vision Tries
A provider for pre-computed tries for the line of sight (LoS) on a symmetric grid.
This class provides you with the ability to pre-compute the tries in order to enhance the speed of common operations e.g., line-of-sight (LoS), field-of-view (FoV), etc.
Parameters
radius
the vision radius for the tries.
Functions
Link copied to clipboard
fun lineOfSight(from: AxisPoint, to: AxisPoint, radius: Int = this.radius, doesBlockVision: (Int, Int) -> Boolean): Set<HexCoordinates>
fun lineOfSight(from: AxisPoint, to: AxisPoint, radius: Int = this.radius, doesBlockVision: (Int, Int) -> Boolean, callback: (Int, Int) -> Unit): Boolean
fun lineOfSight(fromQ: Int, fromR: Int, toQ: Int, toR: Int, radius: Int = this.radius, doesBlockVision: (Int, Int) -> Boolean, callback: (Int, Int) -> Unit): Boolean
Converts provided coordinates into line-of-sight data.