[GRASS-SVN] r31271 - grass/branches/develbranch_6/lib/ogsf

svn_grass at osgeo.org svn_grass at osgeo.org
Tue May 6 17:11:05 EDT 2008


Author: martinl
Date: 2008-05-06 17:11:05 -0400 (Tue, 06 May 2008)
New Revision: 31271

Modified:
   grass/branches/develbranch_6/lib/ogsf/GK2.c
   grass/branches/develbranch_6/lib/ogsf/GP2.c
   grass/branches/develbranch_6/lib/ogsf/GS2.c
   grass/branches/develbranch_6/lib/ogsf/GS_util.c
   grass/branches/develbranch_6/lib/ogsf/GV2.c
   grass/branches/develbranch_6/lib/ogsf/ogsflib.dox
Log:
ogsflib: initial doxygen update

Modified: grass/branches/develbranch_6/lib/ogsf/GK2.c
===================================================================
--- grass/branches/develbranch_6/lib/ogsf/GK2.c	2008-05-06 20:47:18 UTC (rev 31270)
+++ grass/branches/develbranch_6/lib/ogsf/GK2.c	2008-05-06 21:11:05 UTC (rev 31271)
@@ -1,5 +1,18 @@
-/*
-* $Id$
+/*!
+  \file GK2.c
+ 
+  \brief OGSF library - setting and manipulating keyframes animation
+ 
+  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, GMSL/University of Illinois
 */
 
 #include <stdlib.h>
@@ -115,6 +128,14 @@
     return;
 }
 
+/*!
+  \brief Set interpolation mode 
+
+  \param mode interpolation mode (KF_LINEAR or KF_SPLINE)
+
+  \return 1 on success
+  \return -1 on error (invalid interpolation mode)
+*/
 int GK_set_interpmode(int mode)
 {
     if (KF_LEGAL_MODE(mode)) {
@@ -125,6 +146,11 @@
     return (-1);
 }
 
+/*!
+  \brief Set value for tension when interpmode is KF_SPLINE. 
+
+  \param tens value tens should be between 0.0; 1.0.
+*/
 void GK_set_tension(float tens)
 {
     Tension = tens > 1.0 ? 1.0 : (tens < 0.0 ? 0.0 : tens);
@@ -150,6 +176,13 @@
     return;
 }
 
+/*!
+  \brief ADD
+
+  Use GK_showtension_start/GK_update_tension/GK_showtension_stop to
+  initialize and stop multi-view display of path when changing
+  tension.
+*/
 void GK_showtension_stop(void)
 {
     return;
@@ -194,6 +227,12 @@
 
 }
 
+/*!
+  \brief Recalculate path using the current number of frames requested.
+
+  Call after changing number of frames or when
+  Keyframes change.
+*/
 void GK_update_frames(void)
 {
     Keylist *k;
@@ -245,6 +284,11 @@
     return;
 }
 
+/*!
+  \brief Set the number of frames to be interpolated from keyframes
+
+  \param newsteps number of frames
+*/
 void GK_set_numsteps(int newsteps)
 {
     Viewsteps = newsteps;
@@ -253,7 +297,11 @@
     return;
 }
 
+/*!
+  \brief Deletes all keyframes, resets field masks.
 
+  Doesn't change number of frames requested.
+*/
 void GK_clear_keys(void)
 {
     gk_free_key(Keys);
@@ -268,6 +316,16 @@
     return;
 }
 
+/*!
+  \brief Move keyframe
+
+  Precis works as in other functions - to identify keyframe to move.
+  Only the first keyframe in the precis range will be moved.
+
+  \param ADD
+
+  \return number of keys moved (1 or 0)
+*/
 int GK_move_key(float oldpos, float precis, float newpos)
 {
     Keylist *k;
@@ -285,7 +343,18 @@
     return (0);
 }
 
-/* returns number of keys deleted */
+/*!
+  Delete key
+
+  The values pos and precis are used to determine which keyframes to
+  delete.  Any keyframes with their position within precis of pos will
+  be deleted if justone is zero.  If justone is non-zero, only the first
+  (lowest pos) keyframe in the range will be deleted.
+
+  \param ADD
+
+  \return number of keys deleted.
+*/
 int GK_delete_key(float pos, float precis, int justone)
 {
     Keylist *k, *next;
@@ -310,7 +379,41 @@
     return (cnt);
 }
 
-/* returns 1 if key added, otherwise -1 */
+/*!
+  \brief Add keyframe
+
+  The pos value is the relative position in the animation for this
+  particular keyframe - used to compare relative distance to neighboring
+  keyframes, it can be any floating point value.
+
+  The fmask value can be any of the following or'd together:    
+   - KF_FROMX_MASK    
+   - KF_FROMY_MASK    
+   - KF_FROMZ_MASK    
+   - KF_FROM_MASK (KF_FROMX_MASK | KF_FROMY_MASK | KF_FROMZ_MASK) 
+
+   - KF_DIRX_MASK    
+   - KF_DIRY_MASK    
+   - KF_DIRZ_MASK    
+   - KF_DIR_MASK (KF_DIRX_MASK | KF_DIRY_MASK | KF_DIRZ_MASK) 
+
+   - KF_FOV_MASK    
+   - KF_TWIST_MASK    
+
+   - KF_ALL_MASK (KF_FROM_MASK | KF_DIR_MASK | KF_FOV_MASK | KF_TWIST_MASK) 
+
+   Other fields will be added later.
+
+   The value precis and the boolean force_replace are used to determine
+   if a keyframe should be considered to be at the same position as a
+   pre-existing keyframe. e.g., if anykey.pos - newkey.pos &lt;= precis,
+   GK_add_key() will fail unless force_replace is TRUE.
+
+   \param ADD
+   
+   \return 1 if key is added
+   \return -1 key not added
+*/
 int GK_add_key(float pos, unsigned long fmask, int force_replace,
 	       float precis)
 {
@@ -363,6 +466,14 @@
     return (-1);
 }
 
+/*!
+  \brief Moves the animation to frame number "step".
+
+  Step should be a value between 1 and the number of frames.  If
+  render is non-zero, calls draw_all.
+
+  \param ADD
+*/
 void GK_do_framestep(int step, int render)
 {
     if (Views) {
@@ -374,7 +485,11 @@
     return;
 }
 
+/*!
+  \brief Draw the current path
 
+  \param ADD
+*/
 void GK_show_path(int flag)
 {
     if (flag) {

Modified: grass/branches/develbranch_6/lib/ogsf/GP2.c
===================================================================
--- grass/branches/develbranch_6/lib/ogsf/GP2.c	2008-05-06 20:47:18 UTC (rev 31270)
+++ grass/branches/develbranch_6/lib/ogsf/GP2.c	2008-05-06 21:11:05 UTC (rev 31271)
@@ -1,12 +1,20 @@
-/*
-* $Id$
+/*!
+  \file GP2.c
+ 
+  \brief OGSF library - loading and manipulating point sets
+ 
+  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, GMSL/University of Illinois (January 1994)
 */
 
-/*  GP.c 
-    Bill Brown, USACERL  
-    January 1994
-*/
-
 #include <stdlib.h>
 #include <string.h>
 #include <grass/gis.h>
@@ -69,8 +77,15 @@
     return (gp_num_sites());
 }
 
-/***********************************************************************/
-/* USER must free!! */
+/*!
+  \brief Get list of point sets
+  
+  Must free when no longer needed!
+
+  \param numsites number of point sets
+
+  \return ADD
+*/
 int *GP_get_site_list(int *numsites)
 {
     int i, *ret;

Modified: grass/branches/develbranch_6/lib/ogsf/GS2.c
===================================================================
--- grass/branches/develbranch_6/lib/ogsf/GS2.c	2008-05-06 20:47:18 UTC (rev 31270)
+++ grass/branches/develbranch_6/lib/ogsf/GS2.c	2008-05-06 21:11:05 UTC (rev 31271)
@@ -1,17 +1,21 @@
-/*
-* $Id$
+/*!
+  \file GS2.c
+ 
+  \brief OGSF library - loading and manipulating surfaces
+ 
+  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, GMSL/University of Illinois
+  Pierre de Mouveaux (p_de_mouveaux hotmail.com) (updated 24 oct. 1999)
 */
 
-/* updated 24 oct. 1999
- - Pierre de Mouveaux
- p_de_mouveaux at hotmail.com
-*/
-
-/*  GS.c
-    Bill Brown, USACERL
-    January 1993
-*/
-
 #include <stdlib.h>
 #include <string.h>
 #include <math.h>
@@ -267,7 +271,13 @@
     return;
 }
 
-/***********************************************************************/
+/*!
+  \brief ADD
+  
+  Red, green, blue from 0.0 to 1.0
+
+  \param ADD
+*/
 void GS_setlight_color(int num, float red, float green, float blue)
 {
     if (num) {
@@ -299,7 +309,13 @@
     return;
 }
 
-/***********************************************************************/
+/*!
+  \brief ADD
+
+  Red, green, blue from 0.0 to 1.0
+
+  \param ADD
+*/
 void GS_setlight_ambient(int num, float red, float green, float blue)
 {
     if (num) {
@@ -395,9 +411,15 @@
     return;
 }
 
-/***********************************************************************/
-/* position at nearclip * 2: tried nearclip + siz, but since need to
-know position to calculate size, have two dependent variables */
+/*!
+  \brief Retrieves coordinates for lighting model position, at center of view
+
+  Position at nearclip * 2: tried nearclip + siz, but since need to
+  know position to calculate size, have two dependent variables
+  (nearclip * 2) from eye.
+
+  \param ADD
+*/
 void GS_get_modelposition(float *siz, float *pos)
 {
     float dist, near_h, dir[3];
@@ -492,8 +514,12 @@
     return;
 }
 
-/***********************************************************************/
-/* pt only has to have an X & Y value in true world coordinates */
+/*!
+  \brief ADD
+
+  \param id geographic object id
+  \param pt point, X, Y value in true world coordinates
+*/
 void GS_draw_X(int id, float *pt)
 {
     geosurf *gs;
@@ -1031,11 +1057,20 @@
     return (1);
 }
 
-/***********************************************************************/
-/* prints "NULL" or the value (i.e., "921.5") to valstr
-*  returns -1 if point outside of window or masked, otherwise 1
-*  Colors are translated to rgb and returned as Rxxx Gxxx Bxxx
-*  Usually call after GS_get_selected_point_on_surface
+/*!
+  \brief Colors are translated to rgb and returned as Rxxx Gxxx Bxxx
+
+  Colors are translated to rgb and returned as Rxxx Gxxx Bxxx
+  Usually call after GS_get_selected_point_on_surface
+  
+  Prints "NULL" or the value (i.e., "921.5") to valstr
+
+  Usually call after GS_get_selected_point_on_surface()
+
+  \param ADD
+
+  \return -1 if point outside of window or masked
+  \return 1
 */
 int GS_get_val_at_xy(int id, int att, char *valstr, float x, float y)
 {
@@ -2024,7 +2059,11 @@
     return (-1);
 }
 
-/***********************************************************************/
+/*!
+  Get Z extents for all loaded surfaces, treating zeros as "no data"
+
+  \param ADD
+*/
 void GS_get_zrange_nz(float *min, float *max)
 {
     int i, first = 1;
@@ -2115,7 +2154,11 @@
     return ((unsigned int) Gd.bgcol);
 }
 
-/***********************************************************************/
+/*!
+  \brief Sets which buffer to draw to
+
+  \param where GSD_BOTH, GSD_FRONT, GSD_BACK
+*/
 void GS_set_draw(int where)
 {
     Buffermode = where;
@@ -2304,8 +2347,13 @@
     return;
 }
 
-/***********************************************************************/
-/* for a single surface */
+/*!
+  \brief Get Z extents for a single surface
+
+  \param ADD
+
+  \return ADD
+*/
 int GS_get_zextents(int id, float *min, float *max, float *mid)
 {
     geosurf *gs;
@@ -2323,8 +2371,13 @@
     return (gs_get_zextents(gs, min, max, mid));
 }
 
-/***********************************************************************/
-/* for all surfaces */
+/*!
+  \brief Get Z extents for all loaded surfaces
+
+  \param ADD
+
+  \return ADD
+*/
 int GS_get_zrange(float *min, float *max, int doexag)
 {
     int ret_surf, ret_vol;
@@ -2465,7 +2518,11 @@
     return;
 }
 
-/***********************************************************************/
+/*!
+  \brief ADD
+
+  \return field of view, in 10ths of degrees
+*/
 int GS_get_fov(void)
 {
     return (Gv.fov);
@@ -2477,8 +2534,11 @@
     return (Gv.twist);
 }
 
-/***********************************************************************/
-/* 10ths of degrees off twelve o'clock */
+/*!
+  \brief 10ths of degrees off twelve o'clock (?)
+  
+  \params tenths of degrees clockwise from 12:00.
+*/
 void GS_set_twist(int t)
 {
     Gv.twist = t;
@@ -2536,10 +2596,19 @@
     return;
 }
 
-/************************************************************************/
-/* Send screen coords sx & sy, lib traces through surfaces & sets new center
-to point of nearest intersection.  If no intersection, uses line of
-sight with length of current view ray (eye to center) to set new center */
+/*!
+  \brief Send screen coords sx and sy, lib traces through surfaces; sets
+  new center to point of nearest intersection.
+
+  If no intersection, uses line of sight with length of current view
+  ray (eye to center) to set new center.
+
+  Reset center of view to screen coordinates sx, sy.
+
+  \param sx,sy screen coordinates
+
+  \return ADD
+*/
 int GS_look_here(int sx, int sy)
 {
     float x, y, z, len, los[2][3];
@@ -2575,7 +2644,18 @@
     return (0);
 }
 
-/************************************************************************/
+/*!
+  \brief Get selected point of surface
+
+  Given screen coordinates sx and sy, find closest intersection of
+  view ray with surfaces and return coordinates of intersection in x, y,
+  z, and identifier of surface in id.
+
+  \param ADD
+
+  \returns 0 if no intersections found
+  \return number of intersections
+*/
 int GS_get_selected_point_on_surface(int sx, int sy, int *id, float *x,
 				     float *y, float *z)
 {
@@ -2751,10 +2831,15 @@
     return gsd_getfc();
 }
 
-/************************************************************************/
-/* measure distance "as the ball rolls" between two points on surface
-   returns 0 on error or if one or more points is not in region,
-   returns 1 on success.
+/*!
+  \brief Measure distance "as the ball rolls" between two points on surface
+
+  returns distance following terrain.
+
+  \param  ADD
+
+  \return on error or if one or more points is not in region,
+  \return 1 on success.
 */
 int GS_get_distance_alongsurf(int hs, float x1, float y1, float x2, float y2,
 			      float *dist, int use_exag)

Modified: grass/branches/develbranch_6/lib/ogsf/GS_util.c
===================================================================
--- grass/branches/develbranch_6/lib/ogsf/GS_util.c	2008-05-06 20:47:18 UTC (rev 31270)
+++ grass/branches/develbranch_6/lib/ogsf/GS_util.c	2008-05-06 21:11:05 UTC (rev 31271)
@@ -1,12 +1,20 @@
-/*
-* $Id$
+/*!
+  \file GS_util.c
+ 
+  \brief OGSF library - loading and manipulating surfaces
+ 
+  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, GMSL/University of Illinois
 */
 
-/*  gs_util.c
-    Bill Brown, USACERL  
-    January 1993
-*/
-
 #include <stdlib.h>
 #include <stdio.h>
 #include <math.h>
@@ -14,7 +22,35 @@
 
 #include <grass/gstypes.h>
 
-/************************************************************************/
+/*!
+  \brief Calculate distance between 2 coordinates
+
+  Units is one of:
+   - "meters",
+   - "miles",
+   - "kilometers",
+   - "feet",
+   - "yards",
+   - "nmiles" (nautical miles),
+   - "rods",
+   - "inches",
+   - "centimeters",
+   - "millimeters",
+   - "micron",
+   - "nanometers",
+   - "cubits",
+   - "hands",
+   - "furlongs",
+   - "chains"
+
+  Default is meters.
+
+  \param from starting point
+  \param to ending point
+  \param units map units
+
+  \return distance between two geographic coordinates in current projection
+*/
 double GS_geodistance(double *from, double *to, char *units)
 {
     double meters;
@@ -160,8 +196,11 @@
     return;
 }
 
-/************************************************************************/
-/* Changes v1 so that it is a unit vector */
+/*!
+  \brief Change v1 so that it is a unit vector
+
+  \param v1 vector
+*/
 int GS_v3norm(float *v1)
 {
     float n;
@@ -197,8 +236,14 @@
     return (1);
 }
 
-/************************************************************************/
-/* Changes v1 so that it is a unit vector */
+/*!
+  \brief Changes v1 so that it is a unit vector
+
+  \param dv1 vector
+
+  \return 0
+  \return 1
+*/
 int GS_dv3norm(double *dv1)
 {
     double n;
@@ -217,8 +262,14 @@
 }
 
 
-/************************************************************************/
-/* Changes v2 so that v1v2 is a unit vector */
+/*!
+  \brief Change v2 so that v1v2 is a unit vector
+
+  \param v1 first vector
+  \param v2 second vector
+
+  \return ADD
+*/
 int GS_v3normalize(float *v1, float *v2)
 {
     float n, dx, dy, dz;

Modified: grass/branches/develbranch_6/lib/ogsf/GV2.c
===================================================================
--- grass/branches/develbranch_6/lib/ogsf/GV2.c	2008-05-06 20:47:18 UTC (rev 31270)
+++ grass/branches/develbranch_6/lib/ogsf/GV2.c	2008-05-06 21:11:05 UTC (rev 31271)
@@ -1,12 +1,20 @@
-/*
-* $Id$
+/*!
+  \file GV2.c
+ 
+  \brief OGSF library - loading and manipulating vector sets
+ 
+  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, GMSL/University of Illinois
 */
 
-/*  GV.c 
-    Bill Brown, USACERL  
-    October 1993
-*/
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -74,8 +82,15 @@
     return (gv_num_vects());
 }
 
-/***********************************************************************/
-/* USER must free!! */
+/*!
+  \brief Get list of vector sets
+
+  Must free when no longer needed!
+
+  \param numvects number of vector sets
+
+  \return ADD
+*/
 int *GV_get_vect_list(int *numvects)
 {
     int i, *ret;
@@ -248,7 +263,14 @@
     return (-1);
 }
 
-/***********************************************************************/
+/*!
+  \brief Select surface identified by hs to have vector identified
+  by hv draped over it
+
+  \param ADD
+
+  \return ADD
+*/
 int GV_select_surf(int hv, int hs)
 {
     geovect *gv;

Modified: grass/branches/develbranch_6/lib/ogsf/ogsflib.dox
===================================================================
--- grass/branches/develbranch_6/lib/ogsf/ogsflib.dox	2008-05-06 20:47:18 UTC (rev 31270)
+++ grass/branches/develbranch_6/lib/ogsf/ogsflib.dox	2008-05-06 21:11:05 UTC (rev 31271)
@@ -2,11 +2,13 @@
 <!-- doxygenized from "GRASS 5 Programmer's Manual" 
      by M. Neteler 2/2004
   -->
-<title>GRASS openGL gsurf OGSF Library</title>
 
-\section ogsfintro OGSF Library for OpenGL programming (gsurf) 
+by GRASS Development Team
 
+http://grass.osgeo.org
 
+\section ogsfintro OGSF Library for OpenGL programming (gsurf) 
+
 <P>
 Author: Bill Brown GMSL/University of Illinois
 
@@ -21,12 +23,12 @@
 drawing various style "fences" on clipping planes when drawing
 multiple surfaces, and treats datasets as objects which can be used
 for various attributes of the rendering.  It allows data sharing
-(e.g., same data for more than one attribute of same or different
+(%e.g., same data for more than one attribute of same or different
 surfaces) , separate masking for each surface, multiple surfaces,
-vector sets, or point sets, and will also allow multiple volumes.  The
+%vector sets, or %point sets, and will also allow multiple volumes.  The
 library provides all query features such as 3D "point on surface",
 keyframe animation routines, and full state saving functionality.
-Database-specific routines for interfacing with the GRASS GISlib are
+Database-specific routines for interfacing with the \ref gislib are
 kept isolated for easier library reuse with other databases.  The
 gsurf library is not dependent upon any particular interface library,
 and has been used successfully with both Motif and Tcl/Tk. It is used
@@ -35,40 +37,32 @@
 <P>
 The library is designed to provide a unique "handle" or identifier
 number to the calling program for each new geographic object added to
-the model.  The object could be a surface, vector set, or point set,
+the model.  The object could be a surface, %vector set, or %point set,
 which could each be defined by one or more database files.  Once
 created, the application only needs to keep track of the "handles" to
 the objects (which are returned by the creation routines) ; for
 example, to draw a surface the application would make the call:
-<BR>
-<P>
+
 GS_draw_surf(id) 
-<BR>
-<P>
-where <I>id</I> is the handle number.  To associate a vector set with
-a surface and then draw all surfaces with the vector set draped over
+
+where <I>id</I> is the handle number.  To associate a %vector set with
+a surface and then draw all surfaces with the %vector set draped over
 the one selected, the application would use the calls:
-<BR>
-<P>
+
 GV_select_surf(vid, sid) 
-<BR>
-<P>
+
 GS_alldraw_surf()  
-<BR>
-<P>
+
 GV_draw_vect(vid) 
-<BR>
-<P>
-where <I>vid</I> and <I>sid</I> are the handles for the vector set and
+
+where <I>vid</I> and <I>sid</I> are the handles for the %vector set and
 surface.  Similarly, to query or change attributes of the object, the
 handle is used in conjunction with the new attribute, as in:
 
 GV_set_vectmode(id, mem, color, width)
 
-
 \subsection Naming_Conventions Naming Conventions
 
-<P>
 The following naming conventions for function prefixes are used:
 
 <UL>
@@ -79,15 +73,15 @@
 </LI>
 <LI><B>GSU_</B>
         Utility functions for distance calculations, common 2D &amp; 3D
-        unit vector operations such as cross product or vector arithmetic.
+        unit %vector operations such as cross product or %vector arithmetic.
 </LI>
 <LI><B>GV_</B>
         Functions which have to do with loading &amp; manipulating
-        vector sets. 
+        %vector sets. 
 </LI>
 <LI><B>GP_</B>
         Functions which have to do with loading &amp; manipulating
-        point sets. 
+        %point sets. 
 </LI>
 <LI><B>GVL_</B>
         Functions which have to do with loading &amp; manipulating 3D
@@ -109,780 +103,438 @@
 <UL>
 <LI>public function prototypes
 </LI>
-<LI>public include file gsurf.h
+<LI>public include file include/gsurf.h
 </LI>
-<LI>public include file keyframe.h
+<LI>public include file include/keyframe.h
 </LI>
 <LI>public color packing utility macros rgbpack.h
 </LI>
-<LI>private types and defines gstypes.h
+<LI>private types and defines include/gstypes.h
 </LI>
 <LI>private utilities gsget.h
 </LI>
 </UL>
 
-<P>
+\section Public_function_prototypes_for_gsurf_Library Public function prototypes
 
-\section Public_function_prototypes Public function prototypes
-
-\subsection Function_Prototypes_for_gsurf_Library Function Prototypes
-      for gsurf Library 
-
 \subsection gs_init Initialization and positioning (GS)
 
 Functions which have to do with loading &amp; manipulating surfaces.
 Also functions for library initialization, setting global variables,
 viewer positioning, and lighting.
 
-<P>
-void *GS_Get_ClientData(int id) 
+GS_Get_ClientData()
 
-<P>
-float GS_P2distance (float *from, float *to) 
+GS_P2distance () 
 
-<P>
-GS_Set_ClientData(int id, void *clientd) 
+GS_Set_ClientData() 
 
-<P>
 GS_alldraw_cplane_fences() 
 
-<P>
 GS_alldraw_surf() 
 
-<P>
 GS_alldraw_wire() 
 
-<P>
 GS_background_color() 
 
-<P>
-int GS_check_cancel() 
+GS_check_cancel() 
 
-<P>
 GS_clear(int col) 
 
-<P>
 GS_default_draw_color() 
 
-<P>
 GS_delete_surface(int id) 
 
-<P>
-GS_distance (float *from, *to) 
+GS_distance () 
 
-<P>
 GS_done_draw() 
 
-<P>
-int GS_draw_X(int id, float *pt) pt only has to have an X &amp; Y value
-  in true world coordinates
+GS_draw_X()
 
-<P>
-GS_draw_cplane(int num) 
+GS_draw_cplane() 
 
-<P>
-GS_draw_cplane_fence(int hs1, int hs2, int num) 
+GS_draw_cplane_fence() 
 
-<P>
 GS_draw_lighting_model() 
 
-<P>
-GS_draw_line_onsurf(int id, float x1, float y1, float x2, float y2) 
+GS_draw_line_onsurf() 
 
-<P>
 GS_draw_surf(int id) 
 
-<P>
 GS_draw_wire(int id) 
 
-<P>
-int GS_dv3norm(double dv1[3]) 
+GS_dv3norm() 
 
-Changes dv1 so that it is a unit vector
+GS_geodistance()
 
-<P>
-double GS_geodistance(double *from, double *to, char
-  *units) distance between 2 coordinates
+GS_get_SDscale() 
 
-Returns distance between two geographic coordinates in current
-projection.
+GS_get_SDsurf() 
 
-<P>
-Units is one of:
-    "meters",
-    "miles",
-    "kilometers",
-    "feet",
-    "yards",
-    "nmiles" (nautical miles),
-    "rods",
-    "inches",
-    "centimeters",
-    "millimeters",
-    "micron",
-    "nanometers",
-    "cubits",
-    "hands",
-    "furlongs",
-    "chains".
+GS_get_aspect() 
 
-<P>
-Default is meters.
+GS_get_att() 
 
-<P>
-GS_get_SDscale(float *scale) 
+GS_get_cat_at_xy() 
 
-<P>
-GS_get_SDsurf(int id) 
+GS_get_dims() 
 
-<P>
-double GS_get_aspect() 
+GS_get_distance_alongsurf()
 
-<P>
-GS_get_att(int id, int att, int *set, float *constant, char *mapname) 
+GS_get_drawmode() 
 
-<P>
-GS_get_cat_at_xy(int id, int att, char *catstr, float x, float y) 
+GS_get_drawres() 
 
-<P>
-GS_get_dims(int id, int *rows, int *cols) 
+GS_get_exag_guess() 
 
-<P>
-int GS_get_distance_alongsurf(int hs, int use_exag, float x1, float
-  y1, float x2, float y2, float *dist) Returns distance following terrain.
+GS_get_fencecolor() 
 
-<P>
-GS_get_drawmode(int id, int mode) 
+GS_get_focus() 
 
-<P>
-GS_get_drawres(int id, int *xres, int *yres, int *xwire, int *ywire) 
+GS_get_fov()
 
-<P>
-GS_get_exag_guess(int id, float *exag) 
+GS_get_from() 
 
-<P>
-int GS_get_fencecolor() 
+GS_get_from_real() 
 
-<P>
-GS_get_focus(float *realto) 
+GS_get_longdim() 
 
-<P>
-int GS_get_fov() Returns field of view, in 10ths of degrees.
+GS_get_maskmode() 
 
-<P>
-GS_get_from(float *fr) 
+GS_get_modelposition() 
 
-<P>
-GS_get_from_real(float *fr) 
+GS_get_nozero() 
 
-<P>
-GS_get_longdim(float *dim) 
+GS_get_region() 
 
-<P>
-GS_get_maskmode(int id, int mode) 
+GS_get_scale() 
 
-<P>
-int GS_get_modelposition(float *siz, float pos[3]) 
+GS_get_selected_point_on_surface()
 
-Retrieves coordinates for lighting model position, at center of view,
-(nearclip * 2) from eye.
+GS_get_surf_list() 
 
-<P>
-GS_get_nozero(int id, int att, int *mode) 
+GS_get_to() 
 
-<P>
-GS_get_region(float *n, float *s, float *w, float *e) 
+GS_get_trans() 
 
-<P>
-GS_get_scale(float *sx, float *sy, float *sz, int doexag) 
+GS_get_twist() 
 
-<P>
-int GS_get_selected_point_on_surface(int sx, int sy, int *id, float
-  *x, float *y, float *z) 
+GS_get_val_at_xy()
 
-Given screen coordinates sx &amp; sy, find closest intersection of
-view ray with surfaces and return coordinates of intersection in x, y,
-z, and identifier of surface in id.
+GS_get_viewdir() 
 
-<P>
-Returns 0 if no intersections found, otherwise number of intersections.
+GS_get_wire_color() 
 
-<P>
-GS_get_surf_list(int *numsurfs) 
+GS_get_zextents()
 
-<P>
-GS_get_to(float *to) 
+GS_get_zrange()
 
-<P>
-GS_get_trans(int id, float *xtrans, float *ytrans, float *ztrans) 
+GS_get_zrange_nz()
 
-<P>
-int GS_get_twist() 
+GS_global_exag() 
 
-<P>
-int GS_get_val_at_xy(int id, char *att, char *valstr, float x, float
-  y) Prints "NULL" or the value (i.e., "921.5")  to valstr.
+GS_has_transparency() 
 
-<P>
-Colors are translated to rgb and returned as Rxxx Gxxx Bxxx
-
-<P>
-Usually call after GS_get_selected_point_on_surface
-
-<P>
-Returns -1 if point outside of window or masked, otherwise 1
-
-<P>
-GS_get_viewdir(float dir[3]) 
-
-<P>
-GS_get_wire_color(int id, int *colr) 
-
-<P>
-int GS_get_zextents(int id, float *min, float *max, float
-  *mid) Returns Z extents for a single surface.
-
-<P>
-int GS_get_zrange(float *min, float *max, int doexag) Returns Z
-  extents for all loaded surfaces.
-
-<P>
-int GS_get_zrange_nz(float *min, float *max) Returns Z extents for
-    all loaded surfaces, treating zeros as "no data".
-
-<P>
-float GS_global_exag() 
-
-<P>
-int GS_has_transparency() 
-
-<P>
 GS_init_view() 
 
-<P>
-GS_is_masked(int id, float *pt) 
+GS_is_masked() 
 
-<P>
 GS_libinit() 
 
-<P>
 GS_lights_off() 
 
-<P>
 GS_lights_on() 
 
-<P>
-GS_load_3dview(char *vname, int surfid) 
+GS_load_3dview() 
 
-<P>
-GS_load_att_map(int id, char *filename, int att)  
+GS_load_att_map()  
 
-<P>
-int GS_look_here(int sx, int sy) Reset center of view to screen
-coordinates sx, sy.
+GS_look_here()
 
-<P>
-Send screen coords sx &amp; sy, lib traces through surfaces &amp; sets
-new center to point of nearest intersection.  If no intersection, uses
-line of sight with length of current view ray (eye to center) to set
-new center.
+GS_moveto() 
 
-<P>
-GS_moveto(float *pt) 
+GS_moveto_real() 
 
-<P>
-GS_moveto_real(float *pt) 
+GS_new_light() 
 
-<P>
-int GS_new_light() 
-
-<P>
 GS_new_surface() 
 
-<P>
-int GS_num_surfs() 
+GS_num_surfs() 
 
-<P>
 GS_ready_draw() 
 
-<P>
-GS_save_3dview(char *vname, int surfid) 
+GS_save_3dview() 
 
-<P>
-GS_set_SDscale(float scale) 
+GS_set_SDscale() 
 
-<P>
-GS_set_SDsurf(int id) 
+GS_set_SDsurf() 
 
-<P>
-GS_set_att_const(int id, int  att, float constant) 
+GS_set_att_const() 
 
-<P>
-GS_set_att_defaults(float defs[MAX_ATTS], null_defs[MAX_ATTS]) 
+GS_set_att_defaults() 
 
-<P>
-GS_set_cancel(int c) 
+GS_set_cancel() 
 
-<P>
-GS_set_cplane(int num) 
+GS_set_cplane() 
 
-<P>
-GS_set_cplane_rot(int num, float dx, float dy, float dz) 
+GS_set_cplane_rot() 
 
-<P>
-GS_set_cplane_trans(int num, float dx, float dy, float dz) 
+GS_set_cplane_trans()
 
-<P>
-GS_set_cxl_func(void (*f) () ) 
+GS_set_cxl_func()
 
-<P>
-int GS_set_draw(int where) Sets which buffer to draw to.
+GS_set_draw()
 
-<P>
-where should be one of: GSD_BOTH, GSD_FRONT, GSD_BACK
+GS_set_drawmode() 
 
-<P>
-GS_set_drawmode(int id, int mode) 
+GS_set_drawres() 
 
-<P>
-GS_set_drawres(int id, int xres, int yres, int xwire, int ywire) 
+GS_set_exag() 
 
-<P>
-GS_set_exag(int id, float exag) 
+GS_set_fencecolor() 
 
-<P>
-GS_set_fencecolor(int mode) 
+GS_set_focus() 
 
-<P>
-GS_set_focus(float *realto) 
+GS_set_focus_center_map() 
 
-<P>
-GS_set_focus_center_map(int id) 
+GS_set_fov() 
 
-<P>
-GS_set_fov(int fov) 
+GS_set_global_exag() 
 
-<P>
-GS_set_global_exag(float exag) 
+GS_set_maskmode() 
 
-<P>
-GS_set_maskmode(int id, int mode) 
-
-<P>
 GS_set_nofocus() 
 
-<P>
-GS_set_nozero(int id, int att, int mode) 
+GS_set_nozero() 
 
-<P>
-GS_set_swap_func(void (*f) () ) 
+GS_set_swap_func() 
 
-<P>
-GS_set_trans(int id, float xtrans, float ytrans, float ztrans) 
+GS_set_trans() 
 
-<P>
-int GS_set_twist(int t) t is tenths of degrees clockwise from 12:00.
+GS_set_twist()
 
-<P>
-GS_set_viewdir(float dir[3]) 
+GS_set_viewdir() 
 
-<P>
-GS_set_viewport(int left, int right, int bottom, int top) 
+GS_set_viewport() 
 
-<P>
 GS_set_wire_color(int id, int colr) 
 
-<P>
 GS_setall_drawmode(int mode) 
 
-<P>
-GS_setall_drawres(int xres, int yres, int xwire, int ywire) 
+GS_setall_drawres()
 
-<P>
-int GS_setlight_ambient(int num, float red, float green, float
-  blue) Red, green, blue from 0.0 to 1.0
+GS_setlight_ambient()
 
-<P>
-int GS_setlight_color(int num, float red, float green, float
-  blue) Red, green, blue from 0.0 to 1.0
+GS_setlight_color()
 
-<P>
-GS_setlight_position(int num, float xpos, float ypos, float zpos, int
-local) 
+GS_setlight_position()
 
-<P>
-GS_surf_exists(int id) 
+GS_surf_exists()
 
-<P>
-GS_switchlight(int num, int on) 
+GS_switchlight()
 
-<P>
 GS_transp_is_set() 
 
-<P>
 GS_unset_SDsurf() 
 
-<P>
-GS_unset_att(int id, int att) 
+GS_unset_att()
 
-<P>
-GS_unset_cplane(int num) 
+GS_unset_cplane()
 
-<P>
-GS_update_curmask(int id) 
+GS_update_curmask()
 
-<P>
-GS_update_normals(int id) 
+GS_update_normals()
 
-<P>
-GS_v2dir(float v1[2], float v2[2], float v3[2]) 
+GS_v2dir()
 
-<P>
-GS_v3add(float v1[3], float v2[3]) 
+GS_v3add()
 
-<P>
-int GS_v3cross(float v1[3], float v2[3], float v3[3]) returns the
-  cross product v3 = v1 cross v2
+GS_v3cross()
 
-<P>
-GS_v3dir(float v1[3], float v2[3], float v3[3) 
+GS_v3dir()
 
-<P>
-GS_v3eq(float v1[3], float v2[3]) 
+GS_v3eq()
 
-<P>
-GS_v3mag(float v1[3], float *mag) 
+GS_v3mag()
 
-<P>
-int GS_v3mult(float v1[3], float k) v1 *= k
+GS_v3mult()
 
-<P>
-int GS_v3norm(float v1[3]) Changes v1 so that it is a unit vector
+GS_v3norm()
 
-<P>
-int GS_v3normalize(float v1[3], float v2[3]) Changes v2 so that v1v2 is a
-unit vector
+GS_v3normalize()
 
-<P>
-int GS_v3sub(float v1[3], float v2[3]) v1 -= v2
+GS_v3sub()
 
-
 \subsection gv_vect Loading and manipulation of vector maps (GV)
 
-Functions which have to do with loading &amp; manipulating vector
+Functions which have to do with loading &amp; manipulating %vector
 sets.
-<P>
-void *GV_Get_ClientData(int id) 
 
-<P>
-GV_Set_ClientData(int id, int clientd) 
+GV_Get_ClientData() 
 
-<P>
+GV_Set_ClientData()
+
 GV_alldraw_vect() 
 
-<P>
-GV_delete_vector(int id) 
+GV_delete_vector()
 
-<P>
-GV_draw_fastvect(int vid) 
+GV_draw_fastvect()
 
-<P>
-GV_draw_vect(int vid) 
+GV_draw_vect()
 
-<P>
-GV_get_trans(int  id, float *xtrans, float *ytrans, float *ztrans) 
+GV_get_trans()
 
-<P>
-int *GV_get_vect_list(int *numvects) USER must free when no longer needed!
+GV_get_vect_list()
 
-<P>
-GV_get_vectmode(int id, int *mem, int *color, int *width) 
+GV_get_vectmode()
 
-<P>
-GV_get_vectname(int id, char *filename) 
+GV_get_vectname()
 
-<P>
-GV_load_vector(int id, char *filename) 
+GV_load_vector()
 
-<P>
-int GV_new_vector() 
+GV_new_vector() 
 
-<P>
-int GV_num_vects() 
+GV_num_vects() 
 
-<P>
-int GV_select_surf(int hv, int hs) Select surface identified by hs
-  to have vector identified by hv draped over it.
+GV_select_surf()
 
-<P>
-GV_set_trans(int id, float xtrans, float ytrans, float ztrans) 
+GV_set_trans()
 
-<P>
-GV_set_vectmode(int id, int mem, int color, int width) 
+GV_set_vectmode()
 
-<P>
-GV_surf_is_selected(int hv, int hs) 
+GV_surf_is_selected()
 
-<P>
-GV_unselect_surf(int hv, int hs) 
+GV_unselect_surf()
 
-<P>
-GV_vect_exists(int id) 
+GV_vect_exists()
 
-
 \subsection gp_points Loading and manipulation of point maps (GP)
 
-Functions which have to do with loading &amp; manipulating point sets.
+Functions which have to do with loading &amp; manipulating %point sets.
 
-<P>
-void *GP_Get_ClientData(int id) 
+GP_Get_ClientData()
 
-<P>
-GP_Set_ClientData(int id, void *clientd) 
+GP_Set_ClientData()
 
-<P>
 GP_alldraw_site() 
 
-<P>
-GP_attmode_color(int id, char *filename) 
+GP_attmode_color()
 
-<P>
-GP_attmode_none(int id) 
+GP_attmode_none()
 
-<P>
-GP_delete_site(int id) 
+GP_delete_site()
 
-<P>
-GP_draw_site(int id) 
+GP_draw_site()
 
-<P>
-int *GP_get_site_list(int *numsites) USER must free when no
-  longer needed!
+GP_get_site_list()
 
-<P>
-GP_get_sitemode(int id, int *atmod, int *color, int *width, float *size,
-int *marker) 
+GP_get_sitemode()
 
-<P>
-GP_get_sitename(int id, char *filename) 
+GP_get_sitename()
 
-<P>
-GP_get_trans(int id, float *xtrans, float *ytrans, float *ztrans) 
+GP_get_trans()
 
-<P>
-GP_get_zmode(int id, int *use_z) 
+GP_get_zmode()
 
-<P>
-GP_load_site(int id, char *filename) 
+GP_load_site()
 
-<P>
-int GP_new_site() 
+GP_new_site() 
 
-<P>
-int GP_num_sites() 
+GP_num_sites() 
 
-<P>
-GP_select_surf(int hp, int hs) 
+GP_select_surf()
 
-<P>
-GP_set_sitemode(int id, int atmod, int color, int width, float size, int
-marker) 
+GP_set_sitemode()
 
-<P>
-GP_set_trans(int id, float *xtrans, float *ytrans, float *ztrans) 
+GP_set_trans()
 
-<P>
-GP_set_zmode(int id, int use_z) 
+GP_set_zmode()
 
-<P>
-GP_site_exists(int id) 
+GP_site_exists()
 
-<P>
-GP_surf_is_selected(int hp, int hs) 
+GP_surf_is_selected()
 
-<P>
-GP_unselect_surf(int hp, int hs) 
+GP_unselect_surf()
 
-
 \subsection gk_keyframes Keyframe animation
 
 Functions which have to do with setting &amp; manipulating keyframes
 for viewer position animation (fly-bys).
 
-<P>
-int GK_add_key(float pos, unsigned long fmask, int force_replace,
-float precis) 
+GK_add_key()
 
-The pos value is the relative position in the animation for this
-particular keyframe - used to compare relative distance to neighboring
-keyframes, it can be any floating point value.
+GK_clear_keys()
 
-<P>
-The fmask value can be any of the following or'd together:    
-    KF_FROMX_MASK    
-    KF_FROMY_MASK    
-    KF_FROMZ_MASK    
-    KF_FROM_MASK (KF_FROMX_MASK | KF_FROMY_MASK | KF_FROMZ_MASK) 
+GK_delete_key()
 
-<P>
-KF_DIRX_MASK    
-    KF_DIRY_MASK    
-    KF_DIRZ_MASK    
-    KF_DIR_MASK (KF_DIRX_MASK | KF_DIRY_MASK | KF_DIRZ_MASK) 
+GK_do_framestep()
 
-<P>
-KF_FOV_MASK    
-    KF_TWIST_MASK    
-<P>
-KF_ALL_MASK (KF_FROM_MASK | KF_DIR_MASK | KF_FOV_MASK | KF_TWIST_MASK) 
+GK_move_key()
 
-<P>
-Other fields will be added later.
+GK_set_interpmode()
 
-<P>
-The value precis and the boolean force_replace are used to determine
-if a keyframe should be considered to be at the same position as a
-pre-existing keyframe. e.g., if anykey.pos - newkey.pos &lt;= precis,
-GK_add_key() will fail unless force_replace is TRUE.
+GK_set_numsteps()
 
-<P>
-Returns 1 if key is added, otherwise -1.
+GK_set_tension()
 
+GK_show_path()
 
-<P>
-void GK_clear_keys() Deletes all keyframes, resets field masks.
-  Doesn't change number of frames requested.
+GK_show_site() 
 
-<P>
-int GK_delete_key(float pos, float precis, int justone) 
+GK_show_vect() 
 
-The values pos &amp; precis are used to determine which keyframes to
-delete.  Any keyframes with their position within precis of pos will
-be deleted if justone is zero.  If justone is non-zero, only the first
-(lowest pos) keyframe in the range will be deleted.
+GK_showtension_start() 
 
-<P>
-Returns number of keys deleted.
+GK_showtension_stop()
 
+GK_update_frames()
 
-<P>
-int GK_do_framestep(int step, int render) 
+GK_update_tension() 
 
-Moves the animation to frame number "step".  Step should be a value
-between 1 and the number of frames.  If render is non-zero, calls
-draw_all.
-
-<P>
-int GK_move_key(float oldpos, float precis, float newpos) 
-
-Precis works as in other functions - to identify keyframe to move.
-Only the first keyframe in the precis range will be moved.
-
-<P>
-Returns number of keys moved (1 or 0) .
-
-
-<P>
-int GK_set_interpmode(int mode) Sets interpolation mode to
-  KF_LINEAR or KF_SPLINE
-
-<P>
-void GK_set_numsteps(int newsteps) Sets the number of frames to be
-  interpolated from keyframes.
-
-<P>
-int GK_set_tension(float tens) Sets value for tension when interpmode
-is KF_SPLINE.  The value tens should be between 0.0 &amp; 1.0.
-
-<P>
-void GK_show_path(int flag) Draws the current path.
-
-<P>
-GK_show_site(int flag) 
-
-<P>
-GK_show_vect(int flag) 
-
-<P>
-void GK_showtension_start() 
-
-<P>
-void GK_showtension_stop() Use
-GK_showtension_start/GK_update_tension/GK_showtension_stop to
-initialize &amp; stop multi-view display of path when changing
-tension.
-
-<P>
-void GK_update_frames() Recalculates path using the current number of
-frames requested.  Call after changing number of frames or when
-Keyframes change.
-
-<P>
-void GK_update_tension() 
-
 \subsection gvl_volume  Loading and manipulation of volume maps (GVL)
 
 Functions which have to do with loading &amp; manipulating 3D volumes.
 
-<P>
-void *GVL_Get_ClientData(int id) 
+GVL_Get_ClientData()
 
-<P>
-GVL_Set_ClientData(int id, void *clientd) 
+GVL_Set_ClientData()
 
-<P>
 GVL_alldraw_vol() 
 
-<P>
-GVL_delete_volume(int id) 
+GVL_delete_volume()
 
-<P>
-GVL_draw_fastvol(int vid) 
+GVL_draw_fastvol()
 
-<P>
-GVL_draw_vol(int vid) 
+GVL_draw_vol()
 
-<P>
-GVL_get_trans(int id, float *xtrans, float *ytrans, float *ztrans) 
+GVL_get_trans()
 
-<P>
-int *GVL_get_vol_list(int *numvols) 
+GVL_get_vol_list()
 
-<P>
-GVL_get_volmode(int id, int *viztype) 
+GVL_get_volmode()
 
-<P>
-GVL_get_volname(int id, char *filename) 
+GVL_get_volname()
 
-<P>
-GVL_load_volume(int id, char *filename) 
+GVL_load_volume()
 
-<P>
-int GVL_new_vol() 
+GVL_new_vol() 
 
-<P>
-int GVL_num_vol() 
+GVL_num_vol() 
 
-<P>
-GVL_set_trans(int id, float xtrans, float ytrans, float ztrans) 
+GVL_set_trans()
 
-<P>
-GVL_set_volmode(int id, int viztype) 
+GVL_set_volmode()
 
-<P>
-int GVL_vol_exists(int id) 
+GVL_vol_exists()
 
-<P>
-
-
 \subsection gsurf_h Public include file gsurf.h
 
-See lib/ogsf/gsurf.h
+See include/gsurf.h
 
 
 \subsection keyframe_h Public include file keyframe.h
 
-See lib/ogsf/keyframe.h
+See include/keyframe.h
 
 
 \subsection rgbpack_h Public color packing utility macros rgbpack.h
@@ -892,7 +544,7 @@
 
 \subsection gstypes_h Private types and defines gstypes.h
 
-See lib/ogsf/gstypes.h
+See include/gstypes.h
 
 
 \subsection gsget_h Private utilities gsget.h



More information about the grass-commit mailing list