22 #include <grass/gstypes.h>
32 static float _cur_size_;
46 float size, z,
y, x, z_scale, z_offset;
47 int marker,
color, i, ii, iii;
48 int use_attr, has_drawn;
52 _cur_size_ = gp->size;
59 for (i = 0; i < GPT_MAX_ATTR; i++) {
65 if (gp->use_attr[i] & ST_ATT_COLOR) {
67 color = gpt->color[i];
70 if (gp->use_attr[i] & ST_ATT_MARKER) {
72 marker = gpt->marker[i];
75 if (gp->use_attr[i] & ST_ATT_SIZE) {
77 size = gpt->size[i] * gp->size;
78 if (gp->marker == ST_HISTOGRAM)
83 if (gpt->highlight_color)
84 color = gpt->highlight_color_value;
85 if (gpt->highlight_marker)
86 marker = gpt->highlight_marker_value;
87 if (gpt->highlight_size)
88 size *= gpt->highlight_size_value;
114 site[
X] += ii * 2.2 * gp->size;
115 site[
Y] += (i - ii) * 2.2 * gp->size;
118 site[
X] += (ii - (i - iii)) * 2.2 * gp->size;
119 site[
Y] += ii * 2.2 * gp->size;
123 gpd_obj(gs, color, size, marker, site);
136 site[Z] += z_offset / z_scale;
138 gpd_obj(gs, color, size, marker, site);
148 gpd_obj(gs, color, size, marker, site);
169 float top, bottom, left, right;
184 return (pt[
X] >= left && pt[
X] <= right &&
185 pt[
Y] >= bottom && pt[
Y] <= top);
323 gsd_x(gs, lpt, color, size);
351 float site[3], konst;
353 int src, check, marker,
color;
356 GLdouble modelMatrix[16], projMatrix[16];
370 if (src == CONST_ATT) {
371 konst = gs->att[ATT_TOPO].constant;
393 for (gpt = gp->points; gpt; gpt = gpt->next) {
403 site[
X] = gpt->p3[
X] + gp->x_trans - gs->ox;
404 site[
Y] = gpt->p3[
Y] + gp->y_trans - gs->oy;
411 if (gp->attr_mode & ST_ATT_COLOR) {
415 if (src == MAP_ATT) {
418 site[Z] += gp->z_trans;
421 (site, window, viewport, modelMatrix, projMatrix))
428 else if (src == CONST_ATT) {
430 site[Z] = konst + gp->z_trans;
432 (site, window, viewport, modelMatrix, projMatrix))
458 int gpd_3dsite(geosite * gp,
float xo,
float yo,
int do_fast)
462 int check,
color, marker;
464 GLdouble modelMatrix[16], projMatrix[16];
488 for (gpt = gp->points; gpt; gpt = gpt->next) {
498 site[
X] = gpt->p3[
X] + gp->x_trans - xo;
499 site[
Y] = gpt->p3[
Y] + gp->y_trans - yo;
502 site[Z] = gpt->p3[Z] + gp->z_trans;
506 if (gp->attr_mode & ST_ATT_COLOR) {
510 if (
gsd_checkpoint(site, window, viewport, modelMatrix, projMatrix))