arithmetic/lisp/vec3.lisp
in-package#:luv.arithmetic.lisp.vec3
declaim
inline%make-vec3
declaim
inlinemake-vec3
declaim
defunvec3-component
vectoraxis
Return vector's component on the closed geometric axis vocabulary.
defun
setfvec3-component
check-typevaluereal
defunvec3-normalize
vector
let
length
vec3-lengthvector
defmethodlisp:lisp-binary-operation
defmethodlisp:lisp-dot
defmethodlisp:lisp-normalize
vectorvec3
vec3-normalizevector
defun make-vec3
(x y z)defun vec3-component
(vector axis)defun vec3-scale
(vector scale)defun vec3-dot
(left right)defun vec3-cross
(left right)defun vec3-length
(vector)defun vec3-normalize
(vector)define-arithmetic-operator *
Multiplication and scalar scaling.
define-arithmetic-operator +
Addition over compatible quantities.
define-arithmetic-operator -
Subtraction or unary negation.
define-arithmetic-operator sqrt
The componentwise square root of a raw value.
define-arithmetic-operator /
Division of two represented quantities.
defun vec3-list
(vector)defun map-vec3-binary
(function left right)defgeneric lisp-binary-operation
(function left right)Apply scalar FUNCTION componentwise to two Lisp representations.
defgeneric lisp-dot
(left right)defgeneric lisp-normalize
(vector)Vec3 is a representation, not one spatial meaning
The luvcraft source contains several visibly three-component families, but an audit shows that they should not all become the same abstraction: The vec3 structure in LUV.ARITHMETIC.LISP.VEC3 is therefore deliberately modest. It bundles continuous CPU components, supplies component, scale, dot, cross, length, and…
A transparent three-component Lisp value and its arithmetic realization. Semantic owners name what a value means; packed colours and GPU vertex lanes remain dense vectors instead.