Matrix3d

class Matrix3d(val x1y1: Double = 1.0, val x2y1: Double = 0.0, val x3y1: Double = 0.0, val x4y1: Double = 0.0, val x1y2: Double = 0.0, val x2y2: Double = 1.0, val x3y2: Double = 0.0, val x4y2: Double = 0.0, val x1y3: Double = 0.0, val x2y3: Double = 0.0, val x3y3: Double = 1.0, val x4y3: Double = 0.0)

Note. if this only needed for affine transformations, then the bottom row can be hard coded to 0,0,0,1 This will simplify the maths.

Constructors

Link copied to clipboard
constructor(x1y1: Double = 1.0, x2y1: Double = 0.0, x3y1: Double = 0.0, x4y1: Double = 0.0, x1y2: Double = 0.0, x2y2: Double = 1.0, x3y2: Double = 0.0, x4y2: Double = 0.0, x1y3: Double = 0.0, x2y3: Double = 0.0, x3y3: Double = 1.0, x4y3: Double = 0.0)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val x1y1: Double = 1.0
Link copied to clipboard
val x1y2: Double = 0.0
Link copied to clipboard
val x1y3: Double = 0.0
Link copied to clipboard
val x2y1: Double = 0.0
Link copied to clipboard
val x2y2: Double = 1.0
Link copied to clipboard
val x2y3: Double = 0.0
Link copied to clipboard
val x3y1: Double = 0.0
Link copied to clipboard
val x3y2: Double = 0.0
Link copied to clipboard
val x3y3: Double = 1.0
Link copied to clipboard
val x4y1: Double = 0.0
Link copied to clipboard
val x4y2: Double = 0.0
Link copied to clipboard
val x4y3: Double = 0.0

Functions

Link copied to clipboard
Link copied to clipboard
operator fun times(o: Matrix3d): Matrix3d
operator fun times(vector: Vector3): Vector3

fun times(x: Double, y: Double, z: Double): Vector3

This performs a 4x4 matrix times by a 1x4 matrix, adding an extra 1.0 for the w value of the 1x3 vector.

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