]> gitweb.factorcode.org Git - factor.git/blob - unmaintained/4DNav/camera/camera.factor
tools.test: Make the flag public. Finish porting tester changes to fuzzer.
[factor.git] / unmaintained / 4DNav / camera / camera.factor
1 USING: kernel namespaces math.vectors opengl opengl.glu 4DNav.turtle  ;
2
3 IN: 4DNav.camera
4
5 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
6
7 : camera-eye ( -- point ) turtle-pos> ;
8
9 : camera-focus ( -- point ) 
10     [ 1 step-turtle turtle-pos> ] save-self ;
11
12 : camera-up ( -- dirvec )
13 [ 90 pitch-up turtle-pos> 1 step-turtle turtle-pos> swap v- ] 
14     save-self ;
15
16 : do-look-at ( camera -- )
17 [ >self camera-eye camera-focus camera-up gl-look-at ] 
18     with-scope ;