36 if (width < 1 || height < 1) {
42 G_debug(1,
"Nviz_resize_window(): width = %d height = %d", width, height);
63 float zmin, zmax, exag;
72 dc->zrange =
dc->xyrange / exag;
80 zmax = zmin + (3. *
dc->xyrange / exag);
81 zmin = zmin - (2. *
dc->xyrange / exag);
83 if ((zmax - zmin) >
dc->zrange)
84 dc->zrange = zmax - zmin;
108 G_debug(3,
"Invalid view position coordinates, using %f,%f",
xpos,
145 G_debug(3,
"Invalid view position coordinates, using %f,%f", *
x_pos,
161 G_debug(1,
"Nviz_set_viewpoint_height(): value = %f", height);
165 if (height != from[
Z]) {
185 G_debug(1,
"Nviz_get_viewpoint_height():");
203 G_debug(1,
"Nviz_set_viewpoint_persp(): value = %d",
persp);
222 G_debug(1,
"Nviz_set_viewpoint_twist(): value = %d", twist);
242 G_debug(1,
"Nviz_change_exag(): value = %f", exag);
264 G_debug(1,
"Nviz_look_here(): screen coordinates = %f %f", sx, sy);
290 G_debug(3,
"Nviz_set_rotation(): angle = %f, x = %f, y = %f, z = %f",
angle,
329 float diff_x, diff_y, diff_z;
int Nviz_set_viewpoint_height(double height)
Change viewpoint height.
void Nviz_flythrough(nv_data *data, float *fly_info, int *scale, int lateral)
Fly through the scene.
int Nviz_update_ranges(nv_data *dc)
Update ranges.
int Nviz_look_here(double sx, double sy)
Change focused point.
void Nviz_init_rotation(void)
Stop scene rotation.
void Nviz_get_viewpoint_position(double *x_pos, double *y_pos)
void Nviz_get_viewpoint_height(double *height)
int Nviz_resize_window(int width, int height)
GL canvas resized.
void Nviz_get_modelview(double *modelMatrix)
Get current modelview matrix.
int Nviz_set_viewpoint_twist(int twist)
Change viewpoint twist.
int Nviz_set_viewpoint_position(double x_pos, double y_pos)
Change position of view.
int Nviz_set_viewpoint_persp(int persp)
Change viewpoint perspective (field of view)
void Nviz_set_rotation(double angle, double x, double y, double z)
Set rotation parameters.
void Nviz_unset_rotation(void)
Stop scene rotation.
int Nviz_change_exag(nv_data *data, double exag)
Change z-exag value.
int G_debug(int, const char *,...) __attribute__((format(printf
int GS_look_here(int, int)
Send screen coords sx and sy, lib traces through surfaces; sets new center to point of nearest inters...
void GS_set_rotation(double, double, double, double)
Set rotation params.
void GS_set_fov(int)
Set field of view.
void GS_get_viewdir(float *)
Get viewdir.
void GS_set_draw(int)
Sets which buffer to draw to.
void GS_get_from(float *)
Get viewpoint 'from' position.
void GS_alldraw_wire(void)
Draw all wires.
void GS_init_rotation(void)
Reset scene rotation.
int GS_get_longdim(float *)
Get largest dimension.
void GS_get_from_real(float *)
Get viewpoint 'from' real coordinates.
void GS_set_twist(int)
Set viewpoint twist value.
void GS_set_viewdir(float *)
Set viewdir.
void GS_get_zrange_nz(float *, float *)
Get Z extents for all loaded surfaces.
void GS_moveto(float *)
Move viewpoint.
void GS_unset_rotation(void)
Stop scene rotation.
void GS_set_global_exag(float)
Set global z-exag value.
void GS_moveto_real(float *)
Move position to (real)
void GS_done_draw(void)
Draw done, swap buffers.
void GS_set_viewport(int, int, int, int)
Set viewport.
float GS_global_exag(void)
Get global z-exag value.
#define UNUSED
A macro for an attribute, if attached to a variable, indicating that the variable is not used.