GRASS Programmer's Manual  6.4.2(2012)
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
g3dwindow.c File Reference
#include <stdio.h>
#include <grass/gis.h>
#include <grass/G3d.h>
#include "G3d_intern.h"
Include dependency graph for g3dwindow.c:

Go to the source code of this file.

Functions

void G3d_setWindowMap (G3D_Map *map, G3D_Region *window)
 Sets the window for map to window. Can be used multiple times for the same map.
void G3d_setWindow (G3D_Region *window)
 Sets the default window used for every map opened later in the program. Can be used multiple times in the same program.
void G3d_getWindow (G3D_Region *window)
 Stores the current default window in window.
G3D_Region * G3d_windowPtr ()
void G3d_getValue (G3D_Map *map, int x, int y, int z, void *value, int type)
 Returns in *value the cell-value of the cell with window-coordinate (x, y, z). The value returned is of type. This function invokes a fatal error if an error occurs.
float G3d_getFloat (G3D_Map *map, int x, int y, int z)
 Is equivalent to G3d_getValue (map, x, y, z, &value, FCELL_TYPE); return value.
double G3d_getDouble (G3D_Map *map, int x, int y, int z)
 Is equivalent to G3d_getValue (map, x, y, z, &value, DCELL_TYPE); return value.

Variables

G3D_Region g3d_window

Function Documentation

double G3d_getDouble ( G3D_Map *  map,
int  x,
int  y,
int  z 
)

Is equivalent to G3d_getValue (map, x, y, z, &value, DCELL_TYPE); return value.

Parameters:
map
x
y
z
Returns:
double

Definition at line 205 of file g3dwindow.c.

References G3d_getValue().

Referenced by read_g3d_slice(), read_g3d_value(), and read_g3d_vol().

float G3d_getFloat ( G3D_Map *  map,
int  x,
int  y,
int  z 
)

Is equivalent to G3d_getValue (map, x, y, z, &value, FCELL_TYPE); return value.

Parameters:
map
x
y
z
Returns:
float

Definition at line 181 of file g3dwindow.c.

References G3d_getValue().

Referenced by read_g3d_slice(), read_g3d_value(), and read_g3d_vol().

void G3d_getValue ( G3D_Map *  map,
int  x,
int  y,
int  z,
void *  value,
int  type 
)

Returns in *value the cell-value of the cell with window-coordinate (x, y, z). The value returned is of type. This function invokes a fatal error if an error occurs.

Parameters:
map
x
y
z
value
type
Returns:
void

Definition at line 92 of file g3dwindow.c.

References G3d_setNullValue().

Referenced by G3d_getDouble(), G3d_getFloat(), and N_read_rast3d_to_array_3d().

void G3d_getWindow ( G3D_Region *  window)

Stores the current default window in window.

Parameters:
window
Returns:
void

Definition at line 61 of file g3dwindow.c.

References G3d_regionCopy(), and g3d_window.

Referenced by GVL_libinit(), N_read_rast3d_to_array_3d(), and N_write_array_3d_to_rast3d().

void G3d_setWindow ( G3D_Region *  window)

Sets the default window used for every map opened later in the program. Can be used multiple times in the same program.

Parameters:
window
Returns:
void

Definition at line 43 of file g3dwindow.c.

References G3d_adjustRegion(), G3d_regionCopy(), and g3d_window.

Referenced by G3d_initDefaults().

void G3d_setWindowMap ( G3D_Map *  map,
G3D_Region *  window 
)

Sets the window for map to window. Can be used multiple times for the same map.

Parameters:
map
window
Returns:
void

Definition at line 24 of file g3dwindow.c.

References G3d_adjustRegion(), and G3d_regionCopy().

Referenced by G3d_maskOpenOld().

G3D_Region* G3d_windowPtr ( )

Definition at line 68 of file g3dwindow.c.

References g3d_window.

Referenced by G3d_openCellOld().


Variable Documentation

G3D_Region g3d_window

Definition at line 8 of file g3dwindow.c.

Referenced by G3d_getWindow(), G3d_setWindow(), and G3d_windowPtr().