|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-1d1e47ad9d
|
Nviz library – Change view settings. More...

Go to the source code of this file.
Nviz library – Change view settings.
Based on visualization/nviz/src/change_view.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 change_view.c.
Change z-exag value.
| data | nviz data |
| exag | exag value |
Definition at line 238 of file change_view.c.
References G_debug(), GS_global_exag(), GS_set_global_exag(), and Nviz_update_ranges().
Fly through the scene.
Computes parameters needed for moving scene. Changes viewpoint and viewdir. Based on visualization/nviz/src/togl_flythrough.c and simplified.
| data | nviz data [unused] |
| fly_info | values computed from mouse movement |
| scale | rate of movement |
| lateral | type of movement |
Definition at line 324 of file change_view.c.
References GS_get_from(), GS_get_viewdir(), GS_moveto(), GS_set_viewdir(), M_PI, X, Y, and Z.
Get current modelview matrix.
Definition at line 272 of file change_view.c.
Definition at line 181 of file change_view.c.
References G_debug(), GS_get_from_real(), and Z.
Definition at line 131 of file change_view.c.
References G_debug(), GS_get_from(), RANGE, RANGE_OFFSET, X, and Y.
Change focused point.
| sx,sy | screen coordinates |
Definition at line 262 of file change_view.c.
References G_debug(), and GS_look_here().
GL canvas resized.
| width | window width |
| height | window height |
Definition at line 30 of file change_view.c.
References G_debug(), GS_alldraw_wire(), GS_done_draw(), GS_ready_draw(), GS_set_draw(), GS_set_viewport(), and GSD_BACK.
Set rotation parameters.
Rotate scene by given parameters related to mouse drag event (difference from current state). Coordinates determine the second point of rotation axis, the first point is (0, 0, 0).
| angle | angle |
| x,y,z | axis coordinate |
Definition at line 288 of file change_view.c.
References G_debug(), GS_set_rotation(), and x.
Change viewpoint height.
| height | height value (world coordinates) |
Definition at line 157 of file change_view.c.
References G_debug(), GS_get_from_real(), GS_moveto_real(), and Z.
Change viewpoint perspective (field of view)
| persp | perspective value (0-100, in degrees) |
Definition at line 199 of file change_view.c.
References G_debug(), and GS_set_fov().
Change position of view.
| x_pos | x position (model coordinates) |
| y_pos | y position (model coordinates) |
Definition at line 97 of file change_view.c.
References G_debug(), GS_get_from(), GS_moveto(), RANGE, RANGE_OFFSET, X, and Y.
Change viewpoint twist.
| twist | persp twist value (-180-180, in degrees) |
Definition at line 220 of file change_view.c.
References G_debug(), and GS_set_twist().
Update ranges.
Call whenever a new surface is added, deleted, or exag changes
Definition at line 61 of file change_view.c.
References GS_get_longdim(), GS_get_zrange_nz(), and GS_global_exag().
Referenced by Nviz_change_exag(), and Nviz_set_attr().