math/mat4
src/math/mat4.tur
defn
mat4-identity
(mat4-identity :)
return the 4x4 identity matrix. Since: P1
defn
mat4-translate
(mat4-translate [tx : float ty : float tz : float] :)
return a translation matrix. Since: P1
defn
mat4-rotate-x
(mat4-rotate-x [angle : float] :)
rotation matrix around X axis (angle in radians). Since: P1
defn
mat4-rotate-y
(mat4-rotate-y [angle : float] :)
rotation matrix around Y axis (angle in radians). Since: P1
defn
mat4-rotate-z
(mat4-rotate-z [angle : float] :)
rotation matrix around Z axis (angle in radians). Since: P1
defn
mat4-scale
(mat4-scale [sx : float sy : float sz : float] :)
return a scale matrix. Since: P1
defn
mat4-mul
(mat4-mul [a : int b : int] :)
multiply two 4x4 matrices (column-major). Since: P1
defn
mat4-invert
(mat4-invert [src : int] :)
invert a 4x4 matrix. Returns identity if singular. Since: P1
defn
mat4-perspective
(mat4-perspective [fovy : float aspect : float near : float far : float] :)
perspective projection matrix.
Parameters
| fovy | vertical field of view in radians | |
| aspect | width / height | |
| near | near clip plane distance | |
| far | far clip plane distance |
Since: P1
defn
mat4-look-at
(mat4-look-at [eye : int center : int up : int] :)
view matrix looking from eye toward center. Since: P1