1 USING: kernel locals math math.matrices math.order math.vectors
2 prettyprint sequences ;
3 IN: benchmark.3d-matrix-scalar
5 :: p-matrix ( dim fov near far -- matrix )
6 dim dup first2 min v/n fov v*n near v*n
7 near far frustum-matrix4 ;
9 :: mv-matrix ( pitch yaw location -- matrix )
10 { 1.0 0.0 0.0 } pitch rotation-matrix4
11 { 0.0 1.0 0.0 } yaw rotation-matrix4
12 location vneg translation-matrix4 m. m. ;
17 { 1024.0 768.0 } 0.7 0.25 1024.0 p-matrix :> p
18 3.0 1.0 { 10.0 -0.0 2.0 } mv-matrix :> mv