|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-f6f2c534ea
|
OGSF library - loading and manipulating surfaces. More...
#include <stdlib.h>#include <grass/gis.h>#include <grass/glocale.h>#include <grass/ogsf.h>#include "gsget.h"#include "rowcol.h"
Go to the source code of this file.
Macros | |
| #define | DEBUG_ARROW (0) |
| #define | SET_SCOLOR(sf) |
| MACROS for use in gsd_ortho_wall ONLY !!! | |
Functions | |
| int | gsd_surf (geosurf *surf) |
| ADD. | |
| int | gsd_surf_map_old (geosurf *surf) |
| ADD. | |
| int | gsd_surf_const (geosurf *surf, float k) |
| Using tmesh - not confident with qstrips portability. | |
| int | gsd_surf_func (geosurf *gs, int(*user_func)(void)) |
| Define user function. | |
| int | gsd_triangulated_wall (int npts1, int npts2, geosurf *surf1, geosurf *surf2, Point3 *points1, Point3 *points2, float *norm) |
| ADD. | |
| void | gsd_setfc (int mode) |
| ADD. | |
| int | gsd_getfc (void) |
| ADD. | |
| int | gsd_ortho_wall (int np, int ns, geosurf **gsurfs, Point3 **points, float *norm) |
| ADD. | |
| int | gsd_wall (float *bgn, float *end, float *norm) |
| ADD. | |
| int | gsd_norm_arrows (geosurf *surf) |
| ADD. | |
| int | gsd_surf_map (geosurf *surf) |
| Draw surface using triangle fan instead of strip. | |
OGSF library - loading and manipulating surfaces.
GRASS OpenGL gsurf OGSF Library
(C) 1999-2008 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file gsd_surf.c.
| #define DEBUG_ARROW (0) |
Definition at line 42 of file gsd_surf.c.
MACROS for use in gsd_ortho_wall ONLY !!!
Definition at line 47 of file gsd_surf.c.
ADD.
Definition at line 1217 of file gsd_surf.c.
Referenced by GS_get_fencecolor(), and GS_transp_is_set().
ADD.
Need to do Zexag scale of normal for arrow direction, drawing routine unexags z for arrow
| surf | surface (geosurf) |
Definition at line 1805 of file gsd_surf.c.
References ATT_COLOR, ATT_TOPO, BM_get(), CM_COLOR, CM_DIFFUSE, CONST_ATT, DEBUG_ARROW, FNORM, G_debug(), GET_MAPATT, GS_check_cancel(), gs_get_att_typbuff(), GS_get_scale(), GS_global_exag(), gs_mapcolor(), gs_update_curmask(), gsd_3darrow(), gsd_arrow(), gsd_colormode(), gsd_do_scale(), gsd_popmatrix(), gsd_pushmatrix(), gsd_translate(), MAP_ATT, VCOLS, VROWS, X, Y, and Z.
Referenced by gsd_surf().
ADD.
| np | |
| ns | |
| gsurfs | |
| points | |
| norm |
Definition at line 1323 of file gsd_surf.c.
References ATT_COLOR, CM_COLOR, CM_DIFFUSE, CONST_ATT, FC_ABOVE, FC_BELOW, FC_GREY, G_debug(), GS_check_cancel(), gs_get_att_typbuff(), GS_set_draw(), gsd_bgntmesh(), gsd_blend(), GSD_BOTH, gsd_colormode(), gsd_do_scale(), gsd_endtmesh(), gsd_litvert_func(), gsd_popmatrix(), gsd_pushmatrix(), gsd_zwritemask(), MAP_ATT, MAX_SURFS, segs_intersect(), SET_SCOLOR, X, Y, and Z.
Referenced by gsd_wall().
ADD.
| surf | surface (geosurf) |
Definition at line 80 of file gsd_surf.c.
References ATT_TOPO, CONST_ATT, FUNC_ATT, G_debug(), gs_calc_normals(), gs_get_att_src(), gsd_norm_arrows(), gsd_surf_const(), gsd_surf_func(), gsd_surf_map(), MAP_ATT, and NOTSET_ATT.
Referenced by GS_draw_surf().
Using tmesh - not confident with qstrips portability.
| surf | surface (geosurf) |
| k |
Definition at line 729 of file gsd_surf.c.
References ATT_COLOR, ATT_TRANSP, BM_get(), CM_DIFFUSE, CONST_ATT, G_debug(), GS_check_cancel(), gs_get_att_typbuff(), GS_get_scale(), gs_mapcolor(), gs_update_curmask(), gsd_bgnpolygon(), gsd_bgntmesh(), gsd_blend(), gsd_checkpoint(), gsd_colormode(), gsd_do_scale(), gsd_endpolygon(), gsd_endtmesh(), gsd_getwindow(), gsd_litvert_func(), gsd_popmatrix(), gsd_pushmatrix(), gsd_translate(), gsd_zwritemask(), gsdiff_do_SD(), gsdiff_get_SDref(), MAP_ATT, NULL, VCOLS, VROWS, X, Y, and Z.
Referenced by gsd_coarse_surf_map(), gsd_surf(), gsd_surf_map(), and gsd_surf_map_old().
Define user function.
Not yet supported
| gs | surface (geosurf) [unused] |
| user_func | user function [unused] |
Definition at line 1090 of file gsd_surf.c.
Referenced by gsd_surf().
Draw surface using triangle fan instead of strip.
Optimized by getting rid of BM_get mask check - GET_MAPPATT does same and returns zero if masked
Only do in window check on Fan center(v0) to further optimize – this runs the risk of trimming points in view !!
| surf | surface (geosurf) |
Definition at line 2061 of file gsd_surf.c.
References ATT_COLOR, ATT_EMIT, ATT_SHINE, ATT_TOPO, ATT_TRANSP, CM_DIFFUSE, CONST_ATT, FNORM, GET_MAPATT, GS_check_cancel(), gs_get_att_typbuff(), GS_get_scale(), GS_global_exag(), gs_mapcolor(), gs_update_curmask(), gsd_bgntfan(), gsd_blend(), gsd_checkpoint(), gsd_colormode(), gsd_do_scale(), gsd_endtfan(), gsd_getwindow(), gsd_litvert_func(), gsd_popmatrix(), gsd_pushmatrix(), gsd_set_material(), gsd_surf_const(), gsd_translate(), gsd_zwritemask(), MAP_ATT, SCALE_ATT, VCOLS, VROWS, X, Y, and Z.
Referenced by gsd_surf().
ADD.
Using tmesh - not confident with qstrips portability
| surf | surface (geosurf) |
Definition at line 139 of file gsd_surf.c.
References ATT_COLOR, ATT_EMIT, ATT_SHINE, ATT_TOPO, ATT_TRANSP, BM_get(), CM_DIFFUSE, CONST_ATT, FNORM, G_debug(), GET_MAPATT, GS_check_cancel(), gs_get_att_typbuff(), GS_get_scale(), GS_global_exag(), gs_mapcolor(), gs_update_curmask(), GS_v3cross(), GS_v3eq(), GS_v3mag(), GS_v3sub(), gsd_bgntmesh(), gsd_blend(), gsd_checkpoint(), gsd_colormode(), gsd_do_scale(), gsd_endtmesh(), gsd_getwindow(), gsd_litvert_func(), gsd_popmatrix(), gsd_pushmatrix(), gsd_set_material(), gsd_surf_const(), gsd_translate(), gsd_zwritemask(), MAP_ATT, SCALE_ATT, show_colormode(), VCOLS, VROWS, X, Y, and Z.
| int gsd_triangulated_wall | ( | int | npts1, |
| int | npts2, | ||
| geosurf * | surf1, | ||
| geosurf * | surf2, | ||
| Point3 * | points1, | ||
| Point3 * | points2, | ||
| float * | norm | ||
| ) |
ADD.
| npts1 | |
| npts2 | |
| surf1 | first surface (geosurf) |
| surf2 | second surface (geosurf) |
| points1 | |
| points2 | |
| norm |
Definition at line 1109 of file gsd_surf.c.
References ATT_COLOR, CM_DIFFUSE, CONST_ATT, gs_get_att_typbuff(), gs_mapcolor(), gsd_bgntmesh(), gsd_colormode(), gsd_do_scale(), gsd_endtmesh(), gsd_litvert_func(), gsd_popmatrix(), gsd_pushmatrix(), MAP_ATT, X, XY2OFF, Y, and Z.
ADD.
bgn,end should already be in world modeling coords, but have to be reverse-translated to apply to each surface
| bgn,end | 2d line for cutting plane |
| norm | indicates which way wall faces |
Definition at line 1710 of file gsd_surf.c.
References _, err(), FC_OFF, G_calloc, G_free(), G_warning(), gs_getall_surfaces(), GS_v3eq(), gsd_ortho_wall(), gsdrape_get_allsegments(), MAX_SURFS, X, Y, and Z.
Referenced by gsd_draw_cplane_fence().