GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
OGSF library - loading and manipulating point 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 | GP_site_exists (int id) |
Check if point set exists. More... | |
int | GP_new_site (void) |
Create new point set. More... | |
int | GP_num_sites (void) |
Get number of loaded point sets. More... | |
int * | GP_get_site_list (int *numsites) |
Get list of point sets. More... | |
int | GP_delete_site (int id) |
Delete registrated point set. More... | |
int | GP_load_site (int id, const char *filename) |
Load point set from file. More... | |
int | GP_get_sitename (int id, char **filename) |
Get point set filename. More... | |
int | GP_get_sitemode (int id, int *atmod, int *color, int *width, float *size, int *marker) |
Get point set mode. More... | |
int | GP_set_sitemode (int id, int atmod, int color, int width, float size, int marker) |
Set point set mode. More... | |
int | GP_attmode_color (int id, const char *filename) |
Set attribute mode color. More... | |
int | GP_attmode_none (int id) |
Set attribute mode to none. More... | |
int | GP_set_zmode (int id, int use_z) |
Set z-mode. More... | |
int | GP_get_zmode (int id, int *use_z) |
Get z-mode. More... | |
void | GP_set_trans (int id, float xtrans, float ytrans, float ztrans) |
Set trans ? More... | |
void | GP_get_trans (int id, float *xtrans, float *ytrans, float *ztrans) |
Get trans. More... | |
int | GP_select_surf (int hp, int hs) |
Select surface. More... | |
int | GP_unselect_surf (int hp, int hs) |
Unselect surface. More... | |
int | GP_surf_is_selected (int hp, int hs) |
Check if surface is selected. More... | |
void | GP_draw_site (int id) |
Draw point set. More... | |
void | GP_alldraw_site (void) |
Draw all available point sets. More... | |
int | GP_Set_ClientData (int id, void *clientd) |
Set client data. More... | |
void * | GP_Get_ClientData (int id) |
Get client data. More... | |
OGSF library - loading and manipulating point 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 GP2.c.
void GP_alldraw_site | ( | void | ) |
Draw all available point sets.
Definition at line 557 of file GP2.c.
References GP_draw_site(), and tools::id.
Referenced by gk_follow_frames(), GK_show_site(), and Nviz_draw_quick().
Set attribute mode color.
id | surface id |
filename | filename |
Definition at line 284 of file GP2.c.
References gp_get_site(), Gp_set_color(), and NULL.
Set attribute mode to none.
id | point set id |
Definition at line 312 of file GP2.c.
References gp_get_site(), and NULL.
Delete registrated point set.
id | point set id |
Definition at line 131 of file GP2.c.
References G_debug(), gp_delete_site(), and GP_site_exists().
Referenced by Nviz_new_map_obj(), and wxnviz.Nviz::UnloadVector().
void GP_draw_site | ( | int | id | ) |
Draw point set.
id | point set id |
Definition at line 520 of file GP2.c.
References G_debug(), gp_get_site(), gpd_2dsite(), gpd_3dsite(), GS_get_region(), gs_get_surf(), n, and print_site_fields().
Referenced by GP_alldraw_site(), and Nviz_draw_all_site().
void* GP_Get_ClientData | ( | int | id | ) |
Get client data.
id | point set id |
Definition at line 599 of file GP2.c.
References gp_get_site(), and NULL.
Get list of point sets.
Must freed when no longer needed!
numsites | number of point sets |
Definition at line 101 of file GP2.c.
References NULL.
Referenced by Nviz_draw_all_site().
Get point set filename.
Note: char array is allocated by G_store()
id | point set id | |
[out] | &filename | point set filename |
Definition at line 208 of file GP2.c.
References G_store(), gp_get_site(), and NULL.
Referenced by wxnviz.Nviz::CheckColorTable().
void GP_get_trans | ( | int | id, |
float * | xtrans, | ||
float * | ytrans, | ||
float * | ztrans | ||
) |
Get trans.
id | point set id |
xtrans,ytrans,ztrans | x/y/z trans values |
Definition at line 406 of file GP2.c.
References G_debug(), and gp_get_site().
Get z-mode.
id | point set id | |
[out] | use_z | use z |
Definition at line 365 of file GP2.c.
References gp_get_site(), and NULL.
Load point set from file.
Check to see if handle already loaded, if so - free before loading new for now, always load to memory
id | point set id |
filename | point set filename |
Definition at line 173 of file GP2.c.
References G_store(), gp_free_sitemem(), gp_get_site(), Gp_load_sites(), and NULL.
Referenced by Nviz_new_map_obj().
int GP_new_site | ( | void | ) |
Create new point set.
Definition at line 63 of file GP2.c.
References G_debug(), gp_get_new_site(), and gp_set_defaults().
Referenced by Nviz_new_map_obj().
int GP_num_sites | ( | void | ) |
Get number of loaded point sets.
Definition at line 86 of file GP2.c.
References gp_num_sites().
Referenced by Nviz_new_map_obj().
Select surface.
hp | point set id |
hs | surface id |
Definition at line 433 of file GP2.c.
References gp_get_site(), GP_surf_is_selected(), and GS_surf_exists().
Referenced by Nviz_new_map_obj(), and wxnviz.Nviz::SetVectorPointSurface().
Set client data.
id | point set id |
clientd | client data |
Definition at line 577 of file GP2.c.
References gp_get_site().
Set point set mode.
id | point set id |
atmod | |
color | icon color |
width | |
size | icon size |
marker | icon symbol |
Definition at line 254 of file GP2.c.
References tools::color, gp_get_site(), NULL, tools::size, and dialogs::width.
Referenced by Nviz_new_map_obj(), and wxnviz.Nviz::SetVectorPointMode().
void GP_set_trans | ( | int | id, |
float | xtrans, | ||
float | ytrans, | ||
float | ztrans | ||
) |
Set trans ?
id | point set id |
xtrans,ytrans,ztrans | x/y/z trans values |
Definition at line 383 of file GP2.c.
References G_debug(), and gp_get_site().
Referenced by wxnviz.Nviz::SetVectorPointHeight().
Set z-mode.
id | poin set id |
use_z | use z ? |
Definition at line 335 of file GP2.c.
References gp_get_site(), and NULL.
Referenced by wxnviz.Nviz::SetVectorPointZMode().
Check if point set exists.
id | point set id |
Definition at line 38 of file GP2.c.
References G_debug(), gp_get_site(), and NULL.
Referenced by GP_delete_site(), wxnviz.Nviz::SetVectorPointHeight(), wxnviz.Nviz::SetVectorPointMode(), wxnviz.Nviz::SetVectorPointSurface(), wxnviz.Nviz::SetVectorPointZMode(), wxnviz.Nviz::UnloadVector(), and wxnviz.Nviz::UnsetVectorPointSurface().
Check if surface is selected.
hp | point set id |
hs | surface id |
Definition at line 497 of file GP2.c.
References gp_get_site().
Referenced by GP_select_surf(), and GP_unselect_surf().
Unselect surface.
hp | point set id |
hs | surface id |
Definition at line 461 of file GP2.c.
References gp_get_site(), and GP_surf_is_selected().
Referenced by wxnviz.Nviz::UnsetVectorPointSurface().