18#include <grass/ogsf.h>
41 float top, bottom, left, right;
56 return (pt[
X] >= left && pt[
X] <= right && pt[
Y] >= bottom && pt[
Y] <= top);
70void gpd_obj(geosurf *gs, gvstyle *style, Point3 pt)
79 switch (style->symbol) {
93 gsd_box(lpt, style->color, siz);
181 gsd_cube(lpt, style->color, style->size);
189 gsd_x(gs, lpt, style->color, style->size);
217 float site[4], konst;
221 GLdouble modelMatrix[16], projMatrix[16];
236 if (src == CONST_ATT) {
237 konst = gs->att[ATT_TOPO].constant;
252 for (gpt = gp->points; gpt; gpt = gpt->next) {
262 site[
X] = gpt->p3[
X] + gp->x_trans - gs->ox;
263 site[
Y] = gpt->p3[
Y] + gp->y_trans - gs->oy;
269 if (src == MAP_ATT) {
272 site[Z] += gp->z_trans;
279 else if (src == CONST_ATT) {
281 site[Z] = konst + gp->z_trans;
288 if (gpt->highlighted > 0)
290 else if (gp->tstyle && gp->tstyle->active)
312int gpd_3dsite(geosite *gp,
float xo,
float yo,
int do_fast UNUSED)
317 GLdouble modelMatrix[16], projMatrix[16];
338 for (gpt = gp->points; gpt; gpt = gpt->next) {
348 site[
X] = gpt->p3[
X] + gp->x_trans - xo;
349 site[
Y] = gpt->p3[
Y] + gp->y_trans - yo;
352 site[Z] = gpt->p3[Z] + gp->z_trans;
355 if (
gsd_checkpoint(site, window, viewport, modelMatrix, projMatrix))
360 if (gpt->highlighted > 0)
362 else if (gp->tstyle && gp->tstyle->active)
void gpd_obj(geosurf *gs, gvstyle *style, Point3 pt)
Draw point representing object.
int gpd_2dsite(geosite *gp, geosurf *gs, int do_fast UNUSED)
Draw 2D point set.
int gs_point_in_region(geosurf *gs, float *pt, float *region)
Check if point is in region.
int gpd_3dsite(geosite *gp, float xo, float yo, int do_fast UNUSED)
Draw 3D point set.
float GS_global_exag(void)
Get global z-exag value.
typbuff * gs_get_att_typbuff(geosurf *gs, int desc, int to_write)
Get attribute data buffer.
int gs_point_is_masked(geosurf *gs, float *pt)
Check if point is masked.
int gs_get_att_src(geosurf *gs, int desc)
Get attribute source.
int gs_update_curmask(geosurf *surf)
Update current maps.
void GS_v3eq(float *v1, float *v2)
Copy vector values.
void gsd_diamond(float *center, unsigned long colr, float siz)
Draw diamond symbol.
void gsd_draw_box(float *center, unsigned long colr, float siz)
Draw box.
void gsd_x(geosurf *gs, float *center, int colr, float siz)
Draw X symbol.
void gsd_cube(float *center, unsigned long colr, float siz)
Draw cube.
void gsd_draw_asterisk(float *center, unsigned long colr, float siz)
Draw asterisk.
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_pushmatrix(void)
Push the current matrix stack.
void gsd_colormode(int cm)
Set color mode.
void gsd_sphere(float *center, float siz)
ADD.
void gsd_popmatrix(void)
Pop the current matrix stack.
int gsd_checkpoint(float pt[4], int window[4], int viewport[4], double modelMatrix[16], double projMatrix[16])
ADD.
void gsd_scale(float xs, float ys, float zs)
Multiply the current matrix by a general scaling matrix.
void gsd_translate(float dx, float dy, float dz)
Multiply the current matrix by a translation matrix.
void gsd_getwindow(int *window, int *viewport, double *modelMatrix, double *projMatrix)
Get viewport.
void gsd_color_func(unsigned int col)
Set current color.
void gsd_linewidth(short n)
Set width of rasterized lines.
void gsd_do_scale(int doexag)
Set current scale.
int viewcell_tri_interp(geosurf *gs, typbuff *buf, Point3 pt, int check_mask)
ADD.
int GS_check_cancel(void)
Check for cancel.