setToLookAt

fun setToLookAt(direction: Vec3f, up: Vec3f): Mat4

Sets the matrix to a look at matrix with a direction and an up vector. Multiply with a translation matrix to get a camera model view matrix.

Return

this matrix

Parameters

direction

the direction vector

up

the up vector


fun setToLookAt(position: Vec3f, lookAt: Vec3f, up: Vec3f): Mat4

Sets this matrix to a look at matrix with the given position, target and up vector.

Return

this matrix

Parameters

position

the position

lookAt

the target

up

the up vector