GRASS GIS 7 Programmer's Manual  7.7.svn(2018)-r73574
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
gsget.h File Reference
#include <grass/ogsf.h>
Include dependency graph for gsget.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GET_MAPATT1(buff, offset, att)
 
#define GET_MAPATT2(buff, offset, att)
 
#define SCALE_ATT(att, val, low, high)
 
#define GET_MAPATT(buff, offset, att)   (get_mapatt(buff, offset, &(att)))
 
#define BM_GET_BYOFFSET(bm, off)   (bm? BM_get(bm, (off%bm->cols), (off/bm->cols)): 0)
 
#define XYMAXPOS   0x3ff /* 1023 */
 
#define ZMAXPOS   0x3ff /* 1023 */
 
#define NXMASK   0xffe00000 /* top 11 bits */
 
#define NYMASK   0x1ffc00 /* middle 11 bits of packed int */
 
#define NZMASK   0x3ff /* lowest 10 bits */
 
#define NZUP   0x000003ff
 
#define FNORM(i, nv)
 
#define PNORM(i, nv)
 

Macro Definition Documentation

#define BM_GET_BYOFFSET (   bm,
  off 
)    (bm? BM_get(bm, (off%bm->cols), (off/bm->cols)): 0)

Definition at line 29 of file gsget.h.

#define FNORM (   i,
  nv 
)
Value:
nv[X] = ((int)(((i) & NXMASK) >> 21) - XYMAXPOS)/(float)XYMAXPOS; \
nv[Y] = ((int)(((i) & NYMASK) >> 10) - XYMAXPOS)/(float)XYMAXPOS; \
nv[Z] = (int)((i) & NZMASK) /(float)ZMAXPOS
#define XYMAXPOS
Definition: gsget.h:33
#define NZMASK
Definition: gsget.h:38
#define ZMAXPOS
Definition: gsget.h:34
#define NXMASK
Definition: gsget.h:36
#define Z
Definition: ogsf.h:139
#define Y
Definition: ogsf.h:138
#define NYMASK
Definition: gsget.h:37
#define X
Definition: ogsf.h:137
int
Reads the categories file for map name in mapset and stores the categories in the pcats structure...

Definition at line 50 of file gsget.h.

Referenced by GS_get_norm_at_xy(), gsd_coarse_surf_map(), gsd_norm_arrows(), gsd_surf_map(), gsd_surf_map_old(), and gsd_wire_arrows().

#define GET_MAPATT1 (   buff,
  offset,
  att 
)
Value:
att=(buff->ib? (float)buff->ib[offset]: \
buff->sb? (float)buff->sb[offset]: \
buff->cb? (float)buff->cb[offset]: \
buff->fb? (float)buff->fb[offset]: \
0.0)
char buff[1024]
Definition: raster3d/cats.c:81

Definition at line 6 of file gsget.h.

#define GET_MAPATT2 (   buff,
  offset,
  att 
)
Value:
att=(buff->ib? (float)buff->ib[offset]: \
buff->sb? (float)buff->sb[offset]: \
buff->cb? (float)buff->cb[offset]: \
buff->fb? (float)buff->fb[offset]: \
buff->k); \
if(buff->tfunc) \
att = (buff->tfunc)(att, offset);
if(!YY_CURRENT_BUFFER)
Definition: sqlp.yy.c:803
char buff[1024]
Definition: raster3d/cats.c:81

Definition at line 12 of file gsget.h.

#define NXMASK   0xffe00000 /* top 11 bits */

Definition at line 36 of file gsget.h.

#define NYMASK   0x1ffc00 /* middle 11 bits of packed int */

Definition at line 37 of file gsget.h.

#define NZMASK   0x3ff /* lowest 10 bits */

Definition at line 38 of file gsget.h.

#define NZUP   0x000003ff

Definition at line 40 of file gsget.h.

#define PNORM (   i,
  nv 
)
Value:
i = ((unsigned int)((nv[X]*XYMAXPOS)+XYMAXPOS) << 21) | \
((unsigned int)((nv[Y]*XYMAXPOS)+XYMAXPOS) << 10) | \
(unsigned int)(nv[Z]*ZMAXPOS)
#define XYMAXPOS
Definition: gsget.h:33
#define ZMAXPOS
Definition: gsget.h:34
#define Z
Definition: ogsf.h:139
#define Y
Definition: ogsf.h:138
#define X
Definition: ogsf.h:137
int
Reads the categories file for map name in mapset and stores the categories in the pcats structure...

Definition at line 56 of file gsget.h.

#define SCALE_ATT (   att,
  val,
  low,
  high 
)
Value:
((val) <= att->max_nz && \
(val) >= att->min_nz && att->range_nz? \
(((val) - att->min_nz)/att->range_nz) * \
((high) - (low)) + (low): 0)

Definition at line 22 of file gsget.h.

Referenced by gsd_coarse_surf_map(), gsd_surf_map(), and gsd_surf_map_old().

#define XYMAXPOS   0x3ff /* 1023 */

Definition at line 33 of file gsget.h.

#define ZMAXPOS   0x3ff /* 1023 */

Definition at line 34 of file gsget.h.