set

fun set(other: Mat4): Mat4
fun set(floats: List<Float>): Mat4
fun set(other: Mat3): Mat4
fun set(xAxis: Vec3f, yAxis: Vec3f, zAxis: Vec3f, pos: Vec3f): Mat4
operator fun set(i: Int, value: Float)
operator fun set(row: Int, col: Int, value: Float)


fun set(quaternion: Vec4f): Mat4

Sets the matrix to a rotation matrix representing the quaternion.

Return

this matrix

Parameters

quaternion

the quaternion that is to be used to set this matrix


fun set(qx: Float, qy: Float, qz: Float, qw: Float): Mat4

Sets the matrix to a rotation matrix representing the quaternion.

Return

this matrix

Parameters

qx

The X component of the quaternion that is to be used to set this matrix.

qy

The Y component of the quaternion that is to be used to set this matrix.

qz

The Z component of the quaternion that is to be used to set this matrix.

qw

The W component of the quaternion that is to be used to set this matrix.


fun set(translation: Vec3f, quaternion: Vec4f, scale: Vec3f): Mat4

Sets the matrix to a rotation matrix representing the translation, quaternion, and scale.

Return

this matrix

Parameters

translation

the translation component

quaternion

the rotation component

scale

the scale component


fun set(tx: Float, ty: Float, tz: Float, qx: Float, qy: Float, qz: Float, qw: Float, sx: Float = 1.0f, sy: Float = 1.0f, sz: Float = 1.0f): Mat4

Sets the matrix to a rotation matrix representing the translation, quaternion, and scale.

Return

this matrix

Parameters

tx

The X component of the translation that is to be used to set this matrix.

ty

The Y component of the translation that is to be used to set this matrix.

tz

The Z component of the translation that is to be used to set this matrix.

qx

The X component of the quaternion that is to be used to set this matrix.

qy

The Y component of the quaternion that is to be used to set this matrix.

qz

The Z component of the quaternion that is to be used to set this matrix.

qw

The W component of the quaternion that is to be used to set this matrix.

sx

The X component of the scaling that is to be used to set this matrix.

sy

The Y component of the scaling that is to be used to set this matrix.

sz

The Z component of the scaling that is to be used to set this matrix.