GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
gsd_views.c File Reference

OGSF library - manipulating views (lower level functions) More...

#include <grass/config.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <grass/ogsf.h>
#include "math.h"
Include dependency graph for gsd_views.c:

Go to the source code of this file.

Functions

int gsd_get_los (float(*vect)[3], short sx, short sy)
 ADD. More...
 
void gsd_set_view (geoview *gv, geodisplay *gd)
 Set view. More...
 
void gsd_check_focus (geoview *gv)
 Check focus. More...
 
void gsd_get_zup (geoview *gv, double *up)
 Get z-up vector (z-direction) More...
 
int gsd_zup_twist (geoview *gv)
 ADD. More...
 
void gsd_do_scale (int doexag)
 Set current scale. More...
 
void gsd_real2model (Point3 point)
 Convert real to model coordinates. More...
 
void gsd_model2real (Point3 point)
 Convert model to real coordinates. More...
 
void gsd_model2surf (geosurf *gs, Point3 point)
 Convert model to surface coordinates. More...
 
void gsd_surf2model (Point3 point)
 Convert surface to model coordinates. More...
 
void gsd_surf2real (geosurf *gs, Point3 point)
 Convert surface to real coordinates. More...
 
void gsd_real2surf (geosurf *gs, Point3 point)
 Convert real to surface coordinates. More...
 

Detailed Description

OGSF library - manipulating views (lower level functions)

GRASS OpenGL gsurf OGSF Library

(C) 1999-2008 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.

Author
Bill Brown USACERL (January 1993)
Doxygenized by Martin Landa <landa.martin gmail.com> (May 2008)

Definition in file gsd_views.c.

Function Documentation

◆ gsd_check_focus()

void gsd_check_focus ( geoview gv)

Check focus.

Parameters
gvview (geoview)

Definition at line 215 of file gsd_views.c.

References FROM, geoview::from_to, GS_get_zrange(), GS_v3eq(), GS_v3mult(), GS_v3normalize(), geoview::infocus, geoview::real_to, geoview::scale, TO, geoview::vert_exag, and Z.

Referenced by gsd_set_view().

◆ gsd_do_scale()

◆ gsd_get_los()

int gsd_get_los ( float(*)  vect[3],
short  sx,
short  sy 
)

ADD.

Parameters
vect
sx,syscreen coordinates
Returns
1

Definition at line 40 of file gsd_views.c.

Referenced by GS_look_here().

◆ gsd_get_zup()

void gsd_get_zup ( geoview gv,
double *  up 
)

Get z-up vector (z-direction)

Parameters
gvview (geoview)
upup vector

Definition at line 239 of file gsd_views.c.

References FROM, geoview::from_to, GS_v3dir(), TO, X, Y, and Z.

Referenced by gsd_set_view().

◆ gsd_model2real()

void gsd_model2real ( Point3  point)

Convert model to real coordinates.

Parameters
point[in,out]3d point (x,y,z)

Definition at line 393 of file gsd_views.c.

References max, and min.

Referenced by GS_get_from_real(), and Gs_save_3dview().

◆ gsd_model2surf()

void gsd_model2surf ( geosurf gs,
Point3  point 
)

Convert model to surface coordinates.

Parameters
gssurface (geosurf)
point3d point (Point3)

Definition at line 414 of file gsd_views.c.

References GS_get_scale(), GS_get_zrange(), max, min, X, Y, and Z.

◆ gsd_real2model()

void gsd_real2model ( Point3  point)

Convert real to model coordinates.

Parameters
point[in,out]3d point (Point3)

Definition at line 373 of file gsd_views.c.

References max, and min.

Referenced by GS_moveto_real().

◆ gsd_real2surf()

void gsd_real2surf ( geosurf gs,
Point3  point 
)

Convert real to surface coordinates.

Parameters
gssurface (geosurf)
[in,out]point3d point (Point3)

Definition at line 480 of file gsd_views.c.

References g_surf::ox, g_surf::oy, X, and Y.

Referenced by GS_get_cat_at_xy(), GS_get_norm_at_xy(), and GS_get_val_at_xy().

◆ gsd_set_view()

void gsd_set_view ( geoview gv,
geodisplay gd 
)

◆ gsd_surf2model()

void gsd_surf2model ( Point3  point)

Convert surface to model coordinates.

Parameters
point3d point (Point3)

Definition at line 441 of file gsd_views.c.

References GS_get_scale(), GS_get_zrange(), max, min, X, Y, and Z.

Referenced by gsd_set_view().

◆ gsd_surf2real()

void gsd_surf2real ( geosurf gs,
Point3  point 
)

Convert surface to real coordinates.

Parameters
gssurface (geosurf)
[in,out]point3d point (Point3)

Definition at line 464 of file gsd_views.c.

References g_surf::ox, g_surf::oy, X, and Y.

◆ gsd_zup_twist()

int gsd_zup_twist ( geoview gv)

ADD.

Parameters
gvview (geoview)
Returns
?

Definition at line 274 of file gsd_views.c.

References FROM, geoview::from_to, GS_distance(), GS_v3eq(), TO, geoview::twist, X, Y, and Z.