41 float top, bottom, left, right;
57 return (bgn[
X] >= left && bgn[
X] <= right &&
58 end[
X] >= left && end[
X] <= right &&
59 bgn[
Y] >= bottom && bgn[
Y] <= top &&
60 end[
Y] >= bottom && end[
Y] <= top);
82 float bgn[3], end[3], tx, ty, tz, konst;
83 float zmin, zmax, fudge;
99 fudge = (zmax - zmin) / 500.;
112 bgn[
Z] = end[
Z] = konst;
135 for (; gln; gln = gln->
next) {
164 G_debug(5,
"gvd_vect(): 2D vector line");
165 for (k = 0; k < gln->
npts - 1; k++) {
184 for (i = 0, j = 0; i < npts; i++) {
223 G_debug(5,
"gvd_vect(): 3D vector line");
227 for (k = 0; k < gln->
npts; k++) {
232 points[0][
Z] = (float)(gln->
p3[k][
Z] + gv->
z_trans);
243 if (gln->
dims == 3) {
244 G_debug(5,
"gvd_vect(): draw 3D polygon");
247 if (gln->
npts >= 3) {
249 glEnable(GL_NORMALIZE);
251 glEnable(GL_COLOR_MATERIAL);
252 glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
254 glEnable(GL_LIGHTING);
255 glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
257 glShadeModel(GL_FLAT);
259 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
262 glColor3f(1.0, 0, 0);
264 glNormal3fv(gln->
norm);
266 for (k = 0; k < gln->
npts; k++) {
271 points[0][
Z] = (float)(gln->
p3[k][
Z] + gv->
z_trans);
272 glVertex3fv(points[0]);
275 glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE);
309 for (i = 0, j = 0; i < npts; i++) {
void gvd_draw_lineonsurf(geosurf *gs, float *bgn, float *end, int color)
Draw line on surface.
int gv_decimate_lines(geovect *)
Decimate line.
int gs_get_zrange(float *, float *)
Get z-range.
void gsd_popmatrix(void)
Pop the current matrix stack.
int gs_get_att_src(geosurf *, int)
Get attribute source.
gvstyle_thematic * tstyle
void G_free(void *)
Free allocated memory.
int gs_clip_segment(geosurf *gs, float *bgn, float *end, float *region)
Clip segment.
int gvd_vect(geovect *gv, geosurf *gs, int do_fast)
Draw vector set.
void gsd_colormode(int)
Set color mode.
void gsd_color_func(unsigned int)
Set current color.
int gs_update_curmask(geosurf *)
Update current maps.
void gsd_endline(void)
End line.
void gsd_translate(float, float, float)
Multiply the current matrix by a translation matrix.
int gs_point_is_masked(geosurf *, float *)
Check if point is masked.
void gsd_linewidth(short)
Set width of rasterized lines.
int GS_check_cancel(void)
Check for cancel.
void gsd_pushmatrix(void)
Push the current matrix stack.
Point3 * gsdrape_get_segments(geosurf *, float *, float *, int *)
ADD.
void GS_get_scale(float *, float *, float *, int)
Get axis scale.
void gsd_do_scale(int)
Set current scale.
int G_debug(int, const char *,...) __attribute__((format(printf
void gsd_bgnline(void)
Begin line.
void gsd_vert_func(float *)
ADD.