Package-level declarations

Types

Link copied to clipboard
class Cell(val x: Int, val y: Int, val cellSize: Double)

Represents a cell in a 2D space, defined by its position and size.

Link copied to clipboard
class Cell3D(val x: Int, val y: Int, val z: Int, val cellSize: Double)

Represents a 3D cell with a fixed size in a spatial hash grid structure. A Cell3D is aligned along a grid using its integer coordinates and supports operations to manage points within its bounds, calculate distances to a query point, and retrieve its own bounding boxes.

Link copied to clipboard
class HashGrid(val radius: Double)

Represents a 2D spatial hash grid used for efficiently managing and querying points in a sparse space.

Link copied to clipboard
class HashGrid3D(val radius: Double)

Represents a 3D Hash Grid structure used for spatial partitioning of points in 3D space. This structure organizes points into grid-based cells, enabling efficient spatial querying and insertion operations.

Functions

Link copied to clipboard
fun List<Vector2>.filter(radius: Double): List<Vector2>
fun List<Vector3>.filter(radius: Double): List<Vector3>

Return a list that only contains points at a minimum distance.

Link copied to clipboard
fun List<Vector2>.hashGrid(radius: Double): HashGrid
fun List<Vector3>.hashGrid(radius: Double): HashGrid3D

Construct a hash grid containing all points in the list