shapes/calc-tmatrix.lsp [src]
Functions for calculating transformation matrices
(calc-tmatrix x-rot y-rot z-rot x-off y-off z-off x-inv y-inv z-inv)
Calculates a transformtion matrix from passed values
x-rot y-rot z-rot numeric values representing X Y or Z rotations
x-off y-off z-off numeric values representing X Y or Z offsets
x-inv y-inv z-inv non-nil values will mirror accross X Y or Z axis
(imat n)
Creates an identity matrix of size n
(mxm m n)
Multiplies two matrices
VARS:
(M LIST (TMATRIX-P M))
(N LIST (TMATRIX-P N))
(mxv m v)
Multiplies a matrix by a vector
VARS:
(M LIST (TMATRIX-P M))
(V LIST (VL-EVERY 'NUMBERP V) (= (LENGTH V) (LENGTH (CAR M))))
(tmatrix-p m)
Returns T if m is a valid tmatrix
VARS:
(M LIST (VL-EVERY 'LISTP M))
(trp m)
Transposes a matrix
VARS:
(M LIST (TMATRIX-P M))