42 float top, bottom, left, right;
58 return (bgn[
X] >= left && bgn[
X] <= right && end[
X] >= left &&
59 end[
X] <= right && 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++) {
166 if (gln->
dims == 3) {
183 for (i = 0, j = 0; i < npts; i++) {
222 G_debug(5,
"gvd_vect(): 3D vector line");
226 for (k = 0; k < gln->
npts; k++) {
231 points[0][
Z] = (float)(gln->
p3[k][
Z] + gv->
z_trans);
242 if (gln->
dims == 3) {
243 G_debug(5,
"gvd_vect(): draw 3D polygon");
246 if (gln->
npts >= 3) {
248 glEnable(GL_NORMALIZE);
250 glEnable(GL_COLOR_MATERIAL);
251 glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
253 glEnable(GL_LIGHTING);
254 glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_TRUE);
256 glShadeModel(GL_FLAT);
258 glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
261 glColor3f(1.0, 0, 0);
263 glNormal3fv(gln->
norm);
265 for (k = 0; k < gln->
npts; k++) {
270 points[0][
Z] = (float)(gln->
p3[k][
Z] + gv->
z_trans);
271 glVertex3fv(points[0]);
274 glLightModeli(GL_LIGHT_MODEL_TWO_SIDE, GL_FALSE);
308 for (i = 0, j = 0; i < npts; i++) {
void G_free(void *)
Free allocated memory.
int G_debug(int, const char *,...) __attribute__((format(printf
int gs_point_is_masked(geosurf *, float *)
Check if point is masked.
int gv_decimate_lines(geovect *)
Decimate line.
void gsd_pushmatrix(void)
Push the current matrix stack.
void gsd_do_scale(int)
Set current scale.
int gs_get_zrange(float *, float *)
Get z-range.
int gs_get_att_src(geosurf *, int)
Get attribute source.
int gs_update_curmask(geosurf *)
Update current maps.
void gsd_color_func(unsigned int)
Set current color.
Point3 * gsdrape_get_segments(geosurf *, float *, float *, int *)
ADD.
void gsd_translate(float, float, float)
Multiply the current matrix by a translation matrix.
void gsd_popmatrix(void)
Pop the current matrix stack.
void gsd_linewidth(short)
Set width of rasterized lines.
void gsd_endline(void)
End line.
void gsd_colormode(int)
Set color mode.
void GS_get_scale(float *, float *, float *, int)
Get axis scale.
void gsd_bgnline(void)
Begin line.
void gsd_vert_func(float *)
ADD.
int GS_check_cancel(void)
Check for cancel.
void gvd_draw_lineonsurf(geosurf *gs, float *bgn, float *end, int color)
Draw line on surface.
int gvd_vect(geovect *gv, geosurf *gs, int do_fast)
Draw vector set.
int gs_clip_segment(geosurf *gs, float *bgn, float *end, float *region)
Clip segment.
gvstyle_thematic * tstyle