TileCoord

class TileCoord(var x: Int, val y: Int, val z: Int, var offset: Int = 0, var time: String = "")

TileCoord.kt

Integer Coordinates for a Tile

Author

Jason Suto (11/30/23)

Parameters

x

: Int

y

: Int

z

: Int

Constructors

Link copied to clipboard
constructor(x: Int, y: Int, z: Int, offset: Int = 0, time: String = "")

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val mapBounds: MapBounds<LatitudeLongitude>?
Link copied to clipboard
var offset: Int
Link copied to clipboard
Link copied to clipboard
var x: Int
Link copied to clipboard
val y: Int
Link copied to clipboard
val z: Int

Functions

Link copied to clipboard
fun equals(coord: TileCoord): <Error class: unknown class>
Link copied to clipboard
fun getAncestor(offset: Int = 1): <Error class: unknown class>
Link copied to clipboard
fun getCenter(): <Error class: unknown class>

Returns the normalized position for the center of the tile coordinate.

Link copied to clipboard
fun getDescendants(offset: Int = 1): <Error class: unknown class><Int, TileCoord>
Link copied to clipboard
fun getNeighbor(xOffset: Int, yOffset: Int): TileCoord
Link copied to clipboard
fun getNeighbors(): <Error class: unknown class><TileQuadrant, TileCoord>
Link copied to clipboard
fun getPosition(): <Error class: unknown class>

Returns the normalized position for the top-left corner of the tile coordinate.

Link copied to clipboard
Link copied to clipboard
fun hash(): String

Used as a key in TileCache

Link copied to clipboard

Used as a key in TileCache

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun normalize(): <Error class: unknown class>

Returns the normalized coordinate. See normalized for why x uses Math.floorMod while y keeps plain %.

Link copied to clipboard

Folds an out-of-world x back into the primary world copy.

Link copied to clipboard
open override fun toString(): String
Link copied to clipboard
fun wrap(): <Error class: unknown class>