GRASS GIS 8 Programmer's Manual  8.5.0dev(2024)-36359e2344
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 *);
33 int Nviz_set_cplane_here(nv_data *, int, float, float);
34 
35 /* draw.c */
37 int Nviz_draw_all_vect(void);
38 int Nviz_draw_all_site(void);
39 int Nviz_draw_all_vol(void);
40 int Nviz_draw_all(nv_data *);
41 int Nviz_draw_quick(nv_data *, int);
42 int Nviz_load_image(GLubyte *, int, int, int);
43 void Nviz_draw_image(int, int, int, int, int);
44 void Nviz_set_2D(int, int);
45 void Nviz_del_texture(int);
46 void Nviz_get_max_texture(int *);
47 
48 /* exag.c */
49 int Nviz_get_exag_height(double *, double *, double *);
50 double Nviz_get_exag(void);
51 
52 /* lights.c */
53 int Nviz_set_light_position(nv_data *, int, double, double, double, double);
54 int Nviz_set_light_bright(nv_data *, int, double);
55 int Nviz_set_light_color(nv_data *, int, int, int, int);
56 int Nviz_set_light_ambient(nv_data *, int, double);
57 int Nviz_init_light(nv_data *, int);
58 int Nviz_new_light(nv_data *);
60 
61 /* map_obj.c */
62 int Nviz_new_map_obj(int, const char *, double, nv_data *);
63 int Nviz_set_attr(int, int, int, int, const char *, double, nv_data *);
67 int Nviz_unset_attr(int, int, int);
68 
69 /* nviz.c */
70 void Nviz_init_data(nv_data *);
72 void Nviz_set_bgcolor(nv_data *, int);
74 int Nviz_color_from_str(const char *);
75 struct fringe_data *Nviz_new_fringe(nv_data *, int, unsigned long, double, int,
76  int, int, int);
77 struct fringe_data *Nviz_set_fringe(nv_data *, int, unsigned long, double, int,
78  int, int, int);
79 void Nviz_draw_fringe(nv_data *data);
81 int Nviz_set_arrow(nv_data *, int, int, float, unsigned int);
83 struct scalebar_data *Nviz_new_scalebar(nv_data *, int, float *, float,
84  unsigned int);
85 struct scalebar_data *Nviz_set_scalebar(nv_data *, int, int, int, float,
86  unsigned int);
88 void Nviz_delete_scalebar(nv_data *, int);
89 
90 /* position.c */
91 void Nviz_init_view(nv_data *);
92 int Nviz_set_focus_state(int);
93 int Nviz_set_focus_map(int, int);
95 int Nviz_set_focus(nv_data *, float, float, float);
96 int Nviz_get_focus(nv_data *, float *, float *, float *);
97 float Nviz_get_xyrange(nv_data *);
98 int Nviz_get_zrange(nv_data *, float *, float *);
100 
101 /* render.c */
105 int Nviz_create_render_window(struct render_window *, void *, int, int);
107 
108 #endif /* GRASS_NVIZDEFS_H */
void Nviz_delete_arrow(nv_data *)
Deletes the North Arrow.
Definition: nviz.c:313
int Nviz_set_light_position(nv_data *, int, double, double, double, double)
Set light position.
Definition: lights.c:28
float Nviz_get_xyrange(nv_data *)
Get xy range.
Definition: position.c:175
void Nviz_set_2D(int, int)
Set ortho view for drawing images.
Definition: nviz/draw.c:355
int Nviz_set_focus(nv_data *, float, float, float)
int Nviz_on_cplane(nv_data *, int)
Turn on (make current) the given clip plane.
Definition: cplanes_obj.c:48
int Nviz_load_image(GLubyte *, int, int, int)
Load image into texture.
Definition: nviz/draw.c:318
struct scalebar_data * Nviz_new_scalebar(nv_data *, int, float *, float, unsigned int)
Definition: nviz.c:332
int Nviz_set_attr(int, int, int, int, const char *, double, nv_data *)
Definition: map_obj.c:181
int Nviz_get_current_cplane(nv_data *)
Get the current active cutplane.
Definition: cplanes_obj.c:157
int Nviz_off_cplane(nv_data *, int)
Turn off (make inactive) the given clip plane.
Definition: cplanes_obj.c:63
int Nviz_draw_all(nv_data *)
Draw all map objects (in full resolution) and decorations.
Definition: nviz/draw.c:204
void Nviz_set_rotation(double, double, double, double)
Set rotation parameters.
Definition: change_view.c:288
int Nviz_set_light_ambient(nv_data *, int, double)
Set light ambient.
Definition: lights.c:116
void Nviz_get_max_texture(int *)
Get maximum texture size.
Definition: nviz/draw.c:420
void Nviz_init_view(nv_data *)
Definition: position.c:24
void Nviz_destroy_data(nv_data *)
Free allocated space by nv_data struct.
Definition: nviz.c:68
int Nviz_set_cplane_translation(nv_data *, int, float, float, float)
Set the translation for the current clip plane.
Definition: cplanes_obj.c:215
void Nviz_del_texture(int)
Delete texture.
Definition: nviz/draw.c:408
void Nviz_init_rotation(void)
Stop scene rotation.
Definition: change_view.c:306
int Nviz_draw_all_surf(nv_data *)
Draw all loaded surfaces.
Definition: nviz/draw.c:32
void Nviz_flythrough(nv_data *, float *, int *, int)
int Nviz_draw_all_vect(void)
Draw all loaded vector sets (lines)
Definition: nviz/draw.c:121
int Nviz_get_cplane_translation(nv_data *, int, float *, float *, float *)
Get the translation values for the current clip plane.
Definition: cplanes_obj.c:236
void Nviz_get_viewpoint_position(double *, double *)
Definition: change_view.c:131
struct render_window * Nviz_new_render_window(void)
Allocate memory for render window.
Definition: nviz/render.c:79
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_draw_quick(nv_data *, int)
Draw all surfaces in wireframe (quick mode)
Definition: nviz/draw.c:281
int Nviz_set_cplane_rotation(nv_data *, int, float, float, float)
Set the rotation for the current clip plane.
Definition: cplanes_obj.c:172
int Nviz_set_viewpoint_persp(int)
Change viewpoint perspective (field of view)
Definition: change_view.c:199
struct fringe_data * Nviz_set_fringe(nv_data *, int, unsigned long, double, int, int, int, int)
Definition: nviz.c:193
int Nviz_init_light(nv_data *, int)
Init new light.
Definition: lights.c:134
int Nviz_new_cplane(nv_data *, int)
Creates a clip plane object.
Definition: cplanes_obj.c:31
int Nviz_change_exag(nv_data *, double)
Change z-exag value.
Definition: change_view.c:238
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:366
void Nviz_destroy_render_window(struct render_window *)
Free render window.
Definition: nviz/render.c:123
int Nviz_set_focus_state(int)
Set focus state.
Definition: position.c:50
void Nviz_draw_image(int, int, int, int, int)
Draw image as texture.
Definition: nviz/draw.c:379
void Nviz_get_modelview(double *)
Get current modelview matrix.
Definition: change_view.c:272
void Nviz_init_data(nv_data *)
Initialize Nviz data.
Definition: nviz.c:26
int Nviz_set_focus_map(int, int)
Set focus based on loaded map.
Definition: position.c:76
void Nviz_set_surface_attr_default(void)
Set default surface attributes.
Definition: map_obj.c:278
void Nviz_delete_scalebar(nv_data *, int)
Deletes scale bar.
Definition: nviz.c:434
int Nviz_color_from_str(const char *)
Get color value from color string (name or RGB triplet)
Definition: nviz.c:125
int Nviz_set_light_color(nv_data *, int, int, int, int)
Set light color.
Definition: lights.c:90
int Nviz_draw_cplane(nv_data *, int, int)
Draw the clip plane.
Definition: cplanes_obj.c:78
int Nviz_look_here(double, double)
Change focused point.
Definition: change_view.c:262
int Nviz_get_focus(nv_data *, float *, float *, float *)
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:46
int Nviz_set_volume_attr_default(int)
Set default volume attributes.
Definition: map_obj.c:322
int Nviz_resize_window(int, int)
GL canvas resized.
Definition: change_view.c:30
void Nviz_set_bgcolor(nv_data *, int)
Set background color.
Definition: nviz.c:99
int Nviz_get_exag_height(double *, double *, double *)
Get view height.
Definition: exag.c:29
int Nviz_set_light_bright(nv_data *, int, double)
Set light brightness.
Definition: lights.c:65
double Nviz_get_exag(void)
Get view z-exag value.
Definition: exag.c:77
int Nviz_get_bgcolor(nv_data *)
Get background color.
Definition: nviz.c:113
int Nviz_unset_attr(int, int, int)
Definition: map_obj.c:362
int Nviz_set_cplane_here(nv_data *, int, float, float)
Definition: cplanes_obj.c:258
int Nviz_create_render_window(struct render_window *, void *, int, int)
int Nviz_get_cplane_rotation(nv_data *, int, float *, float *, float *)
Get the rotation values for the current clip plane.
Definition: cplanes_obj.c:196
int Nviz_set_viewpoint_height(double)
Change viewpoint height.
Definition: change_view.c:157
void Nviz_unset_rotation(void)
Stop scene rotation.
Definition: change_view.c:298
int Nviz_set_vpoint_attr_default(int)
Set default vector point attributes.
Definition: map_obj.c:302
void Nviz_init_render_window(struct render_window *)
Initialize render window.
Definition: nviz/render.c:94
float Nviz_get_longdim(nv_data *)
int Nviz_make_current_render_window(const struct render_window *)
Make window current for rendering.
Definition: nviz/render.c:325
int Nviz_set_viewpoint_position(double, double)
Change position of view.
Definition: change_view.c:97
int Nviz_get_zrange(nv_data *, float *, float *)
int Nviz_draw_all_vol(void)
Draw all loaded volume sets.
Definition: nviz/draw.c:175
int Nviz_has_focus(nv_data *)
int Nviz_set_viewpoint_twist(int)
Change viewpoint twist.
Definition: change_view.c:220
int Nviz_set_fence_color(nv_data *, int)
int Nviz_draw_arrow(nv_data *)
Draws the North Arrow.
Definition: nviz.c:296
void Nviz_draw_model(nv_data *)
struct fringe_data * Nviz_new_fringe(nv_data *, int, unsigned long, double, int, int, int, int)
Definition: nviz.c:150
int Nviz_update_ranges(nv_data *)
Update ranges.
Definition: change_view.c:61
void Nviz_draw_scalebar(nv_data *)
Draws the Scale bar.
Definition: nviz.c:411
void Nviz_get_viewpoint_height(double *)
Definition: change_view.c:181
int Nviz_draw_all_site(void)
Draw all loaded vector point sets.
Definition: nviz/draw.c:146
int Nviz_new_light(nv_data *)
Define new light.
Definition: lights.c:165
void Nviz_draw_fringe(nv_data *data)
Definition: nviz.c:232
int Nviz_num_cplanes(nv_data *)
Return the number of clip planes objects currently allocated.
Definition: cplanes_obj.c:147
Definition: nviz.h:97