sky: grid - fixed grid at low FOV.
[nova.git] / src / sky / render.h
blobb3d85dd9e820e3afebc6a108ae7d474f6e0afb04
1 /*
2 * Copyright (C) 2005 Liam Girdwood
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330,
17 * Boston, MA 02111-1307, USA.
20 #ifndef _RENDER_H
21 #define _RENDER_H
23 #include <glib-2.0/glib.h>
24 #include <cairo.h>
26 /* renderer magnitude bands - non planets, sun or moon */
27 #define RENDER_MAG_BANDS 32
28 #define RENDER_MAX_COORDS 3
31 * Level of sky rendering detail.
33 enum render_detail
35 RT_FAST, /* low type, and fast */
36 RT_FULL, /* high quality type, slower */
40 * Object render_object coordinate
42 struct render_coord {
43 struct ln_equ_posn* posn; /* object true sky position - from db */
44 gdouble x,y,z; /* cairo position - from transform */
45 gdouble object_size; /* object size in pixels - from render_object */
49 * Object render_object flags, determines what aspects of object are
50 * rendered. Note: If type is fast then this is ignored.
52 struct render_flags {
53 guint show_object;
54 guint show_outline;
55 guint show_phase;
56 guint show_label;
57 guint show_mag_flag;
58 guint show_axis_flag;
59 gfloat show_mag_limit;
60 gfloat show_axis_min;
61 gfloat show_axis_max;
62 guint night_mode;
65 struct render_context {
66 gdouble faintest_magnitude;
67 gdouble pixels_per_degree;
68 gdouble position_angle;
69 gdouble JD;
73 * Sky rendering context
75 struct render_object {
76 /* object to be rendered */
77 gpointer object;
79 /* render_object parameters */
80 enum render_detail type;
81 struct render_flags flags;
82 struct render_context context;
84 /* cairo render_object handle */
85 cairo_t* cr;
87 /* object coordinates */
88 struct render_coord coord[RENDER_MAX_COORDS];
91 #endif