~ubuntu-branches/ubuntu/warty/xplanet/warty

« back to all changes in this revision

Viewing changes to Options.h

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2004-08-24 07:14:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040824071400-2dr4qnjbjmm8z3ia
Tags: 1.0.6-1ubuntu1
Build-depend: libtiff4-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/****************************************************************************
2
 
    Xplanet 0.94 - render an image of a planet into an X window
3
 
    Copyright (C) 2002 Hari Nair <hari@alumni.caltech.edu>
4
 
 
5
 
    This program is free software; you can redistribute it and/or modify
6
 
    it under the terms of the GNU General Public License as published by
7
 
    the Free Software Foundation; either version 2 of the License, or
8
 
    (at your option) any later version.
9
 
 
10
 
    This program is distributed in the hope that it will be useful,
11
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
    GNU General Public License for more details.
14
 
 
15
 
    You should have received a copy of the GNU General Public License
16
 
    along with this program; if not, write to the Free Software
17
 
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
 
****************************************************************************/
19
 
 
20
 
#ifndef OPTIONS_H
21
 
#define OPTIONS_H
22
 
 
23
 
#include <list>
24
 
#include <string>
25
 
using namespace std;
26
 
 
27
 
#include <sys/time.h>
28
 
 
29
 
#include "checkfuncs.h"
30
 
 
31
 
#ifdef HAVE_LIBX11
32
 
 
33
 
#include <X11/Xlib.h>
34
 
#include <X11/Xutil.h>
35
 
 
36
 
#else
37
 
 
38
 
#include "ParseGeom.h"
39
 
typedef unsigned long Window;
40
 
 
41
 
#endif /* HAVE_LIBX11 */
42
 
 
43
 
#include "keywords.h"
44
 
 
45
 
class Options 
46
 
{
47
 
 public:
48
 
    string          background;
49
 
    int             blend;
50
 
    body_name       body;
51
 
    bool            center;
52
 
    int             centx;
53
 
    int             centy;
54
 
    string          cloud;
55
 
    double          cloud_gamma;
56
 
    bool            cloud_shade;
57
 
    int             cloud_threshold;
58
 
    string          color;
59
 
    string          day;
60
 
    int             debug;
61
 
    double          dellat;
62
 
    double          dellon;
63
 
    string          dem;
64
 
    double          demscale;
65
 
    int             display;
66
 
    string          font;
67
 
    list<string>    fontdir;
68
 
    int             fontsize;
69
 
    int             fullscreen;
70
 
    int             fuzz;
71
 
    bool            gmtlabel;
72
 
    list<string>    greatarcfile;
73
 
    int             grid1;
74
 
    int             grid2;
75
 
    bool            label;
76
 
    string          label_format;
77
 
    int             label_mask;
78
 
    bool            label_name;
79
 
    bool            label_rot;
80
 
    int             label_x;
81
 
    int             label_y;
82
 
    double          localtime;
83
 
    bool            mapbounds;
84
 
    double          map_ulx, map_uly, map_lrx, map_lry;
85
 
    list<string>    mapdir;
86
 
    string          markerbounds;
87
 
    list<string>    markerfile;
88
 
    bool            markers;
89
 
    bool            print_coords;
90
 
    int             projection;
91
 
    string          night;
92
 
    int             north;
93
 
    string          output;
94
 
    int             position;
95
 
    int             quality;
96
 
    double          radius;
97
 
    double          range;
98
 
    double          rotate;
99
 
    list<string>    satellitefile;
100
 
    int             sattrackid;
101
 
    double          shade;
102
 
    int             size;
103
 
    double          spacing;
104
 
    string          specular_file;
105
 
    int             ssec;
106
 
    double          starfreq;
107
 
    int             swap;
108
 
    int             terminator;
109
 
    bool            transpng;
110
 
    bool            truetype;
111
 
    struct timeval  time;
112
 
    string          title;
113
 
    int             trans;
114
 
    bool            vroot;
115
 
    unsigned int    window_width;
116
 
    unsigned int    window_height;
117
 
    int             window_x;
118
 
    int             window_y;
119
 
    int             window_mask;
120
 
    Window          XID;
121
 
 
122
 
    Options();
123
 
    void processArgs(int argc, char **argv, int &glutargc, char **glutargv);
124
 
 
125
 
    double getObsLat() { return(obslat); }
126
 
    void setObsLat(const double lat) { obslat = lat; }
127
 
    double getObsLon() { return(obslon); }
128
 
    void setObsLon(const double lon) { obslon = lon; }
129
 
 
130
 
    void setBody();
131
 
    void setPosition();
132
 
 
133
 
 private:
134
 
    void show_help();
135
 
 
136
 
    double          obslat, obslon;
137
 
}; 
138
 
 
139
 
const char* const body_string[RANDOMBODY] = {"mercury", "venus", "earth",
140
 
                                             "moon", "mars", "jupiter", 
141
 
                                             "io", "europa", "ganymede",
142
 
                                             "callisto", "saturn", "titan",
143
 
                                             "uranus", "neptune", "pluto"};
144
 
extern Options opts;
145
 
 
146
 
#endif