Matrix2d

class Matrix2d(val x1y1: Double = 1.0, val x2y1: Double = 0.0, val x3y1: Double = 0.0, val x1y2: Double = 0.0, val x2y2: Double = 1.0, val x3y2: Double = 0.0)

Note. if this only needed for affine transformations, then the bottom row can be hard coded to 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, x1y2: Double = 0.0, x2y2: Double = 1.0, x3y2: 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 x2y1: Double = 0.0
Link copied to clipboard
val x2y2: Double = 1.0
Link copied to clipboard
val x3y1: Double = 0.0
Link copied to clipboard
val x3y2: Double = 0.0

Functions

Link copied to clipboard

A single reflection will cause points within a path to be ordered in the opposite direction (clockwise/anticlockwise). This can cause trouble, because the direction of the path determines if it is treated as a hole or a solid.

Link copied to clipboard
operator fun times(o: Matrix2d): Matrix2d
operator fun times(vector: Vector2): Vector2

fun times(x: Double, y: Double): Vector2

This performs a 3x3 matrix times by a 1x3 matrix, adding an extra 1.0 for the z value of the 1x3 matrix.

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