LL
Size: a a a
LL
SA
A
PG
AE
AE
AE
AE
SA
SA
SA
AE
AE
LL
MS
AE
The value
1.0
is not of type
VECTOR
[Condition of type TYPE-ERROR]
Backtrace:
0: (LBGE.MATH:TRANSFORM-MATRIX #<LBGE.MATH::TRANSFORM {100447F6A3}>)
AE
AE
AE
AE
(defun transform-matrix (transform)
(with-slots ((r rotation) (s scale) (tr translation)) transform
(let ((xx (* (quaternion-x r) (quaternion-x r)))
(xy (* (quaternion-x r) (quaternion-y r)))
(xz (* (quaternion-x r) (quaternion-z r)))
(xw (* (quaternion-x r) (quaternion-w r)))
(yy (* (quaternion-y r) (quaternion-y r)))
(yz (* (quaternion-y r) (quaternion-z r)))
(yw (* (quaternion-y r) (quaternion-w r)))
(zz (* (quaternion-z r) (quaternion-z r)))
(zw (* (quaternion-z r) (quaternion-w r))))
(make-float4x4 (* (float3-x s)
(- 1.0f0 (* 2.0f0 (+ yy zz))))
(* (float3-y s)
(* 2.0f0 (- xy zw)))
(* (float3-z s)
(* 2.0f0 (+ xz yw)))
(float3-x tr)
(* (float3-x s)
(* 2.0f0 (+ xy zw)))
(* (float3-y s)
(- 1.0f0 (* 2.0f0 (+ xx zz))))
(* (float3-z s)
(* 2.0f0 (- yz xw)))
(float3-y tr)
(* (float3-x s)
(* 2.0f0 (- xz yw)))
(* (float3-y s)
(* 2.0f0 (+ yz xw)))
(* (float3-z s)
(- 1.0f0 (* 2.0f0 (+ xx yy))))
(float3-z tr)
0.0f0
0.0f0
0.0f0
1.0f0))))