Various utilities for math
This is a purely math-related utility kit, providing functions which can be useful for games, 3D, and GL in general. Right now this includes additional matrix functionality by @3b on top of sb-cga.
ortho-matrix LEFT RIGHT BOTTOM TOP NEAR FAR: Construct an orthographic matrix like
glOrthofrom OpenGL 2.1.
frustum LEFT RIGHT BOTTOM TOP NEAR FAR: Construct a perspective matrix from the given parameters, like
glFrustumfrom OpenGL 2.1.
perspective-matrix FOVY-DEGREES ASPECT Z-NEAR Z-FAR: Construct a perspective matrix from the given parameters, like
gluPerspectivefrom OpenGL 2.1.
look-at EYE TARGET UP: Where
UPare vectors, construct a viewing matrix much like
gluLookAtfrom OpenGL 2.1.
Note: These merely create native Lisp matrices; they do not multiply them like the similar GL functions or in any way set them as GL state like the old fixed-function pipeline.
copy-matrix M: Create a copy of
deg-to-rad D: Convert
Ddegrees to radians.