eye-rotate ( yaw pitch v -- v' )


Vocabulary
gpu.util.wasd

Inputs
yawan object
pitchan object
van object


Outputs
v'an object


Definition


:: 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 ;