GRASS GIS 8 Programmer's Manual  8.2.2dev(2023)-3d2c704037
gsdiff.c File Reference

OGSF library - manipulating surfaces (lower level functions) More...

#include <grass/ogsf.h>
#include "gsget.h"
Include dependency graph for gsdiff.c:

Go to the source code of this file.

Functions

void gsdiff_set_SDscale (float scale)
 Set scale. More...
 
float gsdiff_get_SDscale (void)
 Get scale. More...
 
void gsdiff_set_SDref (geosurf *gsref)
 ADD. More...
 
geosurfgsdiff_get_SDref (void)
 ADD. More...
 
float gsdiff_do_SD (float val, int offset)
 ADD. More...
 

Detailed Description

OGSF library - manipulating surfaces (lower level functions)

GRASS OpenGL gsurf OGSF Library

Routines to set up automatic on-the-fly recalculation of surface elevations, doing a "scaled difference" using another surface for reference

Note that we're using a true difference here, between data set values, no translations, etc.

Todo:
generalize this concept to allow transform functions which are dependent on surfaces that are dependent on other surfaces, etc., as long as the dependency doesn't loop back.

(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.

Author
Bill Brown USACERL, GMSL/University of Illinois (November 1994)
Doxygenized by Martin Landa <landa.martin gmail.com> (May 2008)

Definition in file gsdiff.c.

Function Documentation

◆ gsdiff_do_SD()

float gsdiff_do_SD ( float  val,
int  offset 
)

ADD.

Parameters
val
offset
Returns
value

Definition at line 94 of file gsdiff.c.

References GET_MAPATT.

Referenced by gs_get_att_typbuff(), and gsd_wire_surf_const().

◆ gsdiff_get_SDref()

geosurf* gsdiff_get_SDref ( void  )

ADD.

Returns
pointer to geosurf struct

Definition at line 77 of file gsdiff.c.

References NULL.

Referenced by gs_get_att_typbuff(), GS_get_SDsurf(), and gsd_wire_surf_const().

◆ gsdiff_get_SDscale()

float gsdiff_get_SDscale ( void  )

Get scale.

Returns
scale value

Definition at line 54 of file gsdiff.c.

◆ gsdiff_set_SDref()

void gsdiff_set_SDref ( geosurf gsref)

ADD.

Parameters
gsref

Definition at line 64 of file gsdiff.c.

References ATT_TOPO, and gs_get_att_typbuff().

Referenced by GS_set_SDsurf(), and GS_unset_SDsurf().

◆ gsdiff_set_SDscale()

void gsdiff_set_SDscale ( float  scale)

Set scale.

Parameters
scalevalue

Definition at line 42 of file gsdiff.c.