Loading...
Searching...
No Matches
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)
#define | BM_GET_BYOFFSET(bm, off)
#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

## BM_GET_BYOFFSET

#define BM_GET_BYOFFSET | ( |  | bm,
|  |  | off )

Value:
(bm ? BM_get(bm, (off % bm->cols), (off / bm->cols)) : 0)
BM_get
int BM_get(struct BM *map, int x, int y)
Gets 'val' from the bitmap.
Definition bitmap.c:213

Definition at line 31 of file gsget.h.

## FNORM

#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
NXMASK
#define NXMASK
Definition gsget.h:37
NZMASK
#define NZMASK
Definition gsget.h:39
ZMAXPOS
#define ZMAXPOS
Definition gsget.h:35
XYMAXPOS
#define XYMAXPOS
Definition gsget.h:34
NYMASK
#define NYMASK
Definition gsget.h:38
X
#define X(j)
Y
#define Y(j)

Definition at line 51 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().

## GET_MAPATT

#define GET_MAPATT | ( |  | buff,
|  |  | offset,
|  |  | att )

Value:
(get_mapatt(buff, offset, &(att)))
get_mapatt
int get_mapatt(typbuff *buff, int offset, float *att)
Get map attributes.
Definition gsget.c:31

Definition at line 29 of file gsget.h.

Referenced by calc_norm(), get_diag_intersects(), get_horz_intersects(), get_vert_intersects(), GS_get_cat_at_xy(), GS_get_val_at_xy(), gsbm_make_mask(), gsd_coarse_surf_map(), gsd_fringe_horiz_line(), gsd_fringe_horiz_line2(), gsd_fringe_horiz_poly(), gsd_fringe_vert_line(), gsd_fringe_vert_poly(), gsd_norm_arrows(), gsd_surf_map(), gsd_surf_map_old(), gsd_wire_arrows(), gsd_wire_surf_map(), gsdiff_do_SD(), and viewcell_tri_interp().

## GET_MAPATT1

#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)

Definition at line 6 of file gsget.h.

## GET_MAPATT2

#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);

Definition at line 13 of file gsget.h.

## NXMASK

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

Definition at line 37 of file gsget.h.

## NYMASK

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

Definition at line 38 of file gsget.h.

## NZMASK

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

Definition at line 39 of file gsget.h.

## NZUP

#define NZUP 0x000003ff

Definition at line 41 of file gsget.h.

## PNORM

#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)

Definition at line 57 of file gsget.h.

## SCALE_ATT

#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 24 of file gsget.h.

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

## XYMAXPOS

#define XYMAXPOS 0x3ff /* 1023 */

Definition at line 34 of file gsget.h.

## ZMAXPOS

#define ZMAXPOS 0x3ff /* 1023 */

Definition at line 35 of file gsget.h.