22 #if defined(OPENGL_X11) || defined(OPENGL_WINDOWS)
26 #include <OpenGL/gl.h>
31 #define GS_UNIT_SIZE 1000.
33 #define BETWEEN(x, a, b) (((x) > (a) && (x) < (b)) || ((x) > (b) && (x) < (a)))
34 #define GS_NEAR_EQUAL(x, y, ratio) \
36 ((x) == 0.0 ? GS_BETWEEN((x), (y) + (y) * (ratio), (y) - (y) * (ratio)) \
37 : GS_BETWEEN((y), (x) + (x) * (ratio), (x) - (x) * (ratio))))
48 #define MAX_ISOSURFS 12
52 #define MAX_VOL_SLICES 4
53 #define MAX_VOL_FILES 100
56 #define DM_GOURAUD 0x00000100
57 #define DM_FLAT 0x00000200
59 #define DM_FRINGE 0x00000010
61 #define DM_WIRE 0x00000001
62 #define DM_COL_WIRE 0x00000002
63 #define DM_POLY 0x00000004
64 #define DM_WIRE_POLY 0x00000008
66 #define DM_GRID_WIRE 0x00000400
67 #define DM_GRID_SURF 0x00000800
69 #define WC_COLOR_ATT 0xFF000000
71 #define IFLAG unsigned int
81 #define LEGAL_ATT(a) (a >= 0 && a < MAX_ATTS)
88 #define LEGAL_SRC(s) \
89 (s == NOTSET_ATT || s == MAP_ATT || s == CONST_ATT || s == FUNC_ATT)
101 #define ST_HISTOGRAM 10
116 #define LT_DISCRETE 0x00000100
117 #define LT_CONTINUOUS 0x00000200
119 #define LT_LIST 0x00000010
122 #define LT_RANGE_LOWSET 0x00000001
123 #define LT_RANGE_HISET 0x00000002
124 #define LT_RANGE_LOW_HI 0x00000003
125 #define LT_INVERTED 0x00000008
127 #define LT_SHOW_VALS 0x00001000
128 #define LT_SHOW_LABELS 0x00002000
131 #define VOL_FTYPE_RASTER3D 0
134 #define VOL_DTYPE_FLOAT 0
135 #define VOL_DTYPE_DOUBLE 1
149 #define CM_EMISSION 1
152 #define CM_SPECULAR 4
156 #define CM_WIRE CM_COLOR
158 #define NULL_COLOR 0xFFFFFF
161 #define GS_CHAR8 char
162 #define GS_SHORT16 short
173 #define LEGAL_TYPE(t) \
174 (t == ATTY_MASK || t == ATTY_FLOAT || t == ATTY_INT || t == ATTY_SHORT || \
179 #define FUDGE(gs) ((gs->zmax_nz - gs->zmin_nz) / 500.)
180 #define DOT3(a, b) ((a)[X] * (b)[X] + (a)[Y] * (b)[Y] + (a)[Z] * (b)[Z])
183 #define CF_NOT_CHANGED 0x000000
184 #define CF_COLOR_PACKED 0x000001
185 #define CF_USR_CHANGED 0x000010
186 #define CF_CHARSCALED 0x000100
190 #define MASK_TL 0x10000000
191 #define MASK_TR 0x01000000
192 #define MASK_BR 0x00100000
193 #define MASK_BL 0x00010000
194 #define MASK_NPTS 0x00000007
198 #define OGSF_POLYGON 3
200 #define RED_MASK 0x000000FF
201 #define GRN_MASK 0x0000FF00
202 #define BLU_MASK 0x00FF0000
215 float (*tfunc)(float, int);
257 int (*user_func)(void);
476 int (*user_func)(void);
493 float x1, x2, y1, y2, z1, z2;
570 int twist,
fov, incl, look;
573 float real_to[4], vert_exag;
592 #define KF_FROMX_MASK 0x00000001
593 #define KF_FROMY_MASK 0x00000002
594 #define KF_FROMZ_MASK 0x00000004
595 #define KF_FROM_MASK 0x00000007
597 #define KF_DIRX_MASK 0x00000008
598 #define KF_DIRY_MASK 0x00000010
599 #define KF_DIRZ_MASK 0x00000020
600 #define KF_DIR_MASK 0x00000038
602 #define KF_FOV_MASK 0x00000040
603 #define KF_TWIST_MASK 0x00000080
605 #define KF_ALL_MASK 0x000000FF
607 #define KF_NUMFIELDS 8
609 #define KF_LINEAR 111
610 #define KF_SPLINE 222
611 #define KF_LEGAL_MODE(m) (m == KF_LINEAR || m == KF_SPLINE)
622 #define FM_VECT 0x00000001
623 #define FM_SITE 0x00000002
624 #define FM_PATH 0x00000004
625 #define FM_VOL 0x00000008
626 #define FM_LABEL 0x00000010
struct g_line geoline
Line instance.
struct g_vect geovect
Vector map (lines)
struct view_node Viewnode
struct g_point geopoint
Point instance.
struct g_site geosite
Vector map (points)
struct g_vect_style_thematic gvstyle_thematic
Struct for vector map (thematic mapping)
struct g_vect_style gvstyle
Struct for vector feature displaying attributes.
signed char highlighted
>0 Feature is highlighted.
gvstyle * style
Line instance look&feel.
struct line_cats * cats
Store information about all layers/cats for thematic display.
struct line_cats * cats
Store information about all layers/cats for thematic display.
signed char highlighted
>0 Feature is highlighted
int(*)(*)(*) nxt_site(void)
gvstyle_thematic * tstyle
thematic mapping
gvstyle * style
points default look&feel
double ox
real world origin (i.e., SW corner)
unsigned int draw_mode
DM_GOURAUD | DM_FRINGE | DM_POLY, DM_WIRE, DM_WIRE_POLY.
long wire_color
0xBBGGRR or WC_COLOR_ATT
gsurf_att att[7]
mask, topo, color, etc.
int x_mod
cells per viewcell, per wire viewcell
Struct for vector map (thematic mapping)
Struct for vector feature displaying attributes.
struct g_vect_style * next
Point to next gvstyle struct if single point has multiple styles.
int symbol
Point symbol/line type.
gvstyle_thematic * tstyle
thematic mapping
gvstyle * style
Vector default look&feel.
int(*)(*)(*) nxt_line(void)
geovol_isosurf * isosurf[12]
unsigned int slice_draw_mode
unsigned int isosurf_draw_mode
double rot_angle
rotation angle
GLdouble rotMatrix[16]
rotation matrix
double rot_axes[3]
rotation axis
int view_proj
perspective, ortho
int coord_sys
latlon, equal area, etc
int infocus
fixed center of view - true or false
unsigned int mode
current read mode
char * file_name
file name
void * map
pointer to volume file descriptor
unsigned int file_type
file type
unsigned int count
number of referencies to this file
unsigned int status
current status
int hdata
handle to dataset
unsigned int att_type
ATTY_INT, ATTY_SHORT, ATTY_CHAR, or ATTY_FLOAT.
unsigned int att_src
NOTSET_ATT, MAP_ATT, CONST_ATT, FUNC_ATT.
float emission[3]
R, G, B.
float position[4]
X, Y, Z, (1=local/0=inf)
int n_elem
if n_elem == 256, index == NULL