GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
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 !!! More... | |
Functions | |
int | gsd_surf (geosurf *surf) |
ADD. More... | |
int | gsd_surf_map_old (geosurf *surf) |
ADD. More... | |
int | gsd_surf_const (geosurf *surf, float k) |
Using tmesh - not confident with qstrips portability. More... | |
int | gsd_surf_func (geosurf *gs, int(*user_func)()) |
Define user function. More... | |
int | gsd_triangulated_wall (int npts1, int npts2, geosurf *surf1, geosurf *surf2, Point3 *points1, Point3 *points2, float *norm) |
ADD. More... | |
void | gsd_setfc (int mode) |
ADD. More... | |
int | gsd_getfc (void) |
ADD. More... | |
int | gsd_ortho_wall (int np, int ns, geosurf **gsurfs, Point3 **points, float *norm) |
ADD. More... | |
int | gsd_wall (float *bgn, float *end, float *norm) |
ADD. More... | |
int | gsd_norm_arrows (geosurf *surf) |
ADD. More... | |
int | gsd_surf_map (geosurf *surf) |
Draw surface using triangle fan instead of strip. More... | |
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 41 of file gsd_surf.c.
#define SET_SCOLOR | ( | sf | ) |
MACROS for use in gsd_ortho_wall ONLY !!!
Definition at line 46 of file gsd_surf.c.
int gsd_getfc | ( | void | ) |
ADD.
Definition at line 1220 of file gsd_surf.c.
Referenced by GS_get_fencecolor(), and GS_transp_is_set().
int gsd_norm_arrows | ( | geosurf * | surf | ) |
ADD.
Need to do Zexag scale of normal for arrow direction, drawing routine unexags z for arrow
surf | surface (geosurf) |
Definition at line 1810 of file gsd_surf.c.
Referenced by gsd_surf().
void gsd_setfc | ( | int | mode | ) |
int gsd_surf | ( | geosurf * | surf | ) |
ADD.
surf | surface (geosurf) |
Definition at line 81 of file gsd_surf.c.
References g_surf::att, ATT_TOPO, CONST_ATT, gsurf_att::constant, FUNC_ATT, G_debug(), gs_calc_normals(), gs_get_att_src(), gsd_norm_arrows(), gsd_surf_const(), gsd_surf_func(), gsd_surf_map(), g_surf::gsurf_id, MAP_ATT, NOTSET_ATT, and gsurf_att::user_func.
Referenced by GS_draw_surf().
int gsd_surf_const | ( | geosurf * | surf, |
float | k | ||
) |
Using tmesh - not confident with qstrips portability.
surf | surface (geosurf) |
k |
Definition at line 729 of file gsd_surf.c.
Referenced by gsd_surf().
int gsd_surf_func | ( | geosurf * | gs, |
int(*)() | user_func | ||
) |
Define user function.
Not yet supported
gs | surface (geosurf) |
user_func | user function |
Definition at line 1092 of file gsd_surf.c.
Referenced by gsd_surf().
int gsd_surf_map | ( | geosurf * | 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 2062 of file gsd_surf.c.
Referenced by gsd_surf().
int gsd_surf_map_old | ( | geosurf * | surf | ) |
ADD.
Using tmesh - not confident with qstrips portability
surf | surface (geosurf) |
Definition at line 140 of file gsd_surf.c.
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 1111 of file gsd_surf.c.
int gsd_wall | ( | float * | bgn, |
float * | end, | ||
float * | norm | ||
) |
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 1715 of file gsd_surf.c.