]> Pileus Git - grits/blobdiff - src/aweather-gui.c
adding some RSL patches, and support for velocity/spectum width color maps
[grits] / src / aweather-gui.c
index 1030492ae2b8572e94a82f9a306b5991e77b95a4..1dd85a5bbcb1f776c7af3bbdd556da5e85be7659 100644 (file)
@@ -1,3 +1,20 @@
+/*
+ * Copyright (C) 2009 Andy Spencer <spenceal@rose-hulman.edu>
+ * 
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ * 
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ * 
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
 #include <config.h>
 #include <gtk/gtk.h>
 #include <gtk/gtkgl.h>
@@ -76,6 +93,7 @@ static gboolean configure(GtkWidget *da, GdkEventConfigure *event, AWeatherGui *
        double width  = da->allocation.width;
        double height = da->allocation.height;
        double dist   = 500*1000; // 500 km
+       double cam    = 300*1000; // 500 km
 
        glViewport(0, 0, width, height);
 
@@ -84,12 +102,12 @@ static gboolean configure(GtkWidget *da, GdkEventConfigure *event, AWeatherGui *
        glLoadIdentity();
        double rad = atan(height/2*1000.0/dist); // 1px = 1000 meters
        double deg = (rad*180)/M_PI;
-       gluPerspective(deg*2, width/height, dist-20, dist+20);
+       gluPerspective(deg*2, width/height, cam-20, cam+20);
 
        /* Camera position? */
        glMatrixMode(GL_MODELVIEW);
        glLoadIdentity();
-       glTranslatef(0.0, 0.0, -dist);
+       glTranslatef(0.0, 0.0, -cam);
        //glRotatef(-45, 1, 0, 0);
 
        aweather_gui_gl_end(gui);