GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
OGSF library - loading and manipulating vector sets (higher level functions) More...
#include <stdlib.h>
#include <string.h>
#include <grass/gis.h>
#include <grass/gstypes.h>
#include "gsget.h"
Go to the source code of this file.
Functions | |
int | GV_vect_exists (int id) |
Check if vector set exists. More... | |
int | GV_new_vector (void) |
Register new vector set. More... | |
int | GV_num_vects (void) |
Get number of available vector sets. More... | |
int * | GV_get_vect_list (int *numvects) |
Get list of vector sets. More... | |
int | GV_delete_vector (int id) |
Delete vector set from list. More... | |
int | GV_load_vector (int id, const char *filename) |
Load vector set. More... | |
int | GV_get_vectname (int id, char **filename) |
Get vector map name. More... | |
int | GV_set_vectmode (int id, int mem, int color, int width, int flat) |
Set vector set mode. More... | |
int | GV_get_vectmode (int id, int *mem, int *color, int *width, int *flat) |
Get vector set mode. More... | |
void | GV_set_trans (int id, float xtrans, float ytrans, float ztrans) |
Set trans ? More... | |
int | GV_get_trans (int id, float *xtrans, float *ytrans, float *ztrans) |
Get trans ? More... | |
int | GV_select_surf (int hv, int hs) |
Select surface identified by hs to have vector identified by hv draped over it. More... | |
int | GV_unselect_surf (int hv, int hs) |
Unselect surface. More... | |
int | GV_surf_is_selected (int hv, int hs) |
Check if surface is selected. More... | |
void | GV_draw_vect (int vid) |
Draw vector set. More... | |
void | GV_alldraw_vect (void) |
Draw all vector sets. More... | |
void | GV_draw_fastvect (int vid) |
Draw vector sets. More... | |
int | GV_Set_ClientData (int id, void *clientd) |
Set client data. More... | |
void * | GV_Get_ClientData (int id) |
Get client data. More... | |
OGSF library - loading and manipulating vector sets (higher level functions)
GRASS OpenGL gsurf OGSF Library
(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.
Definition in file GV2.c.
void GV_alldraw_vect | ( | void | ) |
Draw all vector sets.
Definition at line 444 of file GV2.c.
References GV_draw_vect(), and tools::id.
Referenced by gk_follow_frames(), GK_show_vect(), Nviz_draw_all_vect(), and Nviz_draw_quick().
Delete vector set from list.
id | vector set id |
Definition at line 131 of file GV2.c.
References G_debug(), gv_delete_vect(), and GV_vect_exists().
Referenced by Nviz_new_map_obj(), and wxnviz.Nviz::UnloadVector().
void GV_draw_fastvect | ( | int | vid | ) |
Draw vector sets.
vid | vector set id |
Definition at line 460 of file GV2.c.
References gs_get_surf(), gv_get_vect(), and gvd_vect().
void GV_draw_vect | ( | int | vid | ) |
Draw vector set.
vid | vector set id |
Definition at line 420 of file GV2.c.
References gs_get_surf(), gv_get_vect(), and gvd_vect().
Referenced by GV_alldraw_vect().
void* GV_Get_ClientData | ( | int | id | ) |
Get client data.
id | vector set id |
Definition at line 512 of file GV2.c.
References gv_get_vect(), and NULL.
Get trans ?
id | vector set id | |
[out] | xtrans,ytrans,ztrans | x/y/z trans values |
Definition at line 304 of file GV2.c.
References gv_get_vect().
Get vector set mode.
id | vector set id | |
[out] | mem | |
[out] | color | color value |
[out] | width | |
[out] | flat |
Definition at line 259 of file GV2.c.
References gv_get_vect(), and NULL.
Get vector map name.
Note: char array is allocated by G_store()
id | vector set id |
filename | &filename |
Definition at line 206 of file GV2.c.
References G_store(), gv_get_vect(), and NULL.
Referenced by wxnviz.Nviz::CheckColorTable().
Load vector set.
Check to see if handle already loaded, if so - free before loading new for now, always load to memory
id | vector set id |
filename | filename |
Definition at line 174 of file GV2.c.
References G_store(), gv_free_vectmem(), gv_get_vect(), Gv_load_vect(), and NULL.
Referenced by Nviz_new_map_obj().
int GV_new_vector | ( | void | ) |
Register new vector set.
Definition at line 63 of file GV2.c.
References G_debug(), gv_get_new_vect(), and gv_set_defaults().
Referenced by Nviz_new_map_obj().
int GV_num_vects | ( | void | ) |
Get number of available vector sets.
Definition at line 86 of file GV2.c.
References gv_num_vects().
Referenced by Nviz_new_map_obj().
Select surface identified by hs to have vector identified by hv draped over it.
hv | vector set id |
hs | surface id |
Definition at line 331 of file GV2.c.
References GS_surf_exists(), gv_get_vect(), and GV_surf_is_selected().
Referenced by Nviz_new_map_obj(), and wxnviz.Nviz::SetVectorLineSurface().
Set client data.
id | vector set id |
clientd | pointer to client data |
Definition at line 490 of file GV2.c.
References gv_get_vect().
void GV_set_trans | ( | int | id, |
float | xtrans, | ||
float | ytrans, | ||
float | ztrans | ||
) |
Set trans ?
id | vector set id |
xtrans,ytrans,ztrans | x/y/z trans values |
Definition at line 281 of file GV2.c.
References G_debug(), and gv_get_vect().
Referenced by wxnviz.Nviz::SetVectorLineHeight().
Set vector set mode.
id | vector set id |
mem | non-zero for use memory |
color | color value |
width | line width |
flat | non-zero for flat mode |
Definition at line 231 of file GV2.c.
References tools::color, gv_get_vect(), NULL, and dialogs::width.
Referenced by Nviz_new_map_obj(), and wxnviz.Nviz::SetVectorLineMode().
Check if surface is selected.
hv | vector set id |
hs | surface id |
Definition at line 397 of file GV2.c.
References gv_get_vect().
Referenced by GV_select_surf(), GV_unselect_surf(), and wxnviz.Nviz::VectorSurfaceSelected().
Unselect surface.
hv | vector set id |
hs | surface id |
Definition at line 360 of file GV2.c.
References gv_get_vect(), and GV_surf_is_selected().
Referenced by wxnviz.Nviz::UnsetVectorLineSurface().
Check if vector set exists.
id | vector set id |
Definition at line 38 of file GV2.c.
References G_debug(), gv_get_vect(), and NULL.
Referenced by GV_delete_vector(), wxnviz.Nviz::SetVectorLineHeight(), wxnviz.Nviz::SetVectorLineMode(), wxnviz.Nviz::SetVectorLineSurface(), wxnviz.Nviz::UnloadVector(), and wxnviz.Nviz::UnsetVectorLineSurface().