GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
defs/nviz.h
Go to the documentation of this file.
1 #ifndef GRASS_NVIZDEFS_H
2 #define GRASS_NVIZDEFS_H
3 
4 /* change_view.c */
5 int Nviz_resize_window(int, int);
7 int Nviz_set_viewpoint_position(double, double);
8 void Nviz_get_viewpoint_position(double *, double *);
9 int Nviz_set_viewpoint_height(double);
10 void Nviz_get_viewpoint_height(double *);
13 int Nviz_change_exag(nv_data *, double);
14 int Nviz_look_here(double, double);
15 void Nviz_get_modelview(double *);
16 void Nviz_set_rotation(double, double, double, double);
17 void Nviz_unset_rotation(void);
18 void Nviz_init_rotation(void);
19 void Nviz_flythrough(nv_data *, float *, int *, int);
20 
21 /* cplanes_obj.c */
22 int Nviz_new_cplane(nv_data *, int);
23 int Nviz_on_cplane(nv_data *, int);
24 int Nviz_off_cplane(nv_data *, int);
25 int Nviz_draw_cplane(nv_data *, int, int);
28 int Nviz_set_cplane_rotation(nv_data *, int, float, float, float);
29 int Nviz_get_cplane_rotation(nv_data *, int, float *, float *, float *);
30 int Nviz_set_cplane_translation(nv_data *, int, float, float, float);
31 int Nviz_get_cplane_translation(nv_data *, int, float *, float *, float *);
32 int Nviz_set_fence_color(nv_data *, int);
33 int Nviz_set_cplane_here(nv_data *, int, float, float);
34 
35 
36 /* draw.c */
38 int Nviz_draw_all_vect(void);
39 int Nviz_draw_all_site(void);
40 int Nviz_draw_all_vol(void);
41 int Nviz_draw_all(nv_data *);
42 int Nviz_draw_quick(nv_data *, int);
43 int Nviz_load_image(GLubyte *, int, int, int);
44 void Nviz_draw_image(int, int, int, int, int);
45 void Nviz_set_2D(int, int);
46 void Nviz_del_texture(int);
47 void Nviz_get_max_texture(int *);
48 
49 /* exag.c */
50 int Nviz_get_exag_height(double *, double *, double *);
51 double Nviz_get_exag();
52 
53 /* lights.c */
54 int Nviz_set_light_position(nv_data *, int, double, double, double, double);
55 int Nviz_set_light_bright(nv_data *, int, double);
56 int Nviz_set_light_color(nv_data *, int, int, int, int);
57 int Nviz_set_light_ambient(nv_data *, int, double);
58 int Nviz_init_light(nv_data *, int);
59 int Nviz_new_light(nv_data *);
60 void Nviz_draw_model(nv_data *);
61 
62 /* map_obj.c */
63 int Nviz_new_map_obj(int, const char *, double, nv_data *);
64 int Nviz_set_attr(int, int, int, int, const char *, double, nv_data *);
68 int Nviz_unset_attr(int, int, int);
69 
70 /* nviz.c */
71 void Nviz_init_data(nv_data *);
73 void Nviz_set_bgcolor(nv_data *, int);
75 int Nviz_color_from_str(const char *);
76 struct fringe_data *Nviz_new_fringe(nv_data *, int, unsigned long,
77  double, int, int, int, int);
78 struct fringe_data *Nviz_set_fringe(nv_data *, int, unsigned long,
79  double, int, int, int, int);
80 void Nviz_draw_fringe(nv_data *data);
82 int Nviz_set_arrow(nv_data *, int, int, float, unsigned int);
84 struct scalebar_data * Nviz_new_scalebar(nv_data *, int, float *, float, unsigned int);
85 struct scalebar_data * Nviz_set_scalebar(nv_data *, int , int, int, float, unsigned int);
87 void Nviz_delete_scalebar(nv_data *, int);
88 
89 /* position.c */
90 void Nviz_init_view(nv_data *);
91 int Nviz_set_focus_state(int);
92 int Nviz_set_focus_map(int, int);
93 int Nviz_has_focus(nv_data *);
94 int Nviz_set_focus(nv_data *, float, float, float);
95 int Nviz_get_focus(nv_data *, float *, float *, float *);
96 float Nviz_get_xyrange(nv_data *);
97 int Nviz_get_zrange(nv_data *, float *, float *);
98 float Nviz_get_longdim(nv_data *);
99 
100 /* render.c */
104 int Nviz_create_render_window(struct render_window *, void *, int, int);
106 
107 #endif /* GRASS_NVIZDEFS_H */
int Nviz_get_focus(nv_data *, float *, float *, float *)
Get focus.
Definition: position.c:119
double Nviz_get_exag()
Get view z-exag value.
Definition: exag.c:76
int Nviz_init_light(nv_data *, int)
Init new light.
Definition: lights.c:133
int Nviz_set_viewpoint_persp(int)
Change viewpoint perspective (field of view)
Definition: change_view.c:197
struct render_window * Nviz_new_render_window()
Allocate memory for render window.
Definition: nviz/render.c:66
int Nviz_set_light_ambient(nv_data *, int, double)
Set light ambient.
Definition: lights.c:114
int Nviz_set_fence_color(nv_data *, int)
Set appropriate fence color.
Definition: cplanes_obj.c:243
int Nviz_make_current_render_window(const struct render_window *)
Make window current for rendering.
Definition: nviz/render.c:299
void Nviz_unset_rotation(void)
Stop scene rotation.
Definition: change_view.c:294
void Nviz_draw_fringe(nv_data *data)
Definition: nviz.c:233
void Nviz_flythrough(nv_data *, float *, int *, int)
Fly through the scene.
Definition: change_view.c:320
int Nviz_set_cplane_translation(nv_data *, int, float, float, float)
Set the translation for the current clip plane.
Definition: cplanes_obj.c:211
void Nviz_destroy_render_window(struct render_window *)
Free render window.
Definition: nviz/render.c:110
int Nviz_change_exag(nv_data *, double)
Change z-exag value.
Definition: change_view.c:236
void Nviz_init_rotation(void)
Stop scene rotation.
Definition: change_view.c:302
void Nviz_init_view(nv_data *)
Definition: position.c:23
int Nviz_new_light(nv_data *)
Define new light.
Definition: lights.c:164
int Nviz_load_image(GLubyte *, int, int, int)
Load image into texture.
Definition: nviz/draw.c:316
int Nviz_get_cplane_rotation(nv_data *, int, float *, float *, float *)
Get the rotation values for the current clip plane.
Definition: cplanes_obj.c:193
int Nviz_draw_cplane(nv_data *, int, int)
Draw the clip plane.
Definition: cplanes_obj.c:78
int Nviz_set_arrow(nv_data *, int, int, float, unsigned int)
Sets the North Arrow position and return world coords.
Definition: nviz.c:251
int Nviz_set_focus_map(int, int)
Set focus based on loaded map.
Definition: position.c:75
int Nviz_create_render_window(struct render_window *, void *, int, int)
Create render window.
Definition: nviz/render.c:144
int Nviz_get_exag_height(double *, double *, double *)
Get view height.
Definition: exag.c:28
int Nviz_off_cplane(nv_data *, int)
Turn off (make inactive) the given clip plane.
Definition: cplanes_obj.c:63
int Nviz_set_attr(int, int, int, int, const char *, double, nv_data *)
Definition: map_obj.c:180
int Nviz_update_ranges(nv_data *)
Update ranges.
Definition: change_view.c:60
int Nviz_draw_all_site(void)
Draw all loaded vector point sets.
Definition: nviz/draw.c:146
void Nviz_delete_arrow(nv_data *)
Deletes the North Arrow.
Definition: nviz.c:315
int Nviz_get_cplane_translation(nv_data *, int, float *, float *, float *)
Get the translation values for the current clip plane.
Definition: cplanes_obj.c:230
struct scalebar_data * Nviz_set_scalebar(nv_data *, int, int, int, float, unsigned int)
Sets the scale bar position and return world coords.
Definition: nviz.c:368
void Nviz_draw_model(nv_data *)
Draw lighting model.
Definition: lights.c:185
int Nviz_get_zrange(nv_data *, float *, float *)
Get z range.
Definition: position.c:187
void Nviz_get_viewpoint_position(double *, double *)
Definition: change_view.c:130
int Nviz_set_cplane_rotation(nv_data *, int, float, float, float)
Set the rotation for the current clip plane.
Definition: cplanes_obj.c:171
int Nviz_has_focus(nv_data *)
Test focus.
Definition: position.c:161
void Nviz_init_render_window(struct render_window *)
Initialize render window.
Definition: nviz/render.c:81
struct fringe_data * Nviz_set_fringe(nv_data *, int, unsigned long, double, int, int, int, int)
Definition: nviz.c:192
int Nviz_set_light_position(nv_data *, int, double, double, double, double)
Set light position.
Definition: lights.c:27
int Nviz_new_map_obj(int, const char *, double, nv_data *)
Create a new map object which can be one of surf, vect, vol or site.
Definition: map_obj.c:44
int Nviz_resize_window(int, int)
GL canvas resized.
Definition: change_view.c:29
int Nviz_draw_all_vol(void)
Draw all loaded volume sets.
Definition: nviz/draw.c:175
int Nviz_set_light_bright(nv_data *, int, double)
Set light brightness.
Definition: lights.c:63
void Nviz_del_texture(int)
Delete texture.
Definition: nviz/draw.c:408
void Nviz_get_modelview(double *)
Get current modelview matrix.
Definition: change_view.c:269
void Nviz_destroy_data(nv_data *)
Free allocated space by nv_data struct.
Definition: nviz.c:67
int Nviz_set_volume_attr_default()
float Nviz_get_xyrange(nv_data *)
Get xy range.
Definition: position.c:176
void Nviz_get_max_texture(int *)
Get maximum texture size.
Definition: nviz/draw.c:420
void Nviz_set_2D(int, int)
Set ortho view for drawing images.
Definition: nviz/draw.c:355
void Nviz_set_surface_attr_default()
Set default surface attributes.
Definition: map_obj.c:276
int Nviz_draw_all_surf(nv_data *)
Draw all loaded surfaces.
Definition: nviz/draw.c:32
int Nviz_set_cplane_here(nv_data *, int, float, float)
Definition: cplanes_obj.c:250
void Nviz_set_bgcolor(nv_data *, int)
Set background color.
Definition: nviz.c:97
int Nviz_set_viewpoint_twist(int)
Change viewpoint twist.
Definition: change_view.c:218
int Nviz_color_from_str(const char *)
Get color value from color string (name or RGB triplet)
Definition: nviz.c:123
Definition: nviz.h:101
int Nviz_get_current_cplane(nv_data *)
Get the current active cutplane.
Definition: cplanes_obj.c:156
float Nviz_get_longdim(nv_data *)
Get largest dimension.
Definition: position.c:198
int Nviz_draw_arrow(nv_data *)
Draws the North Arrow.
Definition: nviz.c:298
struct scalebar_data * Nviz_new_scalebar(nv_data *, int, float *, float, unsigned int)
Definition: nviz.c:334
int Nviz_set_light_color(nv_data *, int, int, int, int)
Set light color.
Definition: lights.c:87
int Nviz_set_focus_state(int)
Set focus state.
Definition: position.c:49
void Nviz_init_data(nv_data *)
Initialize Nviz data.
Definition: nviz.c:25
void Nviz_draw_image(int, int, int, int, int)
Draw image as texture.
Definition: nviz/draw.c:379
void Nviz_draw_scalebar(nv_data *)
Draws the Scale bar.
Definition: nviz.c:413
int Nviz_unset_attr(int, int, int)
Definition: map_obj.c:360
int Nviz_set_vpoint_attr_default()
int Nviz_on_cplane(nv_data *, int)
Turn on (make current) the given clip plane.
Definition: cplanes_obj.c:48
int Nviz_get_bgcolor(nv_data *)
Get background color.
Definition: nviz.c:111
void Nviz_get_viewpoint_height(double *)
Definition: change_view.c:180
int Nviz_num_cplanes(nv_data *)
Return the number of clip planes objects currently allocated.
Definition: cplanes_obj.c:146
int Nviz_set_focus(nv_data *, float, float, float)
Set focus.
Definition: position.c:141
void Nviz_delete_scalebar(nv_data *, int)
Deletes scale bar.
Definition: nviz.c:436
int Nviz_new_cplane(nv_data *, int)
Creates a clip plane object.
Definition: cplanes_obj.c:30
int Nviz_draw_all(nv_data *)
Draw all map objects (in full resolution) and decorations.
Definition: nviz/draw.c:204
int Nviz_look_here(double, double)
Change focused point.
Definition: change_view.c:259
int Nviz_set_viewpoint_position(double, double)
Change position of view.
Definition: change_view.c:96
struct fringe_data * Nviz_new_fringe(nv_data *, int, unsigned long, double, int, int, int, int)
Definition: nviz.c:148
int Nviz_draw_quick(nv_data *, int)
Draw all surfaces in wireframe (quick mode)
Definition: nviz/draw.c:279
void Nviz_set_rotation(double, double, double, double)
Set rotation parameters.
Definition: change_view.c:285
int Nviz_draw_all_vect(void)
Draw all loaded vector sets (lines)
Definition: nviz/draw.c:121
int Nviz_set_viewpoint_height(double)
Change viewpoint height.
Definition: change_view.c:156