]> gitweb.factorcode.org Git - factor.git/blob - apps/lindenmayer/camera.factor
more sql changes
[factor.git] / apps / lindenmayer / camera.factor
1 USING: kernel math sequences opengl turtle ;
2 IN: turtle-camera
3
4 : camera-eye ( -- array ) position> ;
5
6 : camera-focus ( -- array )
7 push-turtle
8 1 step-turtle position>
9 pop-turtle ;
10
11 : camera-up ( -- array )
12 push-turtle
13 90 pitch-up position> 1 step-turtle position> swap v-
14 pop-turtle ;
15
16 : do-look-at ( -- )
17 camera-eye first3 camera-focus first3 camera-up first3 gluLookAt ;