grass  7.8.6
About: GRASS (Geographic Resources Analysis Support System) is a raster- and vector-based GIS, image processing system, graphics production system and spatial modeling system.
  Fossies Dox: grass-7.8.6.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

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

Variables

static geosurfRefsurf = NULL
 
static typbuffRefbuff = NULL
 
static float Refscale = 1.0
 

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, Refbuff, and Refscale.

Referenced by gs_get_att_typbuff(), gsd_surf_const(), 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, Refbuff, and Refsurf.

Referenced by gs_get_att_typbuff(), GS_get_SDsurf(), gsd_surf_const(), 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.

References Refscale.

Referenced by GS_get_SDscale().

◆ gsdiff_set_SDref()

void gsdiff_set_SDref ( geosurf gsref)

ADD.

Parameters
gsref

Definition at line 64 of file gsdiff.c.

References ATT_TOPO, gs_get_att_typbuff(), Refbuff, and Refsurf.

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.

References Refscale, and scale().

Referenced by GS_set_SDscale().

Variable Documentation

◆ Refbuff

typbuff* Refbuff = NULL
static

Definition at line 34 of file gsdiff.c.

Referenced by gsdiff_do_SD(), gsdiff_get_SDref(), and gsdiff_set_SDref().

◆ Refscale

float Refscale = 1.0
static

Definition at line 35 of file gsdiff.c.

Referenced by gsdiff_do_SD(), gsdiff_get_SDscale(), and gsdiff_set_SDscale().

◆ Refsurf

geosurf* Refsurf = NULL
static

Definition at line 33 of file gsdiff.c.

Referenced by gsdiff_get_SDref(), and gsdiff_set_SDref().