Point
class Point @JvmOverloads constructor(val x: Double = 0.0, val y: Double = 0.0, val z: Double = 0.0)
A point in 3D isometric space.
The coordinate system is: - x: right-and-down on screen (increases toward bottom-right)
y: left-and-down on screen (increases toward bottom-left)
z: straight up on screen (increases upward)
See also
for painter's algorithm sorting
Properties
Functions
Link copied to clipboard
The depth of a point in the isometric projection, used for painter's algorithm sorting.
The depth of a point in the isometric plane for an arbitrary engine angle. The formula weights x/y by cos/sin of the projection angle and z by a factor that preserves correct depth ordering for the given viewing angle.
Link copied to clipboard
Link copied to clipboard
fun Point.toTileCoordinate(tileSize: Double = 1.0, originOffset: Point = Point.ORIGIN): TileCoordinate
Converts a continuous world Point to the TileCoordinate of the tile cell that contains it.
Link copied to clipboard
Negates all coordinates.