|
GRASS Programmer's Manual
6.5.svn(2014)-r66266
|
Nviz library – Data management. More...
#include <grass/glocale.h>#include <grass/nviz.h>
Go to the source code of this file.
Functions | |
| void | Nviz_init_data (nv_data *data) |
| Initialize Nviz data. More... | |
| void | Nviz_destroy_data (nv_data *data) |
| Free allocated space by nv_data struct. More... | |
| void | Nviz_set_bgcolor (nv_data *data, int color) |
| Set background color. More... | |
| int | Nviz_get_bgcolor (nv_data *data) |
| Get background color. More... | |
| int | Nviz_color_from_str (const char *color_str) |
| Get color value from color string (name or RGB triplet) More... | |
| struct fringe_data * | Nviz_new_fringe (nv_data *data, int id, unsigned long color, double elev, int nw, int ne, int sw, int se) |
| struct fringe_data * | Nviz_set_fringe (nv_data *data, int id, unsigned long color, double elev, int nw, int ne, int sw, int se) |
| void | Nviz_draw_fringe (nv_data *data) |
| int | Nviz_set_arrow (nv_data *data, int sx, int sy, float size, unsigned int color) |
| Sets the North Arrow position and return world coords. More... | |
| int | Nviz_draw_arrow (nv_data *data) |
| Draws the North Arrow. More... | |
| void | Nviz_delete_arrow (nv_data *data) |
| Deletes the North Arrow. More... | |
| struct scalebar_data * | Nviz_new_scalebar (nv_data *data, int bar_id, float *coords, float size, unsigned int color) |
| struct scalebar_data * | Nviz_set_scalebar (nv_data *data, int bar_id, int sx, int sy, float size, unsigned int color) |
| Sets the scale bar position and return world coords. More... | |
| void | Nviz_draw_scalebar (nv_data *data) |
| Draws the Scale bar. More... | |
| void | Nviz_delete_scalebar (nv_data *data, int bar_id) |
| Deletes scale bar. More... | |
Nviz library – Data management.
Based on visualization/nviz/src/
(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 nviz.c.
| int Nviz_color_from_str | ( | const char * | color_str | ) |
Get color value from color string (name or RGB triplet)
| color_str | color string |
Definition at line 121 of file nviz.c.
References BLU_MASK, G_str_to_color(), G_warning(), GRN_MASK, int, and RED_MASK.
Referenced by wxnviz.Nviz::AddConstant(), wxnviz.Nviz::InitView(), wxnviz.Nviz::LoadSurface(), wxnviz.Nviz::LoadVolume(), wxnviz.Nviz::SetArrow(), wxnviz.Nviz::SetBgColor(), wxnviz.Nviz::SetFringe(), wxnviz.Nviz::SetIsosurfaceAttr(), wxnviz.Nviz::SetScalebar(), wxnviz.Nviz::SetSurfaceAttr(), wxnviz.Nviz::SetVectorLineMode(), wxnviz.Nviz::SetVectorPointMode(), and wxnviz.Nviz::SetWireColor().
| void Nviz_delete_arrow | ( | nv_data * | data | ) |
Deletes the North Arrow.
| data | nviz data |
Definition at line 313 of file nviz.c.
Referenced by wxnviz.Nviz::DeleteArrow().
| void Nviz_delete_scalebar | ( | nv_data * | data, |
| int | bar_id | ||
| ) |
Deletes scale bar.
| data | nviz data |
Definition at line 427 of file nviz.c.
References G_free(), and NULL.
Referenced by wxnviz.Nviz::DeleteScalebar().
| void Nviz_destroy_data | ( | nv_data * | data | ) |
| int Nviz_draw_arrow | ( | nv_data * | data | ) |
Draws the North Arrow.
| data | nviz data |
Definition at line 296 of file nviz.c.
References gsd_north_arrow().
Referenced by wxnviz.Nviz::DrawArrow().
| void Nviz_draw_fringe | ( | nv_data * | data | ) |
Draw fringe
| data | nviz data |
Definition at line 231 of file nviz.c.
References GS_draw_fringe().
Referenced by wxnviz.Nviz::DrawFringe().
| void Nviz_draw_scalebar | ( | nv_data * | data | ) |
Draws the Scale bar.
| data | nviz data |
Definition at line 409 of file nviz.c.
References gsd_scalebar_v2(), and dialogs::s.
Referenced by wxnviz.Nviz::DrawScalebar().
| int Nviz_get_bgcolor | ( | nv_data * | data | ) |
Get background color.
| data | nviz data |
Definition at line 109 of file nviz.c.
Referenced by wxnviz.Nviz::EraseMap(), wxnviz.Nviz::InitView(), and wxnviz.Nviz::SaveToFile().
| void Nviz_init_data | ( | nv_data * | data | ) |
Initialize Nviz data.
| data | nviz data |
Definition at line 23 of file nviz.c.
References GS_set_light_reset(), NULL, Nviz_new_cplane(), Nviz_new_light(), and Nviz_off_cplane().
Referenced by wxnviz.Nviz::InitView().
| struct fringe_data* Nviz_new_fringe | ( | nv_data * | data, |
| int | id, | ||
| unsigned long | color, | ||
| double | elev, | ||
| int | nw, | ||
| int | ne, | ||
| int | sw, | ||
| int | se | ||
| ) |
Add new fringe
| data | nviz data |
| id | surface id |
| color | color |
| elev | fringe elevation |
| nw,ne,sw,se | 1 (turn on) 0 (turn off) |
Definition at line 146 of file nviz.c.
References tools::color, G_free(), GS_get_surf_list(), GS_surf_exists(), tools::id, NULL, and num.
Referenced by Nviz_set_fringe().
| struct scalebar_data* Nviz_new_scalebar | ( | nv_data * | data, |
| int | bar_id, | ||
| float * | coords, | ||
| float | size, | ||
| unsigned int | color | ||
| ) |
Add new scalebar
| data | nviz data |
| bar_id | scale bar id |
| coords | real(?) coordinates |
| size | scale bar length |
| color | scalebar/text color |
Definition at line 332 of file nviz.c.
References tools::color, dialogs::s, and tools::size.
Referenced by Nviz_set_scalebar().
Sets the North Arrow position and return world coords.
| data | nviz data |
| sx,sy | screen coordinates |
| size | arrow length |
| color | arrow/text color |
Definition at line 249 of file nviz.c.
References tools::color, G_free(), GS_get_surf_list(), GS_num_surfs(), GS_set_Narrow(), tools::id, and tools::size.
Referenced by wxnviz.Nviz::SetArrow().
| void Nviz_set_bgcolor | ( | nv_data * | data, |
| int | color | ||
| ) |
Set background color.
| data | nviz data |
| color | color value |
Definition at line 95 of file nviz.c.
References tools::color.
Referenced by wxnviz.Nviz::InitView(), and wxnviz.Nviz::SetBgColor().
| struct fringe_data* Nviz_set_fringe | ( | nv_data * | data, |
| int | id, | ||
| unsigned long | color, | ||
| double | elev, | ||
| int | nw, | ||
| int | ne, | ||
| int | sw, | ||
| int | se | ||
| ) |
Set fringe
| data | nviz data |
| id | surface id |
| color | color |
| elev | fringe elevation |
| nw,ne,sw,se | 1 (turn on) 0 (turn off) |
Definition at line 190 of file nviz.c.
References tools::color, G_free(), GS_get_surf_list(), GS_surf_exists(), NULL, num, and Nviz_new_fringe().
Referenced by wxnviz.Nviz::SetFringe().
| struct scalebar_data* Nviz_set_scalebar | ( | nv_data * | data, |
| int | bar_id, | ||
| int | sx, | ||
| int | sy, | ||
| float | size, | ||
| unsigned int | color | ||
| ) |
Sets the scale bar position and return world coords.
| data | nviz data |
| bar_id | scale bar id |
| sx,sy | screen coordinates |
| size | scale bar length |
| color | scalebar/text color |
Definition at line 366 of file nviz.c.
References tools::color, G_free(), GS_get_surf_list(), GS_num_surfs(), GS_set_Narrow(), tools::id, NULL, Nviz_new_scalebar(), dialogs::s, and tools::size.
Referenced by wxnviz.Nviz::SetScalebar().