2 USING: kernel namespaces math.vectors opengl pos ori turtle self ;
6 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
8 : camera-eye ( -- point ) pos> ;
10 : camera-focus ( -- point ) [ 1 step-turtle pos> ] save-self ;
12 : camera-up ( -- dirvec )
13 [ 90 pitch-up pos> 1 step-turtle pos> swap v- ] save-self ;
15 : do-look-at ( camera -- )
16 [ >self camera-eye camera-focus camera-up gl-look-at ] with-scope ;