(glm-rotate matrix angle [x y z :as axis])Builds a rotation 4 * 4 matrix created from an axis vector and an angle. matrix - Input matrix multiplied by this rotation matrix. angle - Rotation angle expressed in radians. axis - Rotation axis, normalized.
Builds a rotation 4 * 4 matrix created from an axis vector and an angle. matrix - Input matrix multiplied by this rotation matrix. angle - Rotation angle expressed in radians. axis - Rotation axis, normalized.
(glm-scale matrix [x y z :as v])Builds a scale 4 * 4 matrix created from 3 scalars. matrix - Input matrix multiplied by this scale matrix. v - Ratio of scaling for each axis.
Builds a scale 4 * 4 matrix created from 3 scalars. matrix - Input matrix multiplied by this scale matrix. v - Ratio of scaling for each axis.
(glm-translate matrix [x y z :as v])Builds a translation 4 * 4 matrix created from a vector of 3 components. matrix - Input matrix multiplied by this translation matrix. v - Coordinates of a translation vector.
Builds a translation 4 * 4 matrix created from a vector of 3 components. matrix - Input matrix multiplied by this translation matrix. v - Coordinates of a translation vector.
(look-at camera)(look-at camera-pos camera-target up)Create a view matrix.
Create a view matrix.
(perspective-fov)(perspective-fov fovy aspect-ratio near-plane far-plane)Create a perpective projection matrix. FOV is in radians. See: mat4#perspective https://glmatrix.net/docs/mat4.js.html
Create a perpective projection matrix. FOV is in radians. See: mat4#perspective https://glmatrix.net/docs/mat4.js.html
(project projection view model [x y z :as point])Convenience function to perform vertex transformation. Performs viewport transformation and perspective division, i.e. divides by the w value and normalizes to [0, 1].
Convenience function to perform vertex transformation. Performs viewport transformation and perspective division, i.e. divides by the w value and normalizes to [0, 1].
(translate matrix v)Use glm-translate instead.
Use glm-translate instead.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |