2 USING: kernel combinators sequences opengl.gl
3 ui.render ui.gadgets ui.gadgets.slate
6 IN: ui.gadgets.cartesian
8 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10 TUPLE: cartesian < slate x-min x-max y-min y-max z-min z-max perspective ;
12 : init-cartesian ( cartesian -- cartesian )
21 : <cartesian> ( -- cartesian ) cartesian new init-cartesian ;
23 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
25 M: cartesian establish-coordinate-system ( cartesian -- cartesian )
28 [ x-min>> ] [ x-max>> ]
29 [ y-min>> ] [ y-max>> ]
30 [ z-min>> ] [ z-max>> ]
35 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
37 : x-range ( cartesian range -- cartesian ) first2 [ >>x-min ] [ >>x-max ] bi* ;
38 : y-range ( cartesian range -- cartesian ) first2 [ >>y-min ] [ >>y-max ] bi* ;
39 : z-range ( cartesian range -- cartesian ) first2 [ >>z-min ] [ >>z-max ] bi* ;
41 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!