// zoom.h // // by John D. de Boer // Initialisation void initzoom(void); void giveprojcontrols(window *W, int PLACE, int AZIM, int ELEV, bool DownOnly); //void give2Dcontrols(window *W, int PLACE, int AZIM); void giveglobecontrols(window *W, int PLACE, int LAT, int LONG); // Controlling projections in windows void scrolltoproj(window *W); void projtoscroll(window *W); bool projectionkey(keystroke *K); bool projectionwheel(window *W, short DX, short DY); //bool projcontent(mouseclick *E); //void adjustprojcontrols(window *W, int STATE); // These routines allow the user to drag a point in a perspective view, or // on the surface of an opaque unit sphere, with the view angles being slaved // to satisfy the new orientation of the sphere typedef struct { bool good, // struct has been initialised successfully same, // whether mouse has remained stationary since last draw did; // whether any dragging took place window *wind; // window in which drag takes place point start, // start point of drag end; // current or end point of drag vector where; // view angle or terrestrial location of mouse-down event (normalised) real azim, // new view azimuth as a result of drag elev; // new view elevation as a result of drag } projdragtask; void initprojdrag(mouseclick *M, projdragtask *T); void trackprojdrag(projdragtask *T, point P); void initspheredrag(mouseclick *M, projdragtask *T); void trackspheredrag(projdragtask *T, point P);