RectangularCell2D

inner class RectangularCell2D(row: Int, col: Int)

Constructors

Link copied to clipboard
constructor(row: Int, col: Int)

Properties

Link copied to clipboard
Link copied to clipboard

The x-coordinate of the center of the cell

Link copied to clipboard

The y-coordinate of the center of the cell

Link copied to clipboard
Link copied to clipboard

The grid that this cell is from

Link copied to clipboard
Link copied to clipboard

Can be used to check if the cell is available or not. For example, this can be used to see if the cell is available for traversal.

Link copied to clipboard

The x-coordinate of the maximum x still within the cell

Link copied to clipboard

The y-coordinate of the maximum y still within the cell

Link copied to clipboard

The x-coordinate of the minimum x still within the cell

Link copied to clipboard

The y-coordinate of the minimum y still within the cell

Link copied to clipboard

Returns a list of the ModelElements attached to any spatial elements within the cell.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val x: Double

The x-coordinate of the upper left corner of the rectangle for the cell

Link copied to clipboard
val y: Double

The y-coordinate of the upper left corner of the rectangle for the cell

Functions

Link copied to clipboard

Add the spatial element to the cell

Link copied to clipboard

Checks if x and y are in this cell

Link copied to clipboard
fun countModelElements(targetClass: Class<*>): Int

Counts the number of ModelElements of the provided class type that are in the cell. Use X.class for the search, where X is a valid class name.

Link copied to clipboard
fun countSpatialElements(targetClass: Class<*>): Int

Counts the number of SpatialElements of the provided class type that are in the cell. Use X.class for the search, where X is a valid class name.

Link copied to clipboard
fun <T> elements(targetClass: Class<T>): List<T>

Gets a list of elements of the target class that are in the cell

Link copied to clipboard
fun <T> modelElementsOfType(targetClass: Class<T>): List<T>

Gets a list of model elements of the target class that are in the cell This uses getModelElements() as the basis for the search

Link copied to clipboard

Removes the spatial element from the cell

Link copied to clipboard
open override fun toString(): String

Converts the cell to a string