]> gitweb.factorcode.org Git - factor.git/blob - unmaintained/camera/camera.factor
Move vocabularies which use delegation to unmaintained, and delete older unmaintained...
[factor.git] / unmaintained / camera / camera.factor
1
2 USING: kernel namespaces math.vectors opengl pos ori turtle self ;
3
4 IN: opengl.camera
5
6 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7
8 : camera-eye ( -- point ) pos> ;
9
10 : camera-focus ( -- point ) [ 1 step-turtle pos> ] save-self ;
11
12 : camera-up ( -- dirvec )
13 [ 90 pitch-up pos> 1 step-turtle pos> swap v- ] save-self ;
14
15 : do-look-at ( camera -- )
16 [ >self camera-eye camera-focus camera-up gl-look-at ] with-scope ;