(frustum l t r b n f)
Sets up a viewing frustum, shaped like a truncated pyramid with the camera where the tip of the pyramid would be. This emulates the OpenGL function glFrustum().
Sets up a viewing frustum, shaped like a truncated pyramid with the camera where the tip of the pyramid would be. This emulates the OpenGL function glFrustum().
(look-at eye target up)
Returns a matrix that puts the camera at the eye position looking toward the target point with the given up direction.
Returns a matrix that puts the camera at the eye position looking toward the target point with the given up direction.
(matrix44)
(matrix44 [m00 m01 m02 m03 m10 m11 m12 m13 m20 m21 m22 m23 m30 m31 m32 m33])
(matrix44 m00 m01 m02 m03 m10 m11 m12 m13 m20 m21 m22 m23 m30 m31 m32 m33)
(ortho l t r b n f)
Returns an orthographic projection matrix, in which objects are the same size no matter how far away or nearby they are. This emulates the OpenGL function glOrtho().
Returns an orthographic projection matrix, in which objects are the same size no matter how far away or nearby they are. This emulates the OpenGL function glOrtho().
(perspective fovy aspect near far)
Returns a perspective transform matrix, which makes far away objects appear
smaller than nearby objects. The aspect
argument should be the width
divided by the height of your viewport and fov
is the vertical angle
of the field of view in degrees.
Returns a perspective transform matrix, which makes far away objects appear smaller than nearby objects. The `aspect` argument should be the width divided by the height of your viewport and `fov` is the vertical angle of the field of view in degrees.
(unproject-point v vmat pmat {:keys [p width height]})
Takes a vec3 in screenspace, view matrix, projection matrix and view rect. Returns vector in model space or nil.
Takes a vec3 in screenspace, view matrix, projection matrix and view rect. Returns vector in model space or nil.
(viewport-transform width height)
(viewport-transform width height invert-y?)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close