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))
int gpd_3dsite(geosite *gp, float xo, float yo, int do_fast)
ADD.
int gs_point_is_masked(geosurf *gs, float *pt)
Check if point is masked.
void gsd_do_scale(int doexag)
Set current scale.
void gsd_sphere(float *center, float siz)
ADD.
void gsd_draw_box(float *center, unsigned long colr, float siz)
Draw box.
void gpd_obj(geosurf *gs, int color, float size, int marker, Point3 pt)
ADD.
int gpd_2dsite(geosite *gp, geosurf *gs, int do_fast)
ADD.
int viewcell_tri_interp(geosurf *gs, typbuff *buf, Point3 pt, int check_mask)
ADD.
void gsd_colormode(int cm)
Set color mode.
int GS_check_cancel(void)
Check for cancel.
void gsd_color_func(unsigned int col)
Set current color.
void gsd_translate(float dx, float dy, float dz)
Multiply the current matrix by a translation matrix.
void gsd_x(geosurf *gs, float *center, int colr, float siz)
ADD.
void gsd_pushmatrix(void)
Push the current matrix stack.
void gsd_cube(float *center, unsigned long colr, float siz)
Draw cube.
void gsd_diamond(float *center, unsigned long colr, float siz)
Draw diamond symbol.
typbuff * gs_get_att_typbuff(geosurf *gs, int desc, int to_write)
Get attribute data buffer.
int gsd_checkpoint(float pt[4], int window[4], int viewport[4], double modelMatrix[16], double projMatrix[16])
ADD.
void gsd_getwindow(int *window, int *viewport, double *modelMatrix, double *projMatrix)
Get viewport.
int gs_point_in_region(geosurf *gs, float *pt, float *region)
Check if point is in region.
void gsd_draw_asterisk(float *center, unsigned long colr, float siz)
Draw asterisk.
char buf[GNAME_MAX+sizeof(G3D_DIRECTORY)+2]
void GS_v3eq(float *v1, float *v2)
Copy vector values.
int gs_get_att_src(geosurf *gs, int desc)
Get attribute source.
void gsd_linewidth(short n)
Set width of rasterized lines.
void gsd_popmatrix(void)
Pop the current matrix stack.
void gsd_box(float *center, int colr, float *siz)
Draw box.
void gsd_draw_gyro(float *center, unsigned long colr, float siz)
Draw gyro.
void gsd_scale(float xs, float ys, float zs)
Multiply the current matrix by a general scaling matrix.
float GS_global_exag(void)
Get global z-exag value.
int gpd_obj_site_attr(geosurf *gs, geosite *gp, geopoint *gpt, Point3 site)
Substitutes gpd_obj()
int gs_update_curmask(geosurf *surf)
Update current maps.