GRASS GIS 8 Programmer's Manual
8.5.0dev(2024)-847944e18e
|
Nviz library – Define creation and interface functions for map objects. More...
Go to the source code of this file.
Functions | |
int | Nviz_new_map_obj (int type, const char *name, double value, nv_data *data) |
Create a new map object which can be one of surf, vect, vol or site. More... | |
int | Nviz_set_attr (int id, int type, int desc, int src, const char *str_value, double num_value, nv_data *data) |
void | Nviz_set_surface_attr_default (void) |
Set default surface attributes. More... | |
int | Nviz_set_vpoint_attr_default (int id) |
Set default vector point attributes. More... | |
int | Nviz_set_volume_attr_default (int id) |
Set default volume attributes. More... | |
int | Nviz_unset_attr (int id, int type, int desc) |
Nviz library – Define creation and interface functions for map objects.
Map objects are considered to be surfaces, vector plots, or site files.
Based on visualization/nviz/src/map_obj.c
(C) 2008, 2010 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.
Definition in file map_obj.c.
int Nviz_new_map_obj | ( | int | type, |
const char * | name, | ||
double | value, | ||
nv_data * | data | ||
) |
Create a new map object which can be one of surf, vect, vol or site.
This routine creates the object internally in the gsf libraryb. Optionally, a logical name may be specified for the new map object. If no name is specified, a logical name is assigned to the new object automatically. Note that maintaining unique logical names is not the responsibility of the library (currently).
Initially map objects contain no data, use the attribute commands to set attributes such as topology, color, etc.
type | map object type |
name | map name (NULL for constant) |
value | constant (used if name is NULL) |
data | nviz data |
int Nviz_set_attr | ( | int | id, |
int | type, | ||
int | desc, | ||
int | src, | ||
const char * | str_value, | ||
double | num_value, | ||
nv_data * | data | ||
) |
Set map object attribute
id | map object id |
type | map object type (MAP_OBJ_SURF, MAP_OBJ_VECT, ...) |
desc | attribute descriptor |
src | attribute source |
str_value | attribute value as string (if NULL, check for num_value) |
num_value | attribute value as double |
void Nviz_set_surface_attr_default | ( | void | ) |
Set default surface attributes.
Definition at line 278 of file map_obj.c.
References ATT_COLOR, ATT_EMIT, ATT_MASK, ATT_SHINE, ATT_TOPO, ATT_TRANSP, DEFAULT_SURF_COLOR, GS_set_att_defaults(), and MAX_ATTS.
int Nviz_set_volume_attr_default | ( | int | id | ) |
Set default volume attributes.
id | volume set id |
Definition at line 322 of file map_obj.c.
References DM_GOURAUD, DM_POLY, GVL_get_dims(), GVL_isosurf_set_drawmode(), GVL_isosurf_set_drawres(), GVL_slice_set_drawmode(), GVL_slice_set_drawres(), and max.
int Nviz_set_vpoint_attr_default | ( | int | id | ) |
Set default vector point attributes.
id | vector point set id |
Definition at line 302 of file map_obj.c.
References gp_get_site().