Handbook
Glossary
eye-rotate ( yaw pitch v -- v' )
Vocabulary
gpu
.
util
.
wasd
Inputs
yaw
an
object
pitch
an
object
v
an
object
Outputs
v'
an
object
Definition
USING:
arrays
kernel
math
math.functions
math.matrices
;
IN:
gpu.util.wasd
::
eye-rotate
( yaw pitch v -- v' )
yaw
neg
:>
y pitch
neg
:>
p y
cos
:>
cosy y
sin
:>
siny p
cos
:>
cosp p
sin
:>
sinp cosy 0.0 siny
neg
3array
siny sinp
*
cosp cosy sinp
*
3array
siny cosp
*
sinp
neg
cosy cosp
*
3array
3array
v
swap
vdotm
;