Location

data class Location(val x: Double = 0.0, val y: Double = 0.0, val z: Double = 0.0)

A location in 3D space

Constructors

Link copied to clipboard
constructor(x: Int = 0, y: Int = 0, z: Int = 0)
constructor(x: Double = 0.0, y: Double = 0.0, z: Double = 0.0)

Types

Link copied to clipboard
object Companion

Properties

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

X coordinate

Link copied to clipboard
val y: Double = 0.0

Y coordinate

Link copied to clipboard
val z: Double = 0.0

Z coordinate

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Transform a location of a pixel with an offset and rotation around axes.

Link copied to clipboard

Rotate a point around the X axis by rotation radians using the matrix | 1 0 0 | | 0 cos(xRotation) -sin(xRotation) | | 0 sin(xRotation) cos(xRotation) |

Link copied to clipboard

Rotate a point around the Y axis by rotation radians using the matrix | cos(yRotation) 0 sin(xRotation) | | 0 1 0 | | -sin(xRotation) 0 cos(xRotation) |

Link copied to clipboard

Rotate a point around the Z axis by rotation radians using the matrix | cos(zRotation) -sin(zRotation) 0 | | sin(zRotation) cos(zRotation) 0 | | 0 0 1 |