1 USING: kernel namespaces math.vectors opengl 4DNav.turtle self ;
5 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7 : camera-eye ( -- point ) turtle-pos> ;
9 : camera-focus ( -- point ) [ 1 step-turtle turtle-pos> ] save-self ;
11 : camera-up ( -- dirvec )
12 [ 90 pitch-up turtle-pos> 1 step-turtle turtle-pos> swap v- ] save-self ;
14 : do-look-at ( camera -- )
15 [ >self camera-eye camera-focus camera-up gl-look-at ] with-scope ;