No matching definitions.

math/mat4

src/math/mat4.tur
defn

mat4-identity

(mat4-identity :int)

return the 4x4 identity matrix. Since: P1

defn

mat4-translate

(mat4-translate [tx :float ty :float tz :float] :int)

return a translation matrix. Since: P1

defn

mat4-rotate-x

(mat4-rotate-x [angle :float] :int)

rotation matrix around X axis (angle in radians). Since: P1

defn

mat4-rotate-y

(mat4-rotate-y [angle :float] :int)

rotation matrix around Y axis (angle in radians). Since: P1

defn

mat4-rotate-z

(mat4-rotate-z [angle :float] :int)

rotation matrix around Z axis (angle in radians). Since: P1

defn

mat4-scale

(mat4-scale [sx :float sy :float sz :float] :int)

return a scale matrix. Since: P1

defn

mat4-mul

(mat4-mul [a :int b :int] :int)

multiply two 4x4 matrices (column-major). Since: P1

defn

mat4-invert

(mat4-invert [src :int] :int)

invert a 4x4 matrix. Returns identity if singular. Since: P1

defn

mat4-perspective

(mat4-perspective [fovy :float aspect :float near :float far :float] :int)

perspective projection matrix.

fovyvertical field of view in radians
aspectwidth / height
nearnear clip plane distance
farfar clip plane distance

Since: P1

defn

mat4-look-at

(mat4-look-at [eye :int center :int up :int] :int)

view matrix looking from eye toward center. Since: P1