GRASS GIS 7 Programmer's Manual  7.9.dev(2021)-e5379bbd7
defs/ogsf.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int GK_set_interpmode (int)
 Set interpolation mode. More...
 
void GK_set_tension (float)
 Set value for tension when interpmode is KF_SPLINE. More...
 
void GK_showtension_start (void)
 
void GK_showtension_stop (void)
 Show tension stop ? More...
 
void GK_update_tension (void)
 Update tension. More...
 
void GK_update_frames (void)
 Recalculate path using the current number of frames requested. More...
 
void GK_set_numsteps (int)
 Set the number of frames to be interpolated from keyframes. More...
 
void GK_clear_keys (void)
 Deletes all keyframes, resets field masks. More...
 
void GK_print_keys (const char *)
 Print keyframe info. More...
 
int GK_move_key (float, float, float)
 Move keyframe. More...
 
int GK_delete_key (float, float, int)
 
int GK_add_key (float, unsigned long, int, float)
 Add keyframe. More...
 
void GK_do_framestep (int, int)
 Moves the animation to frame number "step". More...
 
void GK_show_path (int)
 Draw the current path. More...
 
void GK_show_vect (int)
 Show vector sets. More...
 
void GK_show_site (int)
 Show point sets. More...
 
void GK_show_vol (int)
 Show volumes. More...
 
void GK_show_list (int)
 Show list. More...
 
int GP_site_exists (int)
 Check if point set exists. More...
 
int GP_new_site (void)
 Create new point set. More...
 
int GP_num_sites (void)
 Get number of loaded point sets. More...
 
int * GP_get_site_list (int *)
 Get list of point sets. More...
 
int GP_delete_site (int)
 Delete registrated point set. More...
 
int GP_load_site (int, const char *)
 Load point set from file. More...
 
int GP_get_sitename (int, char **)
 Get point set filename. More...
 
int GP_get_style (int, int *, int *, float *, int *)
 Get point set style. More...
 
int GP_set_style (int, int, int, float, int)
 Set point style. More...
 
int GP_set_style_thematic (int, int, const char *, const char *, const char *, const char *, struct Colors *)
 Set point set style for thematic mapping. More...
 
int GP_unset_style_thematic (int)
 Make style for thematic mapping inactive. More...
 
int GP_attmode_color (int, const char *)
 
int GP_attmode_none (int)
 
int GP_set_zmode (int, int)
 Set z mode for point set. More...
 
int GP_get_zmode (int, int *)
 Get z-mode. More...
 
void GP_set_trans (int, float, float, float)
 Set transformation params. More...
 
void GP_get_trans (int, float *, float *, float *)
 Get transformation params. More...
 
int GP_select_surf (int, int)
 Select surface for given point set. More...
 
int GP_unselect_surf (int, int)
 Unselect surface. More...
 
int GP_surf_is_selected (int, int)
 Check if surface is selected. More...
 
void GP_draw_site (int)
 Draw point set. More...
 
void GP_alldraw_site (void)
 Draw all available point sets. More...
 
int GP_Set_ClientData (int, void *)
 Set client data. More...
 
void * GP_Get_ClientData (int)
 Get client data. More...
 
int GP_str_to_marker (const char *)
 Determine point marker symbol for string. More...
 
void void_func (void)
 
void GS_libinit (void)
 Initialize OGSF library. More...
 
int GS_get_longdim (float *)
 Get largest dimension. More...
 
int GS_get_region (float *, float *, float *, float *)
 Get 2D region extent. More...
 
void GS_set_att_defaults (float *, float *)
 Set default attributes for map objects. More...
 
int GS_surf_exists (int)
 
int GS_new_surface (void)
 Add new surface. More...
 
int GS_new_light (void)
 Add new model light. More...
 
void GS_set_light_reset (int)
 
int GS_get_light_reset (void)
 
void GS_setlight_position (int, float, float, float, int)
 Set light position. More...
 
void GS_setlight_color (int, float, float, float)
 Set light color. More...
 
void GS_setlight_ambient (int, float, float, float)
 Set light ambient. More...
 
void GS_lights_off (void)
 Switch off all lights. More...
 
void GS_lights_on (void)
 Switch on all lights. More...
 
void GS_switchlight (int, int)
 Switch on/off light. More...
 
int GS_transp_is_set (void)
 Check if transparency is set. More...
 
void GS_get_modelposition1 (float *)
 
void GS_get_modelposition (float *, float *)
 Retrieves coordinates for lighting model position, at center of view. More...
 
void GS_draw_X (int, float *)
 Draw place marker. More...
 
void GS_set_Narrow (int *, int, float *)
 Set decoration, north arrow ?? More...
 
void GS_draw_line_onsurf (int, float, float, float, float)
 Draw line on surface. More...
 
int GS_draw_nline_onsurf (int, float, float, float, float, float *, int)
 Draw multiline on surface. More...
 
void GS_draw_flowline_at_xy (int, float, float)
 Draw flow-line on surace. More...
 
void GS_draw_lighting_model1 (void)
 Draw lighting model. More...
 
void GS_draw_lighting_model (void)
 Draw lighting model. More...
 
int GS_update_curmask (int)
 Update current mask. More...
 
int GS_is_masked (int, float *)
 Check if point is masked ? More...
 
void GS_unset_SDsurf (void)
 Unset Scaled Difference surface. More...
 
int GS_set_SDsurf (int)
 Set surface as Scaled Difference surface. More...
 
int GS_set_SDscale (float)
 Set ? More...
 
int GS_get_SDsurf (int *)
 Get ? More...
 
int GS_get_SDscale (float *)
 Get ? More...
 
int GS_update_normals (int)
 Update normals. More...
 
int GS_get_att (int, int, int *, float *, char *)
 Get attributes. More...
 
int GS_get_cat_at_xy (int, int, char *, float, float)
 Get surface category on given position. More...
 
int GS_get_norm_at_xy (int, float, float, float *)
 Get surface normal at x,y (real coordinates) More...
 
int GS_get_val_at_xy (int, int, char *, float, float)
 Get RGB color at given point. More...
 
int GS_unset_att (int, int)
 Unset attribute. More...
 
int GS_set_att_const (int, int, float)
 Set attribute constant. More...
 
int GS_set_maskmode (int, int)
 Set mask mode. More...
 
int GS_get_maskmode (int, int *)
 Get mask mode. More...
 
int GS_Set_ClientData (int, void *)
 Set client data. More...
 
void * GS_Get_ClientData (int)
 Get client data. More...
 
int GS_num_surfs (void)
 Get number of surfaces. More...
 
int * GS_get_surf_list (int *)
 Get surface list. More...
 
int GS_delete_surface (int)
 Delete surface. More...
 
int GS_load_att_map (int, const char *, int)
 Load raster map as attribute. More...
 
void GS_draw_surf (int)
 Draw surface. More...
 
void GS_draw_wire (int)
 Draw surface wire. More...
 
void GS_alldraw_wire (void)
 Draw all wires. More...
 
void GS_alldraw_surf (void)
 Draw all surfaces. More...
 
void GS_set_exag (int, float)
 Set Z exag for surface. More...
 
void GS_set_global_exag (float)
 Set global z-exag value. More...
 
float GS_global_exag (void)
 Get global z-exag value. More...
 
void GS_set_wire_color (int, int)
 Set wire color. More...
 
int GS_get_wire_color (int, int *)
 Get wire color. More...
 
int GS_setall_drawmode (int)
 Set all draw-modes. More...
 
int GS_set_drawmode (int, int)
 Set draw mode. More...
 
int GS_get_drawmode (int, int *)
 Get draw mode. More...
 
void GS_set_nozero (int, int, int)
 Set no-zero ? More...
 
int GS_get_nozero (int, int, int *)
 Get no-zero ? More...
 
int GS_setall_drawres (int, int, int, int)
 Set all draw resolutions. More...
 
int GS_set_drawres (int, int, int, int, int)
 Set draw resolution for surface. More...
 
void GS_get_drawres (int, int *, int *, int *, int *)
 Get draw resolution of surface. More...
 
void GS_get_dims (int, int *, int *)
 Get dimension of surface. More...
 
int GS_get_exag_guess (int, float *)
 Get exag-value guess. More...
 
void GS_get_zrange_nz (float *, float *)
 Get Z extents for all loaded surfaces. More...
 
void GS_set_trans (int, float, float, float)
 Set translation (surface position) More...
 
void GS_get_trans (int, float *, float *, float *)
 Get translation values (surface position) More...
 
unsigned int GS_default_draw_color (void)
 Get default draw color. More...
 
unsigned int GS_background_color (void)
 Get background color. More...
 
void GS_set_draw (int)
 Sets which buffer to draw to. More...
 
void GS_ready_draw (void)
 
void GS_done_draw (void)
 Draw done, swap buffers. More...
 
void GS_set_focus (float *)
 Set focus. More...
 
int GS_get_focus (float *)
 Get focus. More...
 
void GS_set_focus_center_map (int)
 Set focus to map center. More...
 
void GS_moveto (float *)
 Move viewpoint. More...
 
void GS_moveto_real (float *)
 Move position to (real) More...
 
void GS_set_focus_real (float *)
 Set real focus. More...
 
void GS_get_to_real (float *)
 Get 'to' real coordinates. More...
 
int GS_get_zextents (int, float *, float *, float *)
 Get z-extent for a single surface. More...
 
int GS_get_zrange (float *, float *, int)
 Get z-extent for all loaded surfaces. More...
 
void GS_get_from (float *)
 Get viewpoint 'from' position. More...
 
void GS_get_from_real (float *)
 Get viewpoint 'from' real coordinates. More...
 
void GS_get_to (float *)
 Get 'to' model coordinates. More...
 
void GS_get_viewdir (float *)
 Get viewdir. More...
 
void GS_set_viewdir (float *)
 Set viewdir. More...
 
void GS_set_fov (int)
 Set field of view. More...
 
void GS_set_rotation (double, double, double, double)
 Set rotation params. More...
 
void GS_get_rotation_matrix (double *)
 Get rotation matrix. More...
 
void GS_set_rotation_matrix (double *)
 Set rotation matrix. More...
 
void GS_init_rotation (void)
 Reset scene rotation. More...
 
void GS_unset_rotation (void)
 Stop scene rotation. More...
 
int GS_get_fov (void)
 Get fied of view. More...
 
int GS_get_twist (void)
 Get twist value. More...
 
void GS_set_twist (int)
 Set viewpoint twist value. More...
 
void GS_set_nofocus (void)
 Unset focus. More...
 
void GS_set_infocus (void)
 Set focus. More...
 
void GS_set_viewport (int, int, int, int)
 Set viewport. More...
 
int GS_look_here (int, int)
 Send screen coords sx and sy, lib traces through surfaces; sets new center to point of nearest intersection. More...
 
int GS_get_selected_point_on_surface (int, int, int *, float *, float *, float *)
 Get selected point of surface. More...
 
void GS_set_cplane_rot (int, float, float, float)
 Set cplace rotation. More...
 
void GS_set_cplane_trans (int, float, float, float)
 Set cplace trans. More...
 
void GS_draw_cplane (int)
 Draw cplace. More...
 
int GS_draw_cplane_fence (int, int, int)
 Draw cplace fence ? More...
 
void GS_alldraw_cplane_fences (void)
 Draw all cplace fences ? More...
 
void GS_set_cplane (int)
 Set cplace. More...
 
void GS_unset_cplane (int)
 Unset clip place (turn off) More...
 
void GS_get_scale (float *, float *, float *, int)
 Get axis scale. More...
 
void GS_set_fencecolor (int)
 Set fence color. More...
 
int GS_get_fencecolor (void)
 Get fence color. More...
 
int GS_get_distance_alongsurf (int, float, float, float, float, float *, int)
 Measure distance "as the ball rolls" between two points on surface. More...
 
int GS_save_3dview (const char *, int)
 Save 3d view. More...
 
int GS_load_3dview (const char *, int)
 Load 3d view. More...
 
void GS_init_view (void)
 Init viewpoint. More...
 
void GS_clear (int)
 Clear view. More...
 
double GS_get_aspect (void)
 Get aspect value. More...
 
int GS_has_transparency (void)
 Check for transparency. More...
 
void GS_zoom_setup (int *, int *, int *, int *, int *, int *)
 Get zoom setup. More...
 
int GS_write_zoom (const char *, unsigned int, unsigned int)
 Write zoom to file. More...
 
void GS_draw_all_list (void)
 Draw all glLists. More...
 
void GS_delete_list (GLuint)
 Delete pre-defined list. More...
 
int GS_draw_legend (const char *, GLuint, int, int *, float *, int *)
 Draw legend. More...
 
void GS_draw_fringe (int, unsigned long, float, int *)
 Draw fringe around data (surface) at selected corners. More...
 
void GS_getlight_position (int, float *, float *, float *, int *)
 Get light position. More...
 
void GS_getlight_color (int, float *, float *, float *)
 Get light color. More...
 
void GS_getlight_ambient (int, float *, float *, float *)
 Get light ambient. More...
 
int GS_check_cancel (void)
 Check for cancel. More...
 
void GS_set_cancel (int)
 Set cancel. More...
 
void GS_set_cxl_func (void(*)(void))
 Set cxl function. More...
 
double GS_geodistance (double *, double *, const char *)
 Calculate distance between 2 coordinates. More...
 
float GS_distance (float *, float *)
 Calculate distance. More...
 
float GS_P2distance (float *, float *)
 Calculate distance in plane. More...
 
void GS_v3eq (float *, float *)
 Copy vector values. More...
 
void GS_v3add (float *, float *)
 Sum vectors. More...
 
void GS_v3sub (float *, float *)
 Subtract vectors. More...
 
void GS_v3mult (float *, float)
 Multiple vectors. More...
 
int GS_v3norm (float *)
 Change v1 so that it is a unit vector (2D) More...
 
int GS_v2norm (float *)
 Change v1 so that it is a unit vector (3D) More...
 
int GS_dv3norm (double *)
 Changes v1 so that it is a unit vector. More...
 
int GS_v3normalize (float *, float *)
 Change v2 so that v1v2 is a unit vector. More...
 
int GS_v3dir (float *, float *, float *)
 Get a normalized direction from v1 to v2, store in v3. More...
 
void GS_v2dir (float *, float *, float *)
 Get a normalized direction from v1 to v2, store in v3 (2D) More...
 
void GS_v3cross (float *, float *, float *)
 Get the cross product v3 = v1 cross v2. More...
 
void GS_v3mag (float *, float *)
 Magnitude of vector. More...
 
int GS_coordpair_repeats (float *, float *, int)
 ADD. More...
 
int GV_vect_exists (int)
 Check if vector set exists. More...
 
int GV_new_vector (void)
 Register new vector set. More...
 
int GV_num_vects (void)
 Get number of available vector sets. More...
 
int * GV_get_vect_list (int *)
 Get list of vector sets. More...
 
int GV_delete_vector (int)
 Delete vector set from list. More...
 
int GV_load_vector (int, const char *)
 Load vector set. More...
 
int GV_get_vectname (int, char **)
 Get vector map name. More...
 
int GV_set_style (int, int, int, int, int)
 Set vector style. More...
 
int GV_get_style (int, int *, int *, int *, int *)
 Get vector style. More...
 
int GV_set_style_thematic (int, int, const char *, const char *, struct Colors *)
 Set vector set style for thematic mapping. More...
 
int GV_unset_style_thematic (int)
 Make style for thematic mapping inactive. More...
 
void GV_set_trans (int, float, float, float)
 Set trans ? More...
 
int GV_get_trans (int, float *, float *, float *)
 Get trans ? More...
 
int GV_select_surf (int, int)
 Select surface identified by hs to have vector identified by hv draped over it. More...
 
int GV_unselect_surf (int, int)
 Unselect surface. More...
 
int GV_surf_is_selected (int, int)
 Check if surface is selected. More...
 
void GV_draw_vect (int)
 Draw vector set. More...
 
void GV_alldraw_vect (void)
 Draw all loaded vector sets. More...
 
void GV_alldraw_fastvect (void)
 Draw all loaded vector sets (fast mode) More...
 
void GV_draw_fastvect (int)
 Draw vector set (fast mode) More...
 
int GV_Set_ClientData (int, void *)
 Set client data. More...
 
void * GV_Get_ClientData (int)
 Get client data. More...
 
void GVL_libinit (void)
 Library initialization for volumes. More...
 
void GVL_init_region (void)
 Initialize 3D region. More...
 
int GVL_get_region (float *, float *, float *, float *, float *, float *)
 Get region extent settings. More...
 
void * GVL_get_window ()
 Get window. More...
 
int GVL_vol_exists (int)
 Check if volume set exists. More...
 
int GVL_new_vol (void)
 Create new volume set. More...
 
int GVL_num_vols (void)
 Get number of loaded volume sets. More...
 
int * GVL_get_vol_list (int *)
 Get list of loaded volume sets. More...
 
int GVL_delete_vol (int)
 Delete volume set from list. More...
 
int GVL_load_vol (int, const char *)
 Load 3d raster map to volume set. More...
 
int GVL_get_volname (int, char *)
 Get volume set name. More...
 
void GVL_set_trans (int, float, float, float)
 Set trans ? More...
 
int GVL_get_trans (int, float *, float *, float *)
 Get trans ? More...
 
void GVL_set_draw_wire (int, int)
 Set drawing wire box. More...
 
void GVL_draw_vol (int)
 Draw volume set. More...
 
void GVL_draw_wire (int)
 Draw volume in wire mode. More...
 
void GVL_alldraw_vol (void)
 Draw all volume sets. More...
 
void GVL_alldraw_wire (void)
 Draw all volume sets in wire mode. More...
 
int GVL_Set_ClientData (int, void *)
 Set client data for volume set. More...
 
void * GVL_Get_ClientData (int)
 Get client data. More...
 
void GVL_get_dims (int, int *, int *, int *)
 Get volume dimensions. More...
 
void GVL_set_focus_center_map (int)
 Set focus on map center. More...
 
int GVL_isosurf_move_up (int, int)
 Move up isosurface in list. More...
 
int GVL_isosurf_move_down (int, int)
 Move down isosurface in list. More...
 
void GVL_isosurf_get_drawres (int, int *, int *, int *)
 Get draw resolution for isosurface. More...
 
int GVL_isosurf_set_drawres (int, int, int, int)
 Set isosurface draw resolution. More...
 
int GVL_isosurf_get_drawmode (int, int *)
 Get isosurface draw mode. More...
 
int GVL_isosurf_set_drawmode (int, int)
 Set isosurface draw mode. More...
 
int GVL_isosurf_add (int)
 Add isosurface. More...
 
int GVL_isosurf_del (int, int)
 Delete isosurface. More...
 
int GVL_isosurf_get_att (int, int, int, int *, float *, char *)
 Get isosurface attributes. More...
 
int GVL_isosurf_unset_att (int, int, int)
 Unset isosurface attributes. More...
 
int GVL_isosurf_set_att_const (int, int, int, float)
 Set constant isosurface attribute. More...
 
int GVL_isosurf_set_att_map (int, int, int, const char *)
 Set isosurface map attribute. More...
 
int GVL_isosurf_get_flags (int, int, int *)
 Get isosurface flags. More...
 
int GVL_isosurf_set_flags (int, int, int)
 Set isosurface flags. More...
 
int GVL_isosurf_num_isosurfs (int)
 Get number of available isosurfaces. More...
 
int GVL_isosurf_set_maskmode (int, int, int)
 Set mask attribute mode. More...
 
int GVL_isosurf_get_maskmode (int, int, int *)
 Get isosurface mask mode. More...
 
int GVL_slice_move_up (int, int)
 Move up slice. More...
 
int GVL_slice_move_down (int, int)
 Move down slice. More...
 
void GVL_slice_get_drawres (int, int *, int *, int *)
 Get draw resolution of slice. More...
 
int GVL_slice_get_transp (int, int, int *)
 Get slice trans ? More...
 
int GVL_slice_set_transp (int, int, int)
 Set slice trans ? More...
 
int GVL_slice_set_drawres (int, int, int, int)
 Set slice draw resolution. More...
 
int GVL_slice_get_drawmode (int, int *)
 Get slice draw mode. More...
 
int GVL_slice_set_drawmode (int, int)
 Set slice draw mode. More...
 
int GVL_slice_add (int)
 Add slice. More...
 
int GVL_slice_del (int, int)
 Delete slice. More...
 
int GVL_slice_num_slices (int)
 Get number or slices. More...
 
int GVL_slice_get_pos (int, int, float *, float *, float *, float *, float *, float *, int *)
 Get slice position. More...
 
int GVL_slice_set_pos (int, int, float, float, float, float, float, float, int)
 Get slice position. More...
 
int Gp_set_color (const char *, geopoint *)
 
geopointGp_load_sites (const char *, int *, int *)
 Load to points to memory. More...
 
int Gp_load_sites_thematic (geosite *, struct Colors *)
 Load styles for geopoints based on thematic mapping. More...
 
double Gs_distance (double *, double *)
 Calculates distance in METERS between two points in current projection (2D) More...
 
int Gs_loadmap_as_float (struct Cell_head *, const char *, float *, struct BM *, int *)
 Load raster map as floating point map. More...
 
int Gs_loadmap_as_int (struct Cell_head *, const char *, int *, struct BM *, int *)
 Load raster map as integer map. More...
 
int Gs_numtype (const char *, int *)
 Get map data type. More...
 
int Gs_loadmap_as_short (struct Cell_head *, const char *, short *, struct BM *, int *)
 Load raster map as integer map. More...
 
int Gs_loadmap_as_char (struct Cell_head *, const char *, unsigned char *, struct BM *, int *)
 Load raster map as integer map. More...
 
int Gs_loadmap_as_bitmap (struct Cell_head *, const char *, struct BM *)
 Load raster map as integer map. More...
 
int Gs_build_256lookup (const char *, int *)
 Build color table (256) More...
 
void Gs_pack_colors (const char *, int *, int, int)
 Pack color table. More...
 
void Gs_pack_colors_float (const char *, float *, int *, int, int)
 Pack color table (floating-point map) More...
 
int Gs_get_cat_label (const char *, int, int, char *)
 Get categories/labels. More...
 
int Gs_save_3dview (const char *, geoview *, geodisplay *, struct Cell_head *, geosurf *)
 Save 3dview. More...
 
int Gs_load_3dview (const char *, geoview *, geodisplay *, struct Cell_head *, geosurf *)
 Load 3dview. More...
 
int Gs_update_attrange (geosurf *, int)
 Update no_zero ranges for attribute (actually no_null now) More...
 
geolineGv_load_vect (const char *, int *)
 Load vector map to memory. More...
 
int Gv_load_vect_thematic (geovect *, struct Colors *)
 Load styles for geolines based on thematic mapping. More...
 
void sub_Vectmem (int)
 Tracking memory. More...
 
Keylistgk_copy_key (Keylist *)
 Copy keyframes. More...
 
unsigned long gk_get_mask_sofar (float, Keylist *)
 Get mask value. More...
 
int gk_viable_keys_for_mask (unsigned long, Keylist *, Keylist **)
 ADD. More...
 
void gk_follow_frames (Viewnode *, int, Keylist *, int, int, int, unsigned long)
 Checks key masks. More...
 
void gk_free_key (Keylist *)
 Free keyframe list. More...
 
Viewnodegk_make_framesfromkeys (Keylist *, int, int, int, float)
 Generate viewnode from keyframes. More...
 
double get_key_neighbors (int, double, double, int, Keylist **, Keylist **, Keylist **, Keylist **, Keylist **, double *, double *)
 
double lin_interp (float, float, float)
 Linear interpolation. More...
 
double get_2key_neighbors (int, float, float, int, Keylist **, Keylist **, Keylist **)
 
Viewnodegk_make_linear_framesfromkeys (Keylist *, int, int, int)
 Generate viewnode from keyframe list (linear interpolation) More...
 
void correct_twist (Keylist *)
 Correct twist value. More...
 
int gk_draw_path (Viewnode *, int, Keylist *)
 Draw path. More...
 
geositegp_get_site (int)
 Get geosite struct. More...
 
geositegp_get_prev_site (int)
 Get previous geosite struct from list. More...
 
int gp_num_sites (void)
 Get number of loaded point sets. More...
 
geositegp_get_last_site (void)
 Get last point set. More...
 
geositegp_get_new_site (void)
 Create new geosite instance and add it to list. More...
 
void gp_update_drapesurfs (void)
 Update drape surfaces. More...
 
int gp_set_defaults (geosite *)
 Set default value for geosite struct. More...
 
void print_site_fields (geosite *)
 
int gp_init_site (geosite *)
 Initialize geosite struct. More...
 
void gp_delete_site (int)
 Delete point set and remove from list. More...
 
int gp_free_site (geosite *)
 Free allocated geosite struct. More...
 
void gp_free_sitemem (geosite *)
 Free geosite (lower level) More...
 
void gp_set_drapesurfs (geosite *, int *, int)
 
int gs_point_in_region (geosurf *, float *, float *)
 Check if point is in region. More...
 
void gpd_obj (geosurf *, gvstyle *, Point3)
 Draw point representing object. More...
 
int gpd_2dsite (geosite *, geosurf *, int)
 Draw 2D point set. More...
 
int gpd_3dsite (geosite *, float, float, int)
 Draw 3D point set. More...
 
void gs_err (const char *)
 
void gs_init (void)
 Initialize library. More...
 
geosurfgs_get_surf (int)
 Get geosurf struct. More...
 
geosurfgs_get_prev_surface (int)
 Get previous geosurf struct. More...
 
int gs_getall_surfaces (geosurf **)
 Get array of geosurf structs. More...
 
int gs_num_surfaces (void)
 Get number of surfaces. More...
 
int gs_att_is_set (geosurf *, IFLAG)
 Check if attribute is set. More...
 
geosurfgs_get_last_surface (void)
 Get last allocated geosurf struct from list. More...
 
geosurfgs_get_new_surface (void)
 Allocate new geosurf struct. More...
 
int gs_init_surf (geosurf *, double, double, int, int, double, double)
 Initialize allocated geosurf struct. More...
 
int gs_init_normbuff (geosurf *)
 Init geosurf normbuff. More...
 
void print_frto (float(*)[4])
 Debugging, print 'from/to' model coordinates to stderr. More...
 
void print_realto (float *)
 Debugging, print 'to' real coordinates to stderr. More...
 
void print_256lookup (int *)
 Debugging, 256 integer values from buffer. More...
 
void print_surf_fields (geosurf *)
 Debugging, print geosurf fields to stderr. More...
 
void print_view_fields (geoview *)
 Debugging, print geoview fields to stderr. More...
 
void gs_set_defaults (geosurf *, float *, float *)
 Set default attribute values. More...
 
void gs_delete_surf (int)
 Remove geosurf struct from list. More...
 
int gs_free_surf (geosurf *)
 Free geosurf struct. More...
 
void gs_free_unshared_buffs (geosurf *)
 Free unshared buffers of geosurf struct. More...
 
int gs_num_datah_reused (int)
 Get number of reused values. More...
 
int gs_get_att_type (geosurf *, int)
 Get attribute type. More...
 
int gs_get_att_src (geosurf *, int)
 Get attribute source. More...
 
typbuffgs_get_att_typbuff (geosurf *, int, int)
 Get attribute data buffer. More...
 
size_t gs_malloc_att_buff (geosurf *, int, int)
 Allocate attribute buffer. More...
 
int gs_malloc_lookup (geosurf *, int)
 Allocate attribute lookup. More...
 
int gs_set_att_type (geosurf *, int, int)
 Set attribute type. More...
 
int gs_set_att_src (geosurf *, int, int)
 Set attribute source. More...
 
int gs_set_att_const (geosurf *, int, float)
 Set attribute constant value. More...
 
void gs_set_maskmode (int)
 Set geosurf mask mode. More...
 
int gs_mask_defined (geosurf *)
 Check if mask is defined. More...
 
int gs_masked (typbuff *, int, int, int)
 Should only be called when setting up the current mask (gs_bm.c) More...
 
int gs_mapcolor (typbuff *, gsurf_att *, int)
 Call this one when you already know att_src is MAP_ATT. More...
 
int gs_get_zextents (geosurf *, float *, float *, float *)
 Get z-extent values. More...
 
int gs_get_xextents (geosurf *, float *, float *)
 Get x-extent values. More...
 
int gs_get_yextents (geosurf *, float *, float *)
 Get y-extent values. More...
 
int gs_get_zrange0 (float *, float *)
 Get z-range. More...
 
int gs_get_zrange (float *, float *)
 Get z-range. More...
 
int gs_get_xrange (float *, float *)
 Get x-range. More...
 
int gs_get_yrange (float *, float *)
 Get y-range. More...
 
int gs_get_data_avg_zmax (float *)
 Get average z-max value. More...
 
int gs_get_datacenter (float *)
 Get data center point. More...
 
int gs_setall_norm_needupdate (void)
 Set for geosurf need-to-update mark. More...
 
int gs_point_is_masked (geosurf *, float *)
 Check if point is masked. More...
 
int gs_distance_onsurf (geosurf *, float *, float *, float *, int)
 Calculate distance on surface. More...
 
struct BMgsbm_make_mask (typbuff *, float, int, int)
 Do combining of bitmaps, make bitmaps from other data w/maskval. More...
 
void gsbm_zero_mask (struct BM *)
 Zero mask. More...
 
int gsbm_or_masks (struct BM *, struct BM *)
 Mask bitmap (mask type OR) More...
 
int gsbm_ornot_masks (struct BM *, struct BM *)
 Mask bitmap (mask type ORNOT) More...
 
int gsbm_and_masks (struct BM *, struct BM *)
 Mask bitmap (mask type ADD) More...
 
int gsbm_xor_masks (struct BM *, struct BM *)
 Mask bitmap (mask type XOR) More...
 
int gs_update_curmask (geosurf *)
 Update current maps. More...
 
void print_bm (struct BM *)
 Print bitmap to stderr. More...
 
void init_vars (geosurf *)
 Init variables. More...
 
int gs_calc_normals (geosurf *)
 Calculate normals. More...
 
int calc_norm (geosurf *, int, int, unsigned int)
 Calculate normals. More...
 
int gs_los_intersect1 (int, float(*)[3], float *)
 Crude method of intersecting line of sight with closest part of surface. More...
 
int gs_los_intersect (int, float **, float *)
 Crude method of intersecting line of sight with closest part of surface. More...
 
int RayCvxPolyhedronInt (Point3, Point3, double, Point4 *, int, double *, int *)
 Ray-Convex Polyhedron Intersection Test. More...
 
void gs_get_databounds_planes (Point4 *)
 Get data bounds for plane. More...
 
int gs_setlos_enterdata (Point3 *)
 
void gsd_def_cplane (int, float *, float *)
 Define cplace. More...
 
void gsd_update_cplanes (void)
 Update cplaces. More...
 
void gsd_cplane_on (int)
 ADD. More...
 
void gsd_cplane_off (int)
 Turn off clip plane. More...
 
void gsd_get_cplanes_state (int *)
 Get cplane state. More...
 
int gsd_get_cplanes (Point4 *)
 Get cplaces. More...
 
void gsd_update_cpnorm (int)
 ADD. More...
 
void gsd_cplane_setrot (int, float, float, float)
 ADD. More...
 
void gsd_cplane_settrans (int, float, float, float)
 ADD. More...
 
void gsd_draw_cplane_fence (geosurf *, geosurf *, int)
 ADD. More...
 
void gsd_draw_cplane (int)
 Draw cplane. More...
 
GLuint gsd_set_font (const char *)
 
int gsd_get_txtwidth (const char *, int)
 Get text width. More...
 
int gsd_get_txtheight (int size)
 Get text height. More...
 
void do_label_display (GLuint, float *, const char *)
 Display label. More...
 
int get_txtdescender (void)
 Get text descender. More...
 
int get_txtxoffset (void)
 Get text offset. More...
 
int GS_write_ppm (const char *)
 Save current GL screen to ppm file. More...
 
int GS_write_tif (const char *)
 Write data to tif file. More...
 
void gs_put_label (const char *, GLuint, int, unsigned long, int *)
 Put label. More...
 
void gsd_remove_curr (void)
 Remove current label. More...
 
void gsd_remove_all (void)
 Remove all labels from display list. More...
 
void gsd_call_label (void)
 Call display list and draw defined labels – called from gsd_prim (gsd_call_lists) More...
 
void gsd_box (float *, int, float *)
 Draw box. More...
 
void gsd_plus (float *, int, float)
 ADD. More...
 
void gsd_line_onsurf (geosurf *, float *, float *)
 Line on surface, fix z-values. More...
 
int gsd_nline_onsurf (geosurf *, float *, float *, float *, int)
 Multiline on surface, fix z-values. More...
 
void gsd_x (geosurf *, float *, int, float)
 Draw X symbol. More...
 
void gsd_diamond (float *, unsigned long, float)
 Draw diamond symbol. More...
 
void gsd_diamond_lines (void)
 Draw diamond lines. More...
 
void gsd_cube (float *, unsigned long, float)
 Draw cube. More...
 
void gsd_draw_box (float *, unsigned long, float)
 Draw box. More...
 
void gsd_drawsphere (float *, unsigned long, float)
 Draw sphere. More...
 
void gsd_draw_asterisk (float *, unsigned long, float)
 Draw asterisk. More...
 
void gsd_draw_gyro (float *, unsigned long, float)
 Draw gyro. More...
 
void gsd_3dcursor (float *)
 Draw 3d cursor. More...
 
void dir_to_slope_aspect (float *, float *, float *, int)
 ADD. More...
 
int gsd_north_arrow (float *, float, GLuint, unsigned long, unsigned long)
 Draw North Arrow takes OpenGL coords and size. More...
 
int gsd_arrow (float *, unsigned long, float, float *, float, geosurf *)
 ADD. More...
 
int gsd_arrow_onsurf (float *, float *, unsigned long, int, geosurf *)
 Draw north arrow on surface. More...
 
void gsd_3darrow (float *, unsigned long, float, float, float *, float)
 Draw 3d north arrow. More...
 
int gsd_scalebar (float *, float, GLuint, unsigned long, unsigned long)
 Draw Scalebar takes OpenGL coords and size. More...
 
int gsd_scalebar_v2 (float *, float, GLuint, unsigned long, unsigned long)
 Draw Scalebar (as lines) More...
 
void primitive_cone (unsigned long)
 Primitives only called after transforms. More...
 
void primitive_cylinder (unsigned long, int)
 Primitives only called after transforms. More...
 
void gsd_flush (void)
 Mostly for flushing drawing commands across a network. More...
 
void gsd_colormode (int)
 Set color mode. More...
 
void show_colormode (void)
 Print color mode to stderr. More...
 
void gsd_circ (float, float, float)
 ADD. More...
 
void gsd_disc (float, float, float, float)
 ADD. More...
 
void gsd_sphere (float *, float)
 ADD. More...
 
void gsd_zwritemask (unsigned long)
 Write out z-mask. More...
 
void gsd_backface (int)
 ADD. More...
 
void gsd_linewidth (short)
 Set width of rasterized lines. More...
 
void gsd_bgnqstrip (void)
 ADD. More...
 
void gsd_endqstrip (void)
 ADD. More...
 
void gsd_bgntmesh (void)
 ADD. More...
 
void gsd_endtmesh (void)
 ADD. More...
 
void gsd_bgntstrip (void)
 ADD. More...
 
void gsd_endtstrip (void)
 ADD. More...
 
void gsd_bgntfan (void)
 ADD. More...
 
void gsd_endtfan (void)
 ADD. More...
 
void gsd_swaptmesh (void)
 ADD. More...
 
void gsd_bgnpolygon (void)
 Delimit the vertices of a primitive or a group of like primitives. More...
 
void gsd_endpolygon (void)
 Delimit the vertices of a primitive or a group of like primitives. More...
 
void gsd_bgnline (void)
 Begin line. More...
 
void gsd_endline (void)
 End line. More...
 
void gsd_shademodel (int)
 Set shaded model. More...
 
int gsd_getshademodel (void)
 Get shaded model. More...
 
void gsd_bothbuffers (void)
 Draw to the front and back buffers. More...
 
void gsd_frontbuffer (void)
 Draw to the front buffer. More...
 
void gsd_backbuffer (void)
 Draw to the back buffer. More...
 
void gsd_swapbuffers (void)
 Swap buffers. More...
 
void gsd_popmatrix (void)
 Pop the current matrix stack. More...
 
void gsd_pushmatrix (void)
 Push the current matrix stack. More...
 
void gsd_scale (float, float, float)
 Multiply the current matrix by a general scaling matrix. More...
 
void gsd_translate (float, float, float)
 Multiply the current matrix by a translation matrix. More...
 
void gsd_rot (float, char)
 ADD. More...
 
void gsd_checkwindow (int *, int *, double *, double *)
 
int gsd_checkpoint (float *, int *, int *, double *, double *)
 
void gsd_litvert_func (float *, unsigned long, float *)
 Set the current normal vector & specify vertex. More...
 
void gsd_litvert_func2 (float *, unsigned long, float *)
 ADD. More...
 
void gsd_vert_func (float *)
 ADD. More...
 
void gsd_color_func (unsigned int)
 Set current color. More...
 
void gsd_init_lightmodel (void)
 Initialize model light. More...
 
void gsd_set_material (int, int, float, float, int)
 Set material. More...
 
void gsd_deflight (int, struct lightdefs *)
 Define light. More...
 
void gsd_switchlight (int, int)
 Switch light on/off. More...
 
int gsd_getimage (unsigned char **, unsigned int *, unsigned int *)
 Get image of current GL screen. More...
 
void gsd_blend (int)
 Specify pixel arithmetic. More...
 
void gsd_def_clipplane (int, double *)
 Define clip plane. More...
 
void gsd_set_clipplane (int, int)
 Set clip plane. More...
 
void gsd_finish (void)
 Finish. More...
 
void gsd_viewport (int, int, int, int)
 Set the viewport. More...
 
int gsd_makelist (void)
 ADD. More...
 
void gsd_bgnlist (int, int)
 ADD. More...
 
void gsd_endlist (void)
 End list. More...
 
void gsd_calllist (int)
 ADD. More...
 
void gsd_deletelist (GLuint, int)
 Delete list. More...
 
void gsd_calllists (int)
 ADD. More...
 
void gsd_getwindow (int *, int *, double *, double *)
 Get viewport. More...
 
int gsd_writeView (unsigned char **, unsigned int, unsigned int)
 Write view. More...
 
int gsd_surf (geosurf *)
 ADD. More...
 
int gsd_surf_map (geosurf *)
 Draw surface using triangle fan instead of strip. More...
 
int gsd_surf_const (geosurf *, float)
 Using tmesh - not confident with qstrips portability. More...
 
int gsd_surf_func (geosurf *, int(*)())
 Define user function. More...
 
int gsd_triangulated_wall (int, int, geosurf *, geosurf *, Point3 *, Point3 *, float *)
 ADD. More...
 
void gsd_setfc (int)
 ADD. More...
 
int gsd_getfc (void)
 ADD. More...
 
int gsd_ortho_wall (int, int, geosurf **, Point3 **, float *)
 ADD. More...
 
int gsd_wall (float *, float *, float *)
 ADD. More...
 
int gsd_norm_arrows (geosurf *)
 ADD. More...
 
int gsd_get_los (float(*)[3], short, short)
 ADD. More...
 
void gsd_set_view (geoview *, geodisplay *)
 Set view. More...
 
void gsd_check_focus (geoview *)
 Check focus. More...
 
void gsd_get_zup (geoview *, double *)
 Get z-up vector (z-direction) More...
 
int gsd_zup_twist (geoview *)
 ADD. More...
 
void gsd_do_scale (int)
 Set current scale. More...
 
void gsd_real2model (Point3)
 Convert real to model coordinates. More...
 
void gsd_model2real (Point3)
 Convert model to real coordinates. More...
 
void gsd_model2surf (geosurf *, Point3)
 Convert model to surface coordinates. More...
 
void gsd_surf2model (Point3)
 Convert surface to model coordinates. More...
 
void gsd_surf2real (geosurf *, Point3)
 Convert surface to real coordinates. More...
 
void gsd_real2surf (geosurf *, Point3)
 Convert real to surface coordinates. More...
 
int gsd_wire_surf (geosurf *)
 Draw surface wire. More...
 
int gsd_wire_surf_map (geosurf *)
 ADD. More...
 
int gsd_coarse_surf_map (geosurf *)
 Draw coarse surface. More...
 
int gsd_wire_surf_const (geosurf *, float)
 ADD. More...
 
int gsd_wire_surf_func (geosurf *, int(*)())
 ADD. More...
 
int gsd_wire_arrows (geosurf *)
 ADD. More...
 
void gsdiff_set_SDscale (float)
 Set scale. More...
 
float gsdiff_get_SDscale (void)
 Get scale. More...
 
void gsdiff_set_SDref (geosurf *)
 ADD. More...
 
geosurfgsdiff_get_SDref (void)
 ADD. More...
 
float gsdiff_do_SD (float, int)
 ADD. More...
 
int gsdrape_set_surface (geosurf *)
 ADD. More...
 
int seg_intersect_vregion (geosurf *, float *, float *)
 Check if segment intersect vector region. More...
 
Point3gsdrape_get_segments (geosurf *, float *, float *, int *)
 ADD. More...
 
Point3gsdrape_get_allsegments (geosurf *, float *, float *, int *)
 Get all segments. More...
 
void interp_first_last (geosurf *, float *, float *, Point3, Point3)
 ADD. More...
 
int _viewcell_tri_interp (geosurf *, Point3)
 ADD. More...
 
int viewcell_tri_interp (geosurf *, typbuff *, Point3, int)
 ADD. More...
 
int in_vregion (geosurf *, float *)
 ADD. More...
 
int order_intersects (geosurf *, Point3, Point3, int, int, int)
 ADD. More...
 
int get_vert_intersects (geosurf *, float *, float *, float *)
 ADD. More...
 
int get_horz_intersects (geosurf *, float *, float *, float *)
 Get horizontal intersects. More...
 
int get_diag_intersects (geosurf *, float *, float *, float *)
 Get diagonal intersects. More...
 
int segs_intersect (float, float, float, float, float, float, float, float, float *, float *)
 Line intersect. More...
 
int Point_on_plane (Point3, Point3, Point3, Point3)
 Check if point is on plane. More...
 
int XY_intersect_plane (float *, float *)
 Check for intersection (point and plane) More...
 
int P3toPlane (Point3, Point3, Point3, float *)
 Define plane. More...
 
int V3Cross (Point3, Point3, Point3)
 Get cross product. More...
 
int gsds_findh (const char *, IFLAG *, IFLAG *, int)
 Get handle to gsds. More...
 
int gsds_newh (const char *)
 Get handle to gsds. More...
 
typbuffgsds_get_typbuff (int, IFLAG)
 Get data buffer. More...
 
char * gsds_get_name (int)
 Get name. More...
 
int gsds_free_datah (int)
 Free allocated dataset. More...
 
int gsds_free_data_buff (int, int)
 Free allocated buffer. More...
 
size_t free_data_buffs (dataset *, int)
 Free data buffer. More...
 
size_t gsds_alloc_typbuff (int, int *, int, int)
 Allocates correct buffer according to type, keeps track of total mem. More...
 
int gsds_get_changed (int)
 ADD. More...
 
int gsds_set_changed (int, IFLAG)
 ADD. More...
 
int gsds_get_type (int)
 ADD. More...
 
int get_mapatt (typbuff *, int, float *)
 Get map attributes. More...
 
geovectgv_get_vect (int)
 Get vector set. More...
 
geovectgv_get_prev_vect (int)
 Get previous vector set. More...
 
int gv_num_vects (void)
 Get number of loaded vector sets. More...
 
geovectgv_get_last_vect (void)
 Get last loaded vector set. More...
 
geovectgv_get_new_vect (void)
 Allocate memory for new vector set. More...
 
void gv_update_drapesurfs (void)
 Update drape surfaces. More...
 
int gv_set_defaults (geovect *)
 Set attributes of vector set to default values. More...
 
int gv_init_vect (geovect *)
 Initialize geovect struct. More...
 
void gv_delete_vect (int)
 Delete vector set (unload) More...
 
int gv_free_vect (geovect *)
 Free allocated memory for geovect struct. More...
 
void gv_free_vectmem (geovect *)
 Free allocated memory. More...
 
void gv_set_drapesurfs (geovect *, int *, int)
 Set drape surfaces for vector set. More...
 
float gv_line_length (geoline *)
 Get line width. More...
 
int gln_num_points (geoline *)
 Get number of line vertices. More...
 
int gv_num_points (geovect *)
 Get number of points in vector. More...
 
int gv_decimate_lines (geovect *)
 Decimate line. More...
 
int gs_clip_segment (geosurf *, float *, float *, float *)
 Clip segment. More...
 
int gvd_vect (geovect *, geosurf *, int)
 Draw vector set. More...
 
void gvd_draw_lineonsurf (geosurf *, float *, float *, int)
 Draw line on surface. More...
 
geovolgvl_get_vol (int)
 Get volume set structure. More...
 
geovolgvl_get_prev_vol (int)
 Get previous volume. More...
 
int gvl_getall_vols (geovol **)
 Get all volumes. More...
 
int gvl_num_vols (void)
 Get number of loaded volume sets. More...
 
geovolgvl_get_last_vol (void)
 Get last volume set from the list. More...
 
geovolgvl_get_new_vol (void)
 Allocate new volume set and add it to the list. More...
 
int gvl_init_vol (geovol *, double, double, double, int, int, int, double, double, double)
 Initialize geovol structure. More...
 
void gvl_delete_vol (int)
 Remove volume set from list. More...
 
int gvl_free_vol (geovol *)
 Free geovol struct. More...
 
void gvl_free_volmem (geovol *)
 Free geovol struct memory. More...
 
void print_vol_fields (geovol *)
 Debug volume fields. More...
 
int gvl_get_xextents (geovol *, float *, float *)
 Get volume x-extent value. More...
 
int gvl_get_yextents (geovol *, float *, float *)
 Get volume y-extent value. More...
 
int gvl_get_zextents (geovol *, float *, float *)
 Get volume z-extent value. More...
 
int gvl_get_xrange (float *, float *)
 Get volume x-range value. More...
 
int gvl_get_yrange (float *, float *)
 Get volume y-range value. More...
 
int gvl_get_zrange (float *, float *)
 Get volume z-range value. More...
 
int gvl_isosurf_init (geovol_isosurf *)
 Initialize geovol_isosurf struct. More...
 
int gvl_isosurf_freemem (geovol_isosurf *)
 Free geovol_isosurf struct. More...
 
geovol_isosurfgvl_isosurf_get_isosurf (int, int)
 Get isosurface of given volume set. More...
 
int gvl_isosurf_get_att_src (geovol_isosurf *, int)
 Get attribute source. More...
 
int gvl_isosurf_set_att_src (geovol_isosurf *, int, int)
 Set attribute source. More...
 
int gvl_isosurf_set_att_const (geovol_isosurf *, int, float)
 Set isosurface attribute constant. More...
 
int gvl_isosurf_set_att_map (geovol_isosurf *, int, const char *)
 Set attribute map. More...
 
int gvl_isosurf_set_att_changed (geovol_isosurf *, int)
 Set attribute changed. More...
 
int gvl_slice_init (geovol_slice *)
 Initialize geovol_slice struct. More...
 
geovol_slicegvl_slice_get_slice (int, int)
 Get geovol_slice struct. More...
 
int gvl_slice_freemem (geovol_slice *)
 Free geovol_slice struct. More...
 
void P_scale (float, float, float)
 ADD. More...
 
void P_transform (int, float(*)[4], float(*)[4])
 Transform array of vectors using current T matrix. More...
 
int P_pushmatrix (void)
 Push current transformation matrix onto matrix stack. More...
 
int P_popmatrix (void)
 Pop top of matrix stack, placing it into the current transformation matrix. More...
 
void P_rot (float, char)
 Rotate matrix. More...
 
geovol_filegvl_file_get_volfile (int)
 Get geovol_file structure for given handle. More...
 
char * gvl_file_get_name (int)
 Get file name for given handle. More...
 
int gvl_file_get_file_type (geovol_file *)
 Get file type for given handle. More...
 
int gvl_file_get_data_type (geovol_file *)
 Get data type for given handle. More...
 
int gvl_file_newh (const char *, IFLAG)
 Get handle for given file name and type. More...
 
int gvl_file_free_datah (int)
 Free geovol_file structure for given handle. More...
 
int gvl_file_start_read (geovol_file *)
 Start read - allocate memory buffer a read first data into buffer. More...
 
int gvl_file_end_read (geovol_file *)
 End read - free buffer memory. More...
 
int gvl_file_get_value (geovol_file *, int, int, int, void *)
 Get value for volume file at x, y, z. More...
 
int gvl_file_is_null_value (geovol_file *, void *)
 Check for null value. More...
 
int gvl_file_set_mode (geovol_file *, IFLAG)
 Set read mode. More...
 
int gvl_file_set_slices_param (geovol_file *, int, int)
 Set parameters for slice reading. More...
 
void gvl_file_get_min_max (geovol_file *, double *, double *)
 Get minimum and maximum value in volume file. More...
 
int Gvl_load_colors_data (void **, const char *)
 Load color table. More...
 
int Gvl_unload_colors_data (void *)
 Unload color table. More...
 
int Gvl_get_color_for_value (void *, float *)
 Get color for value. More...
 
int gvl_isosurf_calc (geovol *)
 Fill data structure with computed isosurfaces polygons. More...
 
int gvl_slices_calc (geovol *)
 Calculate slices for given volume set. More...
 
void gvl_write_char (int, unsigned char **, unsigned char)
 ADD. More...
 
unsigned char gvl_read_char (int, const unsigned char *)
 Read char. More...
 
void gvl_align_data (int, unsigned char **)
 Append data to buffer. More...
 
int gvld_vol (geovol *)
 Draw volume set (slices and isosurfaces) More...
 
int gvld_wire_vol (geovol *)
 Draw volume in wire mode (bounding box) More...
 
int gvld_isosurf (geovol *)
 Draw volume isosurfaces. More...
 
int gvld_wire_isosurf (geovol *)
 Draw volume isosurface in draw mode. More...
 
int gvld_slices (geovol *)
 Draw slices. More...
 
int gvld_slice (geovol *, int)
 Draw slice. More...
 
int gvld_wire_slices (geovol *)
 Draw wire slices. More...
 
int gvld_wind3_box (geovol *)
 Draw volume bounding box. More...
 
void gsd_display_fringe (geosurf *, unsigned long, float, int[4])
 Display fridge. More...
 
void gsd_fringe_horiz_poly (float, geosurf *, int, int)
 Draw fringe polygon in x direction. More...
 
void gsd_fringe_horiz_line (float, geosurf *, int, int)
 Draw fringe outline in x direction. More...
 
void gsd_fringe_vert_poly (float, geosurf *, int, int)
 Draw fringe outline in y direction. More...
 
void gsd_fringe_vert_line (float, geosurf *, int, int)
 Draw fringe outline in y direction. More...
 
GLuint gsd_put_legend (const char *, GLuint, int, int *, float *, int *)
 Put legend. More...
 
void gsd_bgn_legend_viewport (GLint, GLint, GLint, GLint)
 ADD. More...
 
void gsd_end_legend_viewport (void)
 ADD. More...
 
int gsd_make_nice_number (float *)
 ADD. More...
 

Function Documentation

◆ _viewcell_tri_interp()

int _viewcell_tri_interp ( geosurf gs,
Point3  pt 
)

ADD.

Parameters
gssurface (geosurf)
pt

Definition at line 467 of file gsdrape.c.

References ATT_TOPO, gs_get_att_typbuff(), and viewcell_tri_interp().

Referenced by GS_draw_X().

◆ calc_norm()

int calc_norm ( geosurf gs,
int  drow,
int  dcol,
unsigned int  neighbors 
)

Calculate normals.

Need either four neighbors or two non-linear neighbors passed initial state of neighbors known from array position and data row & col

Parameters
gssurface (geosurf)
drowdata row
dcoldata col
neighborsneighbors id
Returns
0 no normals
1 on success

Definition at line 206 of file gs_norms.c.

References BM_get(), g_surf::curmask, DRC2OFF, GET_MAPATT, NBOT, NLFT, NRGT, NTOP, g_surf::x_mod, and g_surf::y_mod.

Referenced by gs_calc_normals().

◆ correct_twist()

void correct_twist ( Keylist k)

Correct twist value.

Parameters
kkeyframe list

Definition at line 700 of file gk.c.

Referenced by gk_make_linear_framesfromkeys().

◆ dir_to_slope_aspect()

void dir_to_slope_aspect ( float *  dir,
float *  slope,
float *  aspect,
int  degrees 
)

ADD.

Parameters
dir
slope
ascpect
degrees

Definition at line 755 of file gsd_objs.c.

References Pi, X, Y, and Z.

◆ do_label_display()

void do_label_display ( GLuint  fontbase,
float *  lab_pos,
const char *  txt 
)

Display label.

Parameters
fontbasefont-base
lab_poslabel position
txttext string

Definition at line 98 of file gsd_fonts.c.

References X, and Y.

◆ free_data_buffs()

size_t free_data_buffs ( dataset ds,
int  typ 
)

Free data buffer.

Parameters
dspointer to dataset struct
typdata type
Returns
freed size

Definition at line 393 of file gsds.c.

References ATTY_CHAR, ATTY_FLOAT, ATTY_INT, ATTY_MASK, ATTY_NULL, ATTY_SHORT, typbuff::bm, BM_destroy(), BM_get_map_size(), typbuff::cb, dataset::databuff, dataset::dims, typbuff::fb, free(), typbuff::ib, dataset::ndims, typbuff::nm, NULL, and typbuff::sb.

◆ get_2key_neighbors()

double get_2key_neighbors ( int  ,
float  ,
float  ,
int  ,
Keylist **  ,
Keylist **  ,
Keylist **   
)

◆ get_diag_intersects()

int get_diag_intersects ( geosurf gs,
float *  bgn,
float *  end,
float *  dir 
)

Get diagonal intersects.

Colinear already eliminated

Parameters
gssurface (geosurf)
bgnbegin point
endend point
dir? (unused)
Returns
number of intersects

Definition at line 1074 of file gsdrape.c.

◆ get_horz_intersects()

int get_horz_intersects ( geosurf gs,
float *  bgn,
float *  end,
float *  dir 
)

Get horizontal intersects.

Parameters
gssurface (geosurf)
bgnbegin point
endend point
dir
Returns
number of intersects

Definition at line 978 of file gsdrape.c.

References EPSILON, segs_intersect(), VCOLS, VROW2Y, VROWS, VXRES, VYRES, Y, and Y2VROW.

◆ get_key_neighbors()

double get_key_neighbors ( int  ,
double  ,
double  ,
int  ,
Keylist **  ,
Keylist **  ,
Keylist **  ,
Keylist **  ,
Keylist **  ,
double *  ,
double *   
)

◆ get_mapatt()

int get_mapatt ( typbuff buff,
int  offset,
float *  att 
)

Get map attributes.

Parameters
buff
offset
[out]att
Returns
0 on failure
1 on success

Definition at line 31 of file gsget.c.

References BM_get(), typbuff::cb, BM::cols, typbuff::fb, typbuff::ib, typbuff::k, typbuff::nm, typbuff::sb, and typbuff::tfunc.

◆ get_txtdescender()

int get_txtdescender ( void  )

Get text descender.

yorig ??

Is this defined somewhere ?

Returns
2

Definition at line 72 of file gsd_fonts.c.

◆ get_txtxoffset()

int get_txtxoffset ( void  )

Get text offset.

xorig ??

Is this defined somewhere ?

Returns
0

Definition at line 86 of file gsd_fonts.c.

◆ get_vert_intersects()

int get_vert_intersects ( geosurf gs,
float *  bgn,
float *  end,
float *  dir 
)

ADD.

Todo:
For consistancy, need to decide how last row & last column are displayed - would it look funny to always draw last row/col with finer resolution if necessary, or would it be better to only show full rows/cols?

Colinear already eliminated

Parameters
gssurface (geosurf)
bgnbegin point
endend point
dirdirection
Returns

Definition at line 882 of file gsdrape.c.

References EPSILON, segs_intersect(), VCOL2X, VCOLS, VROWS, VXRES, VYRES, X, X2VCOL, and g_surf::yrange.

◆ GK_add_key()

int GK_add_key ( float  pos,
unsigned long  fmask,
int  force_replace,
float  precis 
)

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 <= precis, GK_add_key() will fail unless force_replace is TRUE.

Parameters
posposition
fmaks
force_replace
precisprecision value
Returns
1 if key is added
-1 key not added

Definition at line 429 of file gk2.c.

◆ GK_clear_keys()

void GK_clear_keys ( void  )

Deletes all keyframes, resets field masks.

Doesn't change number of frames requested.

Definition at line 310 of file gk2.c.

References gk_free_key(), and NULL.

◆ gk_copy_key()

Keylist* gk_copy_key ( Keylist k)

Copy keyframes.

Parameters
ksource keyframes
Returns
pointer to Keylist struct (target)

Definition at line 45 of file gk.c.

References key_node::fieldmask, key_node::fields, G_malloc, KF_NUMFIELDS, key_node::look_ahead, key_node::next, NULL, key_node::pos, and key_node::prior.

◆ GK_delete_key()

int GK_delete_key ( float  pos,
float  precis,
int  justone 
)

Delete keyframe

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.

Parameters
posposition
precisprecision
justonedelete only one keyframe
Returns
number of keys deleted.

Definition at line 367 of file gk2.c.

◆ GK_do_framestep()

void GK_do_framestep ( int  step,
int  render 
)

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.

Parameters
stepstep value
render

Definition at line 486 of file gk2.c.

◆ gk_draw_path()

int gk_draw_path ( Viewnode views,
int  steps,
Keylist keys 
)

Draw path.

Parameters
viewsViewnode struct
stepsstep value
keyskeyframe list
Returns
0 on failure
1 on success

Definition at line 738 of file gk.c.

◆ gk_follow_frames()

void gk_follow_frames ( Viewnode view,
int  numsteps,
Keylist keys,
int  step,
int  onestep,
int  render,
unsigned long  mode 
)

Checks key masks.

Because if they're masked up until the current position, pre-existing (or current) field should be used.

Parameters
viewpointer to Viewmode struct
numstepsnumber of steps
keyslist of keyframes
stepstep value
onestep
render
mode

Definition at line 141 of file gk.c.

◆ gk_free_key()

void gk_free_key ( Keylist ok)

Free keyframe list.

Parameters
okpointer to Keylist struct

Definition at line 271 of file gk.c.

References G_free(), and key_node::next.

Referenced by GK_clear_keys().

◆ gk_get_mask_sofar()

unsigned long gk_get_mask_sofar ( float  time,
Keylist keys 
)

Get mask value.

Get begin & end pos, AND all masks in keys <= pos

Time must be between 0.0 & 1.0

Parameters
timetimestamp
keyslist of keyframes
Returns
mask value

Definition at line 79 of file gk.c.

References key_node::fieldmask, key_node::next, and key_node::pos.

◆ gk_make_framesfromkeys()

Viewnode* gk_make_framesfromkeys ( Keylist keys,
int  keysteps,
int  newsteps,
int  loop,
float  t 
)

Generate viewnode from keyframes.

Here we use a cardinal cubic spline

Parameters
keyslist of keyframes
keystepskeyframe step
newstepsnew step value
looploop indicator
t
Returns
pointer to Viewnode
NULL on failure

Definition at line 301 of file gk.c.

References x.

◆ gk_make_linear_framesfromkeys()

Viewnode* gk_make_linear_framesfromkeys ( Keylist keys,
int  keysteps,
int  newsteps,
int  loop 
)

Generate viewnode from keyframe list (linear interpolation)

Here we use linear interpolation. Loop variable isn't used, but left in for use in possible "linear interp with smoothing" version.

Parameters
kesykeyframe list
keystepsstep value
newstepsnew step value
looploop indicator
pointerto viewnode struct
NULLon failure

Definition at line 604 of file gk.c.

References _, correct_twist(), view_node::fields, key_node::fields, G_free(), G_malloc, G_warning(), get_2key_neighbors(), gk_viable_keys_for_mask(), KF_NUMFIELDS, lin_interp(), key_node::next, NULL, and key_node::pos.

◆ GK_move_key()

int GK_move_key ( float  oldpos,
float  precis,
float  newpos 
)

Move keyframe.

Precis works as in other functions - to identify keyframe to move. Only the first keyframe in the precis range will be moved.

Parameters
oldposold position
precisprecision value
newposnew position
Returns
number of keys moved (1 or 0)

Definition at line 336 of file gk2.c.

References key_node::next, and key_node::pos.

◆ GK_print_keys()

void GK_print_keys ( const char *  name)

Print keyframe info.

Parameters
namefilename

Definition at line 209 of file gk2.c.

References _, key_node::fields, G_fatal_error(), KF_DIRX, KF_DIRY, KF_DIRZ, KF_FOV, KF_FROMX, KF_FROMY, KF_FROMZ, KF_TWIST, key_node::next, NULL, and key_node::pos.

◆ GK_set_interpmode()

int GK_set_interpmode ( int  mode)

Set interpolation mode.

Parameters
modeinterpolation mode (KF_LINEAR or KF_SPLINE)
Returns
1 on success
-1 on error (invalid interpolation mode)

Definition at line 140 of file gk2.c.

◆ GK_set_numsteps()

void GK_set_numsteps ( int  newsteps)

Set the number of frames to be interpolated from keyframes.

Parameters
newstepsnumber of frames

Definition at line 297 of file gk2.c.

◆ GK_set_tension()

void GK_set_tension ( float  tens)

Set value for tension when interpmode is KF_SPLINE.

Parameters
tensvalue tens should be between 0.0; 1.0.

Definition at line 155 of file gk2.c.

◆ GK_show_list()

void GK_show_list ( int  flag)

Show list.

Parameters
flag

Definition at line 611 of file gk2.c.

◆ GK_show_path()

void GK_show_path ( int  flag)

Draw the current path.

Parameters
flag

Definition at line 502 of file gk2.c.

◆ GK_show_site()

void GK_show_site ( int  flag)

Show point sets.

Parameters
flag

Definition at line 555 of file gk2.c.

◆ GK_show_vect()

void GK_show_vect ( int  flag)

Show vector sets.

Parameters
flag

Definition at line 529 of file gk2.c.

◆ GK_show_vol()

void GK_show_vol ( int  flag)

Show volumes.

Parameters
flag

Definition at line 583 of file gk2.c.

◆ GK_showtension_start()

void GK_showtension_start ( void  )

Definition at line 175 of file gk2.c.

◆ GK_showtension_stop()

void GK_showtension_stop ( void  )

Show tension stop ?

Use GK_showtension_start/GK_update_tension/GK_showtension_stop to initialize and stop multi-view display of path when changing tension.

Definition at line 187 of file gk2.c.

◆ GK_update_frames()

void GK_update_frames ( void  )

Recalculate path using the current number of frames requested.

Call after changing number of frames or when Keyframes change.

Definition at line 243 of file gk2.c.

Referenced by GK_update_tension().

◆ GK_update_tension()

void GK_update_tension ( void  )

Update tension.

Definition at line 195 of file gk2.c.

References GK_update_frames().

◆ gk_viable_keys_for_mask()

int gk_viable_keys_for_mask ( unsigned long  mask,
Keylist keys,
Keylist **  keyret 
)

ADD.

Parameters
maskmask value
keyslist of keyframes
[out]keyretoutput list of keyframes
Returns
number of output keyframes

Definition at line 112 of file gk.c.

References key_node::fieldmask, and key_node::next.

Referenced by gk_make_linear_framesfromkeys().

◆ gln_num_points()

int gln_num_points ( geoline gln)

Get number of line vertices.

Parameters
glnline (geoline)
Returns
number of vertices

Definition at line 196 of file gv_quick.c.

References g_line::next, and g_line::npts.

Referenced by gv_num_points().

◆ GP_alldraw_site()

void GP_alldraw_site ( void  )

Draw all available point sets.

Definition at line 607 of file gp2.c.

◆ GP_attmode_color()

int GP_attmode_color ( int  ,
const char *   
)

◆ GP_attmode_none()

int GP_attmode_none ( int  )

◆ GP_delete_site()

int GP_delete_site ( int  id)

Delete registrated point set.

Parameters
idpoint set id
Returns
1 on success
-1 on error (point sets not available)

Definition at line 131 of file gp2.c.

References G_debug(), gp_delete_site(), and GP_site_exists().

◆ gp_delete_site()

void gp_delete_site ( int  id)

Delete point set and remove from list.

Parameters
idpoint set id

Definition at line 235 of file gp.c.

References G_debug(), gp_free_site(), and gp_get_site().

Referenced by GP_delete_site().

◆ GP_draw_site()

void GP_draw_site ( int  id)

Draw point set.

Parameters
idpoint set id

Definition at line 573 of file gp2.c.

References g_site::drape_surf_id, G_debug(), gp_get_site(), gpd_2dsite(), gpd_3dsite(), GS_get_region(), gs_get_surf(), g_site::has_z, g_site::n_surfs, and g_site::use_z.

Referenced by Nviz_draw_all_site().

◆ gp_free_site()

int gp_free_site ( geosite fp)

Free allocated geosite struct.

Parameters
fppointer to geosite struct
Returns
1 on success
-1 on failure

Definition at line 258 of file gp.c.

References G_debug(), G_free(), gp_free_sitemem(), g_site::gsite_id, g_site::next, and NULL.

Referenced by gp_delete_site().

◆ gp_free_sitemem()

void gp_free_sitemem ( geosite fp)

Free geosite (lower level)

Parameters
fppointer to geosite struct

Definition at line 307 of file gp.c.

Referenced by gp_free_site().

◆ GP_Get_ClientData()

void* GP_Get_ClientData ( int  id)

Get client data.

Parameters
idpoint set id
Returns
pointer to client data
NULL on error

Definition at line 649 of file gp2.c.

References g_site::clientdata, gp_get_site(), and NULL.

◆ gp_get_last_site()

geosite* gp_get_last_site ( void  )

Get last point set.

Returns
pointer to geosite struct
NULL if no point set is available

Definition at line 93 of file gp.c.

References G_debug(), g_site::gsite_id, g_site::next, and NULL.

Referenced by gp_get_new_site().

◆ gp_get_new_site()

geosite* gp_get_new_site ( void  )

Create new geosite instance and add it to list.

Returns
pointer to geosite struct
NULL on error

Definition at line 116 of file gp.c.

References FIRST_SITE_ID, G_debug(), G_malloc, G_zero(), gp_get_last_site(), g_site::gsite_id, g_site::hstyle, g_site::next, NULL, and g_site::style.

◆ gp_get_prev_site()

geosite* gp_get_prev_site ( int  id)

Get previous geosite struct from list.

Parameters
idpoint set id
Returns
pointer to geosite struct
NULL on failure

Definition at line 55 of file gp.c.

References G_debug(), g_site::gsite_id, g_site::next, and NULL.

◆ gp_get_site()

geosite* gp_get_site ( int  id)

◆ GP_get_site_list()

int* GP_get_site_list ( int *  numsites)

Get list of point sets.

Must freed when no longer needed!

Parameters
numsitesnumber of point sets
Returns
pointer to list of points sets
NULL on error

Definition at line 101 of file gp2.c.

Referenced by Nviz_draw_all_site().

◆ GP_get_sitename()

int GP_get_sitename ( int  id,
char **  filename 
)

Get point set filename.

Note: char array is allocated by G_store()

Parameters
idpoint set id
[out]filenamepoint set filename
Returns
-1 on error (point set not found)
1 on success

Definition at line 208 of file gp2.c.

◆ GP_get_style()

int GP_get_style ( int  id,
int *  color,
int *  width,
float *  size,
int *  symbol 
)

Get point set style.

Parameters
idpoint set id
Returns
1 on success
-1 on error (point set not found)

Definition at line 231 of file gp2.c.

◆ GP_get_trans()

void GP_get_trans ( int  id,
float *  xtrans,
float *  ytrans,
float *  ztrans 
)

Get transformation params.

Parameters
idpoint set id
[out]xtrans,ytrans,ztransx/y/z values

Definition at line 453 of file gp2.c.

References G_debug(), gp_get_site(), g_site::x_trans, g_site::y_trans, and g_site::z_trans.

◆ GP_get_zmode()

int GP_get_zmode ( int  id,
int *  use_z 
)

Get z-mode.

Todo:
Who's using this?
Parameters
idpoint set id
[out]use_znon-zero code to use z
Returns
-1 on error (invalid point set id)
1 on success

Definition at line 410 of file gp2.c.

References G_debug(), gp_get_site(), NULL, and g_site::use_z.

◆ gp_init_site()

int gp_init_site ( geosite gp)

Initialize geosite struct.

Todo:
Currently does nothing
Parameters
gppointer to geosite struct
Returns
-1 on failure
0 on success

Definition at line 219 of file gp.c.

References G_debug().

◆ GP_load_site()

int GP_load_site ( int  id,
const char *  filename 
)

Load point set from file.

Check to see if handle already loaded, if so - free before loading new for now, always load to memory.

Todo:
load file handle & ready for reading instead of using memory
Parameters
idpoint set id
filenamepoint set filename
Returns
-1 on error
1 on success

Definition at line 172 of file gp2.c.

◆ Gp_load_sites()

geopoint* Gp_load_sites ( const char *  name,
int *  nsites,
int *  has_z 
)

Load to points to memory.

The other alternative may be to load to a tmp file.

Parameters
namename of vector map to be loaded
[out]nsitesnumber of loaded points
[out]has_z2D or 3D points data loaded?
Returns
pointer to geopoint struct (array)
NULL on failure

Definition at line 40 of file gp3.c.

◆ Gp_load_sites_thematic()

int Gp_load_sites_thematic ( geosite gp,
struct Colors colors 
)

Load styles for geopoints based on thematic mapping.

Parameters
gppointer to geosite structure
colorspointer to Colors structure or NULL
Returns
number of points defined by thematic mapping
-1 on error

Definition at line 171 of file gp3.c.

◆ GP_new_site()

int GP_new_site ( void  )

Create new point set.

Returns
point set id
-1 on error (number of point sets exceeded)

Definition at line 63 of file gp2.c.

◆ GP_num_sites()

int GP_num_sites ( void  )

Get number of loaded point sets.

Returns
number of point sets

Definition at line 86 of file gp2.c.

References gp_num_sites().

◆ gp_num_sites()

int gp_num_sites ( void  )

Get number of loaded point sets.

Returns
number of point sets

Definition at line 75 of file gp.c.

References G_debug(), and g_site::next.

Referenced by GP_num_sites().

◆ GP_select_surf()

int GP_select_surf ( int  hp,
int  hs 
)

Select surface for given point set.

Parameters
hppoint set id
hssurface id
Returns
1 surface selected
-1 on error

Definition at line 480 of file gp2.c.

References g_site::drape_surf_id, G_debug(), gp_get_site(), GP_surf_is_selected(), GS_surf_exists(), and g_site::n_surfs.

◆ GP_Set_ClientData()

int GP_Set_ClientData ( int  id,
void *  clientd 
)

Set client data.

Parameters
idpoint set id
clientdclient data
Returns
1 on success
-1 on error (invalid point set id)

Definition at line 627 of file gp2.c.

References g_site::clientdata, and gp_get_site().

◆ Gp_set_color()

int Gp_set_color ( const char *  ,
geopoint  
)

◆ gp_set_defaults()

int gp_set_defaults ( geosite gp)

Set default value for geosite struct.

Parameters
gppointer to geosite struct
Returns
1 on success
-1 on failure

Definition at line 186 of file gp.c.

References g_vect_style::color, G_debug(), GS_get_longdim(), g_site::gsite_id, g_site::hstyle, NULL, g_vect_style::size, ST_X, g_site::style, g_vect_style::symbol, g_site::tstyle, and g_vect_style::width.

◆ gp_set_drapesurfs()

void gp_set_drapesurfs ( geosite ,
int *  ,
int   
)

◆ GP_set_style()

int GP_set_style ( int  id,
int  color,
int  width,
float  size,
int  symbol 
)

Set point style.

Supported icon symbols (markers):

  • ST_X
  • ST_BOX
  • ST_SPHERE
  • ST_CUBE
  • ST_DIAMOND
  • ST_DEC_TREE
  • ST_CON_TREE
  • ST_ASTER
  • ST_GYRO
  • ST_HISTOGRAM
Parameters
idpoint set id
coloricon color
widthicon line width
sizeicon size
symbolicon symbol
Returns
1 on success
-1 on error (point set not found)

Definition at line 273 of file gp2.c.

◆ GP_set_style_thematic()

int GP_set_style_thematic ( int  id,
int  layer,
const char *  color,
const char *  width,
const char *  size,
const char *  symbol,
struct Colors color_rules 
)

Set point set style for thematic mapping.

Updates also style for each geopoint.

Parameters
idpoint set id
layerlayer number for thematic mapping (-1 for undefined)
coloricon color column name
widthicon line width column name
sizeicon size column name
symbolicon symbol column name
colorspointer to Colors structure or NULL
Returns
1 on success
-1 on error (point set not found)

Definition at line 308 of file gp2.c.

◆ GP_set_trans()

void GP_set_trans ( int  id,
float  xtrans,
float  ytrans,
float  ztrans 
)

Set transformation params.

Parameters
idpoint set id
xtrans,ytrans,ztransx/y/z values

Definition at line 430 of file gp2.c.

References G_debug(), gp_get_site(), g_site::x_trans, g_site::y_trans, and g_site::z_trans.

◆ GP_set_zmode()

int GP_set_zmode ( int  id,
int  use_z 
)

Set z mode for point set.

Parameters
idpoint set id
use_zTRUE to use z-coordinaces when vector map is 3D
Returns
1 on success
0 vector map is not 3D
-1 on error (invalid point set id)

Definition at line 376 of file gp2.c.

References G_debug(), gp_get_site(), g_site::has_z, NULL, and g_site::use_z.

◆ GP_site_exists()

int GP_site_exists ( int  id)

Check if point set exists.

Parameters
idpoint set id
Returns
1 found
0 not found

Definition at line 36 of file gp2.c.

References G_debug(), gp_get_site(), and NULL.

Referenced by GP_delete_site().

◆ GP_str_to_marker()

int GP_str_to_marker ( const char *  str)

Determine point marker symbol for string.

Supported markers:

  • ST_X
  • ST_BOX
  • ST_SPHERE
  • ST_CUBE
  • ST_DIAMOND
  • ST_DEC_TREE
  • ST_CON_TREE
  • ST_ASTER
  • ST_GYRO
  • ST_HISTOGRAM
Parameters
strstring buffer
Returns
marker code (default: ST_SPHERE)

Definition at line 680 of file gp2.c.

References _, G_warning(), ST_ASTER, ST_BOX, ST_CON_TREE, ST_CUBE, ST_DEC_TREE, ST_DIAMOND, ST_GYRO, ST_HISTOGRAM, ST_SPHERE, and ST_X.

◆ GP_surf_is_selected()

int GP_surf_is_selected ( int  hp,
int  hs 
)

Check if surface is selected.

Parameters
hppoint set id
hssurface id
Returns
1 selected
0 not selected

Definition at line 548 of file gp2.c.

References g_site::drape_surf_id, G_debug(), gp_get_site(), and g_site::n_surfs.

Referenced by GP_select_surf(), and GP_unselect_surf().

◆ GP_unselect_surf()

int GP_unselect_surf ( int  hp,
int  hs 
)

Unselect surface.

Parameters
hppoint set id
hssurface id
Returns
1 surface unselected
-1 on error

Definition at line 510 of file gp2.c.

References g_site::drape_surf_id, G_debug(), gp_get_site(), GP_surf_is_selected(), and g_site::n_surfs.

◆ GP_unset_style_thematic()

int GP_unset_style_thematic ( int  id)

Make style for thematic mapping inactive.

Parameters
idpoint set id
Returns
1 on success
-1 on error (point set not found)

Definition at line 348 of file gp2.c.

References g_vect_style_thematic::active, G_debug(), gp_get_site(), NULL, and g_site::tstyle.

◆ gp_update_drapesurfs()

void gp_update_drapesurfs ( void  )

Update drape surfaces.

Call after surface is deleted

Definition at line 154 of file gp.c.

References g_site::drape_surf_id, gs_get_surf(), g_site::n_surfs, g_site::next, and NULL.

◆ gpd_2dsite()

int gpd_2dsite ( geosite gp,
geosurf gs,
int  do_fast 
)

Draw 2D point set.

Need to think about translations - If user translates surface, sites should automatically go with it, but translating sites should translate it relative to surface on which it's displayed

Handling mask checking here

Todo:
prevent scaling by 0
Parameters
gpsite (geosite)
gssurface (geosurf)
do_fast(unused)
Returns
0 on failure
1 on success

Definition at line 216 of file gpd.c.

Referenced by GP_draw_site().

◆ gpd_3dsite()

int gpd_3dsite ( geosite gp,
float  xo,
float  yo,
int  do_fast 
)

Draw 3D point set.

Parameters
gpsite (geosite)
xo,yo
do_fast(unused)
Returns
0 on success
1 on failure

Definition at line 313 of file gpd.c.

Referenced by GP_draw_site().

◆ gpd_obj()

void gpd_obj ( geosurf gs,
gvstyle style,
Point3  pt 
)

Draw point representing object.

Do normal transforms before calling

Note gs: NULL if 3d obj or const elev surface

Parameters
gssurface (geosurf)
styleobject displaying style (highlighted or not)
pt3d point (Point3)

Definition at line 71 of file gpd.c.

References CM_COLOR, CM_DIFFUSE, g_vect_style::color, GS_global_exag(), GS_v3eq(), gsd_box(), gsd_color_func(), gsd_colormode(), gsd_cube(), gsd_diamond(), gsd_draw_asterisk(), gsd_draw_box(), gsd_draw_gyro(), gsd_popmatrix(), gsd_pushmatrix(), gsd_scale(), gsd_sphere(), gsd_x(), g_vect_style::size, ST_ASTER, ST_BOX, ST_CUBE, ST_DIAMOND, ST_GYRO, ST_HISTOGRAM, ST_SPHERE, ST_X, g_vect_style::symbol, and Z.

Referenced by GS_draw_X().

◆ GS_alldraw_cplane_fences()

void GS_alldraw_cplane_fences ( void  )

Draw all cplace fences ?

Definition at line 3195 of file gs2.c.

References GS_draw_cplane_fence(), gsd_get_cplanes_state(), and MAX_CPLANES.

◆ GS_alldraw_surf()

void GS_alldraw_surf ( void  )

Draw all surfaces.

Definition at line 1936 of file gs2.c.

◆ GS_alldraw_wire()

void GS_alldraw_wire ( void  )

Draw all wires.

Overrides draw_mode for fast display

Definition at line 1919 of file gs2.c.

Referenced by Gs_load_3dview().

◆ gs_att_is_set()

int gs_att_is_set ( geosurf surf,
IFLAG  att 
)

Check if attribute is set.

Parameters
surfpointer to gsurf or NULL to look at all geosurfs
attattribute id
Returns
1 attribute is set up
0 attribute is not set up

Definition at line 149 of file gs.c.

References g_surf::att, gsurf_att::att_src, g_surf::next, and NOTSET_ATT.

Referenced by GS_transp_is_set().

◆ GS_background_color()

unsigned int GS_background_color ( void  )

Get background color.

Returns
color value

Definition at line 2452 of file gs2.c.

References geodisplay::bgcol.

◆ Gs_build_256lookup()

int Gs_build_256lookup ( const char *  filename,
int *  buff 
)

Build color table (256)

Calling function must have already allocated space in buff for range of data (256 for now) - simply calls get_color for each cat in color range

Parameters
filenameraster map name
[out]buffdata buffer
Returns
1 on success
0 on failure

Definition at line 576 of file gs3.c.

◆ gs_calc_normals()

int gs_calc_normals ( geosurf gs)

Calculate normals.

OPTIMIZED for constant dy & dx

The norm array is always the same size, but diff resolutions force resampled data points to have their normals recalculated, then only those norms are passed to n3f during drawing. Norms are converted to a packed unsigned int for storage, must be converted back at time of use.

Todo:
fix to correctly calculate norms when mapped to sphere!

Uses the previous and next cells (when available) for normal calculations to produce smoother normals

Parameters
gssurface (geosurf)
Returns
1 on success
0 on failure

Definition at line 124 of file gs_norms.c.

References calc_norm(), G_debug(), gs_update_curmask(), g_surf::gsurf_id, init_vars(), NALL, NBL, NBOT, NBR, NLFT, g_surf::norm_needupdate, g_surf::norms, NRGT, NTL, NTOP, NTR, VCOLS, VROWS, g_surf::x_mod, and g_surf::y_mod.

Referenced by GS_get_norm_at_xy(), GS_update_normals(), and gsd_surf().

◆ GS_check_cancel()

int GS_check_cancel ( void  )

Check for cancel.

Returns
code

Definition at line 30 of file gsx.c.

References Cxl_func.

◆ GS_clear()

void GS_clear ( int  col)

Clear view.

Parameters
colcolor value

Definition at line 3418 of file gs2.c.

References geodisplay::bgcol, and G_debug().

◆ gs_clip_segment()

int gs_clip_segment ( geosurf gs,
float *  bgn,
float *  end,
float *  region 
)

Clip segment.

Todo:
to use fast clipping and move to gs.c
Parameters
gssurface
bgnbegin point
endend point
regionregion settings
Returns
1 segment inside region
0 segment outside region

Definition at line 39 of file gvd.c.

◆ GS_coordpair_repeats()

int GS_coordpair_repeats ( float *  p1,
float *  p2,
int  nhist 
)

ADD.

Initialize by calling with a number nhist to represent number of previous entrys to check, then call with zero as nhist

Parameters
p1first point
p2second point
nhist?
Returns
-1 on error
-2
1
9

Definition at line 443 of file gs_util.c.

References NULL.

◆ GS_default_draw_color()

unsigned int GS_default_draw_color ( void  )

Get default draw color.

Returns
color value

Definition at line 2439 of file gs2.c.

References geodisplay::bgcol, and G_debug().

◆ GS_delete_list()

void GS_delete_list ( GLuint  list_id)

Delete pre-defined list.

Parameters
list_idlist id

Definition at line 891 of file gs2.c.

References gsd_deletelist().

◆ gs_delete_surf()

void gs_delete_surf ( int  id)

Remove geosurf struct from list.

Parameters
idsurface id

Definition at line 463 of file gs.c.

References G_debug(), gs_free_surf(), and gs_get_surf().

Referenced by GS_delete_surface().

◆ GS_delete_surface()

int GS_delete_surface ( int  id)

Delete surface.

Parameters
idsurface id
Returns
1 on success
-1 on error

Definition at line 1566 of file gs2.c.

References FALSE, G_debug(), gs_delete_surf(), and GS_surf_exists().

◆ GS_distance()

float GS_distance ( float *  from,
float *  to 
)

Calculate distance.

Parameters
from'from' point (X,Y,Z)
to'to' point (X,Y,Z)
Returns
distance

Definition at line 141 of file gs_util.c.

References x, X, Y, and Z.

Referenced by GS_look_here(), gs_setlos_enterdata(), gsd_zup_twist(), and gv_line_length().

◆ Gs_distance()

double Gs_distance ( double *  from,
double *  to 
)

Calculates distance in METERS between two points in current projection (2D)

Uses G_distance().

Parameters
from'from' point (X, Y)
to'to' point (X, Y)
Returns
distance

Definition at line 84 of file gs3.c.

Referenced by GS_geodistance().

◆ gs_distance_onsurf()

int gs_distance_onsurf ( geosurf gs,
float *  p1,
float *  p2,
float *  dist,
int  use_exag 
)

Calculate distance on surface.

Parameters
gspointer to geosurf struct
p1from point
p2to point
[out]distdistnace
use_exaguse exag for calculation
Returns
0 on error (points not in region)
1 on success

Definition at line 1417 of file gs.c.

◆ GS_done_draw()

◆ GS_draw_all_list()

void GS_draw_all_list ( void  )

Draw all glLists.

Uses glFlush() to ensure all drawing is complete before returning

Definition at line 879 of file gs2.c.

References gsd_calllists().

◆ GS_draw_cplane()

void GS_draw_cplane ( int  num)

Draw cplace.

Parameters
numcplace id

Definition at line 3148 of file gs2.c.

References gs_getall_surfaces(), gs_num_surfaces(), gsd_draw_cplane(), gsd_draw_cplane_fence(), and MAX_SURFS.

◆ GS_draw_cplane_fence()

int GS_draw_cplane_fence ( int  hs1,
int  hs2,
int  num 
)

Draw cplace fence ?

Parameters
hs1,hs2
numcplane id
Returns
0 on error
1 on success

Definition at line 3175 of file gs2.c.

References gs_get_surf(), gsd_draw_cplane_fence(), and NULL.

Referenced by GS_alldraw_cplane_fences().

◆ GS_draw_flowline_at_xy()

void GS_draw_flowline_at_xy ( int  id,
float  x,
float  y 
)

Draw flow-line on surace.

This is slow - should be moved to gs_ but GS_ good for testing and useful for app programmer

Parameters
idsurface id
x,ycoordinates of flow-line

Definition at line 756 of file gs2.c.

◆ GS_draw_fringe()

void GS_draw_fringe ( int  id,
unsigned long  clr,
float  elev,
int *  where 
)

Draw fringe around data (surface) at selected corners.

Parameters
idsurface id
clrcolor
elevelevation value
wherenw/ne/sw/se edges - 0 (turn off) 1 (turn on)

Definition at line 823 of file gs2.c.

References G_debug(), gs_get_surf(), and gsd_display_fringe().

◆ GS_draw_legend()

int GS_draw_legend ( const char *  name,
GLuint  fontbase,
int  size,
int *  flags,
float *  range,
int *  pt 
)

Draw legend.

Todo:
add legend from list option make font loading more flexible
Parameters
namelegend name
fontbasefont-base
size?
flagslegend flags
rangevalues range
pt?

Definition at line 848 of file gs2.c.

References gsd_put_legend().

◆ GS_draw_lighting_model()

void GS_draw_lighting_model ( void  )

Draw lighting model.

Just turn off any cutting planes and draw it just outside near clipping plane, since lighting is infinite now

Definition at line 941 of file gs2.c.

References gsd_cplane_off(), gsd_get_cplanes_state(), and MAX_CPLANES.

◆ GS_draw_lighting_model1()

void GS_draw_lighting_model1 ( void  )

Draw lighting model.

Definition at line 901 of file gs2.c.

◆ GS_draw_line_onsurf()

void GS_draw_line_onsurf ( int  id,
float  x1,
float  y1,
float  x2,
float  y2 
)

Draw line on surface.

Parameters
idsurface id
x1,y1,x2,y2line nodes

Definition at line 680 of file gs2.c.

◆ GS_draw_nline_onsurf()

int GS_draw_nline_onsurf ( int  id,
float  x1,
float  y1,
float  x2,
float  y2,
float *  lasp,
int  n 
)

Draw multiline on surface.

Like above but limits points in line to n or points found in segment, whichever is smaller.

Parameters
idsurface id
x1,y1,x2,y2line nodes
Returns
number of points used

Definition at line 718 of file gs2.c.

◆ GS_draw_surf()

void GS_draw_surf ( int  id)

Draw surface.

Parameters
idsurface id

Definition at line 1864 of file gs2.c.

References DM_GOURAUD, DM_POLY, DM_WIRE, DM_WIRE_POLY, g_surf::draw_mode, G_debug(), gs_get_surf(), gsd_shademodel(), gsd_surf(), and gsd_wire_surf().

◆ GS_draw_wire()

void GS_draw_wire ( int  id)

Draw surface wire.

Overrides draw_mode for fast display

Parameters
idsurface id

Definition at line 1899 of file gs2.c.

References G_debug(), gs_get_surf(), and gsd_wire_surf().

◆ GS_draw_X()

void GS_draw_X ( int  id,
float *  pt 
)

◆ GS_dv3norm()

int GS_dv3norm ( double *  dv1)

Changes v1 so that it is a unit vector.

Parameters
dv1vector
Returns
0 if magnitude of dv1 is zero
1 if magnitude of dv1 > 0

Definition at line 295 of file gs_util.c.

References X, Y, and Z.

◆ gs_err()

void gs_err ( const char *  )

Definition at line 34 of file gs.c.

References G_warning().

◆ gs_free_surf()

int gs_free_surf ( geosurf fs)

Free geosurf struct.

Parameters
fspointer to geosurf struct
Returns
1 found
0 not found
-1 on error

Definition at line 487 of file gs.c.

References g_surf::curmask, G_debug(), G_free(), gs_free_unshared_buffs(), g_surf::next, g_surf::norms, and NULL.

Referenced by gs_delete_surf().

◆ gs_free_unshared_buffs()

void gs_free_unshared_buffs ( geosurf fs)

Free unshared buffers of geosurf struct.

fs has already been taken out of the list

This function is fairly revealing about how shared datsets work

Parameters
fspointer to geosurf struct

Definition at line 557 of file gs.c.

Referenced by gs_free_surf().

◆ GS_geodistance()

double GS_geodistance ( double *  from,
double *  to,
const char *  units 
)

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.

Parameters
fromstarting point
toending point
unitsmap units
Returns
distance between two geographic coordinates in current projection

Definition at line 55 of file gs_util.c.

References Gs_distance().

◆ GS_get_aspect()

double GS_get_aspect ( void  )

Get aspect value.

Returns
aspect value

Definition at line 3452 of file gs2.c.

References Cell_head::bottom, G_debug(), and Cell_head::top.

Referenced by gsd_set_view().

◆ GS_get_att()

int GS_get_att ( int  id,
int  att,
int *  set,
float *  constant,
char *  mapname 
)

Get attributes.

Parameters
idsurface id
att
[out]set
[out]constant
[out]mapname
Returns
1 on success
-1 on error (invalid surface id)

Definition at line 1140 of file gs2.c.

◆ gs_get_att_src()

int gs_get_att_src ( geosurf gs,
int  desc 
)

Get attribute source.

Parameters
gspointer to geosurf struct
descattribute id (descriptor)
Returns
-1 on error
attribute source id

Definition at line 656 of file gs.c.

References g_surf::att, gsurf_att::att_src, G_debug(), g_surf::gsurf_id, and LEGAL_ATT.

Referenced by GS_draw_X(), GS_get_cat_at_xy(), GS_get_exag_guess(), GS_get_val_at_xy(), Gs_update_attrange(), gsd_surf(), gsd_wire_surf(), gsdrape_get_segments(), and viewcell_tri_interp().

◆ gs_get_att_typbuff()

typbuff* gs_get_att_typbuff ( geosurf gs,
int  desc,
int  to_write 
)

Get attribute data buffer.

Parameters
gspointer to geosurf struct
descattribute id (descriptor)
to_writenon-zero value for 'write'
Returns
NULL on error
pointer to typbuff

Definition at line 681 of file gs.c.

References g_surf::att, ATT_TOPO, G_debug(), gsdiff_do_SD(), gsdiff_get_SDref(), gsds_get_typbuff(), g_surf::gsurf_id, gsurf_att::hdata, NULL, and typbuff::tfunc.

Referenced by _viewcell_tri_interp(), GS_get_cat_at_xy(), GS_get_val_at_xy(), gs_update_curmask(), gsd_fringe_horiz_line(), gsd_fringe_horiz_line2(), gsd_fringe_horiz_poly(), gsd_fringe_vert_line(), gsd_fringe_vert_poly(), gsd_wire_arrows(), gsd_wire_surf_const(), gsd_wire_surf_map(), and gsdiff_set_SDref().

◆ gs_get_att_type()

int gs_get_att_type ( geosurf gs,
int  desc 
)

Get attribute type.

Parameters
gspointer to geosurf struct
descattribute id
Returns
-1 on error
attribute type

Definition at line 630 of file gs.c.

References g_surf::att, gsurf_att::att_src, gsurf_att::att_type, G_debug(), LEGAL_ATT, and NOTSET_ATT.

◆ GS_get_cat_at_xy()

int GS_get_cat_at_xy ( int  id,
int  att,
char *  catstr,
float  x,
float  y 
)

Get surface category on given position.

Prints "no data" or a description (i.e., "coniferous forest") to catstr. Usually call after GS_get_selected_point_on_surface(). Define att as MAP_ATT

Todo:
Allocate catstr using G_store()
Parameters
idsurface id
attattribute id (MAP_ATT)
catstrcat string (must be allocated, dim?)
x,yreal coordinates
Returns
-1 if no category info or point outside of window
1 on success

Definition at line 1183 of file gs2.c.

References _, g_surf::att, DRC2OFF, GET_MAPATT, gs_get_att_src(), gs_get_att_typbuff(), Gs_get_cat_label(), gs_get_surf(), gs_point_is_masked(), gsd_real2surf(), gsds_get_name(), gsurf_att::hdata, in_vregion(), MAP_ATT, NULL, VCOL2DCOL, VROW2DROW, x, X, X2VCOL, Y, and Y2VROW.

◆ Gs_get_cat_label()

int Gs_get_cat_label ( const char *  filename,
int  drow,
int  dcol,
char *  catstr 
)

Get categories/labels.

Formats label as in d.what.rast -> (catval) catlabel

Parameters
filenameraster map name
drow
dcol
catstrcategory string
Returns
1 on success
0 on failure

Definition at line 776 of file gs3.c.

Referenced by GS_get_cat_at_xy().

◆ GS_Get_ClientData()

void* GS_Get_ClientData ( int  id)

Get client data.

Parameters
idsurface id
Returns
pointer to client data
NULL on error

Definition at line 1507 of file gs2.c.

References g_surf::clientdata, gs_get_surf(), and NULL.

◆ gs_get_data_avg_zmax()

int gs_get_data_avg_zmax ( float *  azmax)

Get average z-max value.

Useful for setting position of cplane, lighting ball, etc.

Parameters
[out]azmaxaverage z-max value
Returns
-1 on error
1 on success

Definition at line 1203 of file gs.c.

References g_surf::next.

Referenced by GS_get_modelposition1().

◆ gs_get_databounds_planes()

void gs_get_databounds_planes ( Point4 planes)

Get data bounds for plane.

Parameters
[out]planes

Definition at line 469 of file gs_query.c.

Referenced by gs_setlos_enterdata().

◆ gs_get_datacenter()

int gs_get_datacenter ( float *  cen)

Get data center point.

Parameters
[out]center(array X,Y,Z)
Returns
-1 on error
1 on success

Definition at line 1232 of file gs.c.

References g_surf::next, X, g_surf::xmax, g_surf::xmin, Y, g_surf::ymax, g_surf::ymin, Z, g_surf::zmax, and g_surf::zmin.

Referenced by GS_get_modelposition1(), and gsd_set_view().

◆ GS_get_dims()

void GS_get_dims ( int  id,
int *  rows,
int *  cols 
)

Get dimension of surface.

Parameters
idsurface id
[out]rows,colsnumber of rows/cols

Definition at line 2279 of file gs2.c.

References g_surf::cols, gs_get_surf(), and g_surf::rows.

◆ GS_get_distance_alongsurf()

int GS_get_distance_alongsurf ( int  hs,
float  x1,
float  y1,
float  x2,
float  y2,
float *  dist,
int  use_exag 
)

Measure distance "as the ball rolls" between two points on surface.

Parameters
hssurface id
x1,y1,x2,y2two points on surface
[out]distmeasured distance
use_exaguse exag. surface
Returns
0 on error or if one or more points is not in region
distance following terrain

Definition at line 3285 of file gs2.c.

◆ GS_get_drawmode()

int GS_get_drawmode ( int  id,
int *  mode 
)

Get draw mode.

Parameters
idsurface id
[out]modemode id
Returns
1 on success
-1 on error (invalid surface id)

Definition at line 2109 of file gs2.c.

◆ GS_get_drawres()

void GS_get_drawres ( int  id,
int *  xres,
int *  yres,
int *  xwire,
int *  ywire 
)

Get draw resolution of surface.

Parameters
idsurface id
[out]xres,yresx/y resolution value
[out]xwire,ywirex/y wire value

Definition at line 2255 of file gs2.c.

References G_debug(), gs_get_surf(), g_surf::x_mod, g_surf::x_modw, g_surf::y_mod, and g_surf::y_modw.

◆ GS_get_exag_guess()

int GS_get_exag_guess ( int  id,
float *  exag 
)

Get exag-value guess.

Use no_zero range because if zero IS data, then range won't be that much off (it's just a GUESS, after all), but if zero is NO data, could drastically affect guess

Parameters
idsurface id
[out]exagexag value
Returns
1 on success
-1 on error

Definition at line 2306 of file gs2.c.

References ATT_TOPO, CONST_ATT, G_debug(), gs_get_att_src(), gs_get_surf(), and g_surf::zrange_nz.

Referenced by Nviz_get_exag(), and Nviz_get_exag_height().

◆ GS_get_fencecolor()

int GS_get_fencecolor ( void  )

Get fence color.

Returns
color value

Definition at line 3268 of file gs2.c.

References gsd_getfc().

◆ GS_get_focus()

int GS_get_focus ( float *  realto)

Get focus.

OK to call with NULL argument if just want to check state

Parameters
realtoreal coordinates to
Returns
?

Definition at line 2563 of file gs2.c.

References G_debug(), GS_v3eq(), geoview::infocus, and geoview::real_to.

◆ GS_get_fov()

int GS_get_fov ( void  )

Get fied of view.

Returns
field of view, in 10ths of degrees

Definition at line 2855 of file gs2.c.

References geoview::fov.

◆ GS_get_from()

void GS_get_from ( float *  fr)

Get viewpoint 'from' position.

Parameters
[out]frfrom model coordinates

Definition at line 2725 of file gs2.c.

References FROM, geoview::from_to, G_debug(), and GS_v3eq().

Referenced by Nviz_get_viewpoint_position(), and Nviz_set_viewpoint_position().

◆ GS_get_from_real()

void GS_get_from_real ( float *  fr)

Get viewpoint 'from' real coordinates.

Parameters
[out]fr'from' real coordinates

Definition at line 2739 of file gs2.c.

References FROM, geoview::from_to, GS_v3eq(), and gsd_model2real().

◆ gs_get_last_surface()

geosurf* gs_get_last_surface ( void  )

Get last allocated geosurf struct from list.

Returns
pointer to geosurf struct

Definition at line 172 of file gs.c.

References G_debug(), g_surf::gsurf_id, g_surf::next, and NULL.

Referenced by gs_get_new_surface().

◆ GS_get_light_reset()

int GS_get_light_reset ( void  )

Definition at line 258 of file gs2.c.

Referenced by GS_new_light().

◆ GS_get_longdim()

int GS_get_longdim ( float *  dim)

Get largest dimension.

Parameters
[out]dimdimension
Returns
1

Definition at line 140 of file gs2.c.

Referenced by gp_set_defaults(), GS_draw_X(), Nviz_get_exag_height(), and Nviz_update_ranges().

◆ GS_get_maskmode()

int GS_get_maskmode ( int  id,
int *  mode 
)

Get mask mode.

Parameters
idsurface id
[out]modeid
Returns
1 on success
-1 on error (invalid surface id)

Definition at line 1461 of file gs2.c.

◆ GS_get_modelposition()

void GS_get_modelposition ( float *  siz,
float *  pos 
)

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.

Parameters
siz[out]size
pos[out]coordinates (X, Y, Z)

Definition at line 531 of file gs2.c.

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

◆ GS_get_modelposition1()

void GS_get_modelposition1 ( float *  )

◆ gs_get_new_surface()

geosurf* gs_get_new_surface ( void  )

Allocate new geosurf struct.

Returns
pointer to geosurf struct

Definition at line 193 of file gs.c.

References FIRST_SURF_ID, G_debug(), G_malloc, gs_get_last_surface(), g_surf::gsurf_id, g_surf::next, and NULL.

◆ GS_get_norm_at_xy()

int GS_get_norm_at_xy ( int  id,
float  x,
float  y,
float *  nv 
)

Get surface normal at x,y (real coordinates)

Usually call after GS_get_selected_point_on_surface()

Parameters
idsurface id
x,yreal coordinates
[out]nvsurface normal
Returns
-1 if point outside of window or masked
1 on success

Definition at line 1246 of file gs2.c.

References DRC2OFF, FNORM, gs_calc_normals(), gs_get_surf(), gs_point_is_masked(), gsd_real2surf(), in_vregion(), g_surf::norm_needupdate, g_surf::norms, NULL, VCOL2DCOL, VROW2DROW, x, X, X2VCOL, Y, and Y2VROW.

◆ GS_get_nozero()

int GS_get_nozero ( int  id,
int  att,
int *  mode 
)

Get no-zero ?

Parameters
idsurface id
attattribute id
[out]modemode id
Returns
-1 on error (invalid surface id)
1 on success

Definition at line 2164 of file gs2.c.

◆ gs_get_prev_surface()

geosurf* gs_get_prev_surface ( int  id)

Get previous geosurf struct.

Parameters
idcurrent surface id
Returns
pointer to geosurf struct
NULL if not found

Definition at line 86 of file gs.c.

References G_debug(), g_surf::gsurf_id, g_surf::next, NULL, and ps.

Referenced by gs_init_surf().

◆ GS_get_region()

int GS_get_region ( float *  n,
float *  s,
float *  w,
float *  e 
)

Get 2D region extent.

Parameters
[out]n,s,w,eextent values
Returns
1

Definition at line 156 of file gs2.c.

Referenced by GP_draw_site().

◆ GS_get_rotation_matrix()

void GS_get_rotation_matrix ( double *  )

Get rotation matrix.

Definition at line 2929 of file gs2.c.

References geoview::rotate, and georot::rotMatrix.

◆ GS_get_scale()

void GS_get_scale ( float *  sx,
float *  sy,
float *  sz,
int  doexag 
)

Get axis scale.

Parameters
sx,sy,szx/y/z scale values
doexaguse vertical exaggeration

Definition at line 3240 of file gs2.c.

References geoview::scale, and geoview::vert_exag.

Referenced by gsd_do_scale(), gsd_model2surf(), gsd_surf2model(), and gsd_wire_arrows().

◆ GS_get_SDscale()

int GS_get_SDscale ( float *  scale)

Get ?

Parameters
[out]scalevalue
Returns
1

Definition at line 1105 of file gs2.c.

◆ GS_get_SDsurf()

int GS_get_SDsurf ( int *  id)

Get ?

Parameters
[out]id?
Returns
1 on success
0 on error

Definition at line 1085 of file gs2.c.

References gsdiff_get_SDref().

◆ GS_get_selected_point_on_surface()

int GS_get_selected_point_on_surface ( int  sx,
int  sy,
int *  id,
float *  x,
float *  y,
float *  z 
)

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.

Parameters
sx,syscreen coordinates
[out]idsurface id
[out]x,y,zpoint on surface (model coordinates?)
Returns
0 if no intersections found
number of intersections

Definition at line 3054 of file gs2.c.

References MAX_SURFS.

Referenced by GS_look_here(), and GS_set_Narrow().

◆ gs_get_surf()

◆ GS_get_surf_list()

int* GS_get_surf_list ( int *  numsurfs)

Get surface list.

Must be freed when not neeed!

Parameters
[out]numsurfnumber of available surfaces
Returns
pointer to surface array
NULL on error

Definition at line 1539 of file gs2.c.

Referenced by Nviz_draw_all_surf(), Nviz_get_exag(), and Nviz_get_exag_height().

◆ GS_get_to()

void GS_get_to ( float *  to)

Get 'to' model coordinates.

Todo:
need set_to? - just use viewdir?
Parameters
[out]to'to' model coordinates

Definition at line 2795 of file gs2.c.

References geoview::from_to, G_debug(), GS_v3eq(), and TO.

◆ GS_get_to_real()

void GS_get_to_real ( float *  to)

Get 'to' real coordinates.

Parameters
[out]to'to' real coordinates

Definition at line 2752 of file gs2.c.

References G_get_set_window().

◆ GS_get_trans()

void GS_get_trans ( int  id,
float *  xtrans,
float *  ytrans,
float *  ztrans 
)

Get translation values (surface position)

Parameters
idsurface id
[out]xtrans,ytrans,ztranstrans values

Definition at line 2415 of file gs2.c.

References G_debug(), gs_get_surf(), g_surf::x_trans, g_surf::y_trans, and g_surf::z_trans.

◆ GS_get_twist()

int GS_get_twist ( void  )

Get twist value.

10ths of degrees off twelve o'clock

Definition at line 2865 of file gs2.c.

References geoview::twist.

◆ GS_get_val_at_xy()

int GS_get_val_at_xy ( int  id,
int  att,
char *  valstr,
float  x,
float  y 
)

Get RGB color at given point.

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

Parameters
idsurface id
attattribute id
[out]valstrvalue string (allocated, dim?)
x,yreal coordinates
Returns
-1 if point outside of window or masked
1 on success

Definition at line 1310 of file gs2.c.

References g_surf::att, ATT_COLOR, b, CONST_ATT, gsurf_att::constant, DRC2OFF, g, GET_MAPATT, gs_get_att_src(), gs_get_att_typbuff(), gs_get_surf(), gs_mapcolor(), gs_point_is_masked(), gsd_real2surf(), in_vregion(), INT_TO_BLU, INT_TO_GRN, INT_TO_RED, MAP_ATT, NULL, r, VCOL2DCOL, VROW2DROW, x, X, X2VCOL, Y, and Y2VROW.

◆ GS_get_viewdir()

void GS_get_viewdir ( float *  dir)

Get viewdir.

Parameters
[out]dirviewdir value

Definition at line 2809 of file gs2.c.

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

◆ GS_get_wire_color()

int GS_get_wire_color ( int  id,
int *  colr 
)

Get wire color.

Parameters
idsurface id
[out]colrcolor value
Returns
1 on success
-1 on error

Definition at line 2038 of file gs2.c.

References gs_get_surf(), and g_surf::wire_color.

◆ gs_get_xextents()

int gs_get_xextents ( geosurf gs,
float *  min,
float *  max 
)

Get x-extent values.

Parameters
gspointer to geosurf struct
[out]minx-min value
[out]maxx-max value
Returns
1

Definition at line 1016 of file gs.c.

References g_surf::x_trans, g_surf::xmax, and g_surf::xmin.

Referenced by gs_get_xrange().

◆ gs_get_xrange()

int gs_get_xrange ( float *  min,
float *  max 
)

Get x-range.

Parameters
[out]minx-min value
[out]maxx-max value
Returns
-1 on error (no surface)
1 on success

Definition at line 1126 of file gs.c.

References gs_get_xextents(), and g_surf::next.

◆ gs_get_yextents()

int gs_get_yextents ( geosurf gs,
float *  min,
float *  max 
)

Get y-extent values.

Parameters
gspointer to geosurf struct
[out]miny-min value
[out]maxy-max value
Returns
1

Definition at line 1033 of file gs.c.

References g_surf::y_trans, g_surf::ymax, and g_surf::ymin.

Referenced by gs_get_yrange().

◆ gs_get_yrange()

int gs_get_yrange ( float *  min,
float *  max 
)

Get y-range.

Parameters
[out]miny-min value
[out]maxy-max value
Returns
-1 on error (no surface)
1 on success

Definition at line 1164 of file gs.c.

References gs_get_yextents(), and g_surf::next.

◆ GS_get_zextents()

int GS_get_zextents ( int  id,
float *  min,
float *  max,
float *  mid 
)

Get z-extent for a single surface.

Parameters
idsurface id
[out]minmin z-value
[out]maxmax z-value
[out]midmiddle z-value
Returns
-1 on error (invalid surface id)
?

Definition at line 2666 of file gs2.c.

References G_debug(), gs_get_surf(), gs_get_zextents(), and NULL.

◆ gs_get_zextents()

int gs_get_zextents ( geosurf gs,
float *  min,
float *  max,
float *  mid 
)

Get z-extent values.

Todo:
pass flag to use zminmasked instead of zmin
Parameters
gspointer to geosurf struct
[out]minz-min value
[out]maxz-max value
[out]midz-middle value
Returns
1

Definition at line 998 of file gs.c.

References min, g_surf::z_trans, g_surf::zmax, and g_surf::zmin.

Referenced by GS_get_zextents(), and gs_get_zrange().

◆ GS_get_zrange()

int GS_get_zrange ( float *  min,
float *  max,
int  doexag 
)

Get z-extent for all loaded surfaces.

Parameters
[out]minmin z-value
[out]maxmax z-value
doexaguse z-exaggeration
Returns
1 on success
-1 on error

Definition at line 2689 of file gs2.c.

References G_debug(), gs_get_zrange(), gvl_get_zrange(), and geoview::vert_exag.

Referenced by Gs_save_3dview(), gsd_check_focus(), gsd_do_scale(), gsd_model2surf(), and gsd_surf2model().

◆ gs_get_zrange()

int gs_get_zrange ( float *  min,
float *  max 
)

Get z-range.

Parameters
[out]minz-min value
[out]maxz-max value
Returns
-1 on error (no surface)
1 on success

Definition at line 1088 of file gs.c.

References gs_get_zextents(), and g_surf::next.

Referenced by GS_get_zrange().

◆ gs_get_zrange0()

int gs_get_zrange0 ( float *  min,
float *  max 
)

Get z-range.

Todo:
pass flag to use zminmasked instead of zmin could also have this return a weighted average for vertical "centroid"
Parameters
[out]minz-min value
[out]maxz-max value
Returns
-1 on error (no surface)
1 on success

Definition at line 1054 of file gs.c.

References g_surf::next, g_surf::zmax, and g_surf::zmin.

◆ GS_get_zrange_nz()

void GS_get_zrange_nz ( float *  min,
float *  max 
)

Get Z extents for all loaded surfaces.

Treating zeros as "no data"

Parameters
[out]minmin value
[out]maxmax value

Definition at line 2357 of file gs2.c.

Referenced by Nviz_get_exag_height(), and Nviz_update_ranges().

◆ gs_getall_surfaces()

int gs_getall_surfaces ( geosurf **  gsurfs)

Get array of geosurf structs.

Parameters
gsurfspointer to array
Returns
number of geosurfs

Definition at line 108 of file gs.c.

References G_debug(), and g_surf::next.

Referenced by GS_draw_cplane().

◆ GS_getlight_ambient()

void GS_getlight_ambient ( int  num,
float *  red,
float *  green,
float *  blue 
)

Get light ambient.

Parameters
numlight id (starts at 1)
[out]red,green,bluecolor values

Definition at line 424 of file gs2.c.

◆ GS_getlight_color()

void GS_getlight_color ( int  num,
float *  red,
float *  green,
float *  blue 
)

Get light color.

Parameters
numlight id (starts at 1)
[out]red,green,bluecolor values

Definition at line 380 of file gs2.c.

◆ GS_getlight_position()

void GS_getlight_position ( int  num,
float *  xpos,
float *  ypos,
float *  zpos,
int *  local 
)

Get light position.

Parameters
numlight id (starts at 1)
[out]xpos,ypos,zposcoordinates
[out]local?

Definition at line 335 of file gs2.c.

◆ GS_global_exag()

float GS_global_exag ( void  )

Get global z-exag value.

Returns
value

Definition at line 1999 of file gs2.c.

References G_debug(), and geoview::vert_exag.

Referenced by gpd_obj(), gsd_wire_arrows(), and Nviz_update_ranges().

◆ GS_has_transparency()

int GS_has_transparency ( void  )

Check for transparency.

Disabled.

Returns
1

Definition at line 3480 of file gs2.c.

◆ gs_init()

void gs_init ( void  )

Initialize library.

Still need to take care of library initialization, probably want to define a Surf_top of constant value (i.e., 0)

Definition at line 47 of file gs.c.

References NULL.

◆ gs_init_normbuff()

int gs_init_normbuff ( geosurf gs)

Init geosurf normbuff.

Parameters
gspointer to geosurf struct
Returns
0 on error
1 on success

Definition at line 306 of file gs.c.

References g_surf::cols, G_free(), G_malloc, g_surf::norm_needupdate, g_surf::norms, and g_surf::rows.

◆ GS_init_rotation()

void GS_init_rotation ( void  )

Reset scene rotation.

Definition at line 2909 of file gs2.c.

References georot::do_rot, georot::rot_angle, georot::rot_axes, geoview::rotate, and georot::rotMatrix.

Referenced by Nviz_init_rotation().

◆ gs_init_surf()

int gs_init_surf ( geosurf gs,
double  ox,
double  oy,
int  rows,
int  cols,
double  xres,
double  yres 
)

◆ GS_init_view()

void GS_init_view ( void  )

Init viewpoint.

Todo:
allow setting center?

Definition at line 3347 of file gs2.c.

◆ GS_is_masked()

int GS_is_masked ( int  id,
float *  pt 
)

Check if point is masked ?

Parameters
idsurface id
ptpoint
Returns
1 masked
0 not masked
-1 on error, invalid surface id

Definition at line 1015 of file gs2.c.

◆ GS_libinit()

void GS_libinit ( void  )

Initialize OGSF library.

Get region settings - wind

Set Region (NSWE array) and compute scale

Definition at line 97 of file gs2.c.

◆ GS_lights_off()

void GS_lights_off ( void  )

Switch off all lights.

Definition at line 442 of file gs2.c.

◆ GS_lights_on()

void GS_lights_on ( void  )

Switch on all lights.

Definition at line 456 of file gs2.c.

◆ GS_load_3dview()

int GS_load_3dview ( const char *  vname,
int  surfid 
)

Load 3d view.

Parameters
vnameview file name
surfidsurface id
Returns
?

Definition at line 3329 of file gs2.c.

References Gs_load_3dview().

◆ Gs_load_3dview()

◆ GS_load_att_map()

int GS_load_att_map ( int  id,
const char *  filename,
int  att 
)

Load raster map as attribute.

Parameters
idsurface id
filenamefilename
attattribute descriptor
Returns
-1 on error (invalid surface id)
?

Definition at line 1608 of file gs2.c.

◆ Gs_loadmap_as_bitmap()

int Gs_loadmap_as_bitmap ( struct Cell_head wind,
const char *  map_name,
struct BM buff 
)

Load raster map as integer map.

Calling function must have already allocated space in buff for struct BM of wind->rows & wind->cols.

This routine simply loads the map into the bitmap by repetitve calls to get_map_row. Any value other than 0 in the map will set the bitmap. (may want to change later to allow specific value to set)

Changed to use null.

Parameters
windcurrent window
map_nameraster map name
[out]buffdata buffer
Returns
1 on success
-1 on failure

Definition at line 517 of file gs3.c.

◆ Gs_loadmap_as_char()

int Gs_loadmap_as_char ( struct Cell_head wind,
const char *  map_name,
unsigned char *  buff,
struct BM nullmap,
int *  has_null 
)

Load raster map as integer map.

Calling function must have already allocated space in buff for wind->rows * wind->cols unsigned chars.

This routine simply loads the map into a 2d array by repetitve calls to get_map_row.

Since signs of chars can be tricky, we only load positive chars between 0-255.

Todo:
fn body Gs_loadmap_as_float()
Parameters
windcurrent window
map_nameraster map name
[out]buffdata buffer
[out]nullmapnull map buffer
[out]has_nullindicates if raster map contains null-data
Returns
1 on success
-1 on failure
-2 if read ok, but 1 or more values were too large (small) to fit into an unsigned char. (in which case the max (min) char is used)

Definition at line 417 of file gs3.c.

◆ Gs_loadmap_as_float()

int Gs_loadmap_as_float ( struct Cell_head wind,
const char *  map_name,
float *  buff,
struct BM nullmap,
int *  has_null 
)

Load raster map as floating point map.

Calling function must have already allocated space in buff for wind->rows * wind->cols floats.

This routine simply loads the map into a 2d array by repetitve calls to get_f_raster_row.

Parameters
windcurrent window
map_nameraster map name
[out]buffdata buffer
[out]nullmapnull map buffer
[out]has_nullindicates if raster map contains null-data
Returns
1 on success
0 on failure

Definition at line 114 of file gs3.c.

◆ Gs_loadmap_as_int()

int Gs_loadmap_as_int ( struct Cell_head wind,
const char *  map_name,
int *  buff,
struct BM nullmap,
int *  has_null 
)

Load raster map as integer map.

Calling function must have already allocated space in buff for wind->rows * wind->cols floats.

This routine simply loads the map into a 2d array by repetitve calls to get_f_raster_row.

Todo:
fn body of Gs_loadmap_as_float()
Parameters
windcurrent window
map_nameraster map name
[out]buffdata buffer
[out]nullmapnull map buffer
[out]has_nullindicates if raster map contains null-data
Returns
1 on success
0 on failure

Definition at line 178 of file gs3.c.

◆ Gs_loadmap_as_short()

int Gs_loadmap_as_short ( struct Cell_head wind,
const char *  map_name,
short *  buff,
struct BM nullmap,
int *  has_null 
)

Load raster map as integer map.

Calling function must have already allocated space in buff for wind->rows * wind->cols shorts.

This routine simply loads the map into a 2d array by repetitve calls to get_map_row.

Parameters
windcurrent window
map_nameraster map name
[out]buffdata buffer
[out]nullmapnull map buffer
[out]has_nullindicates if raster map contains null-data
Returns
1 on success
-1 on failure,
-2 if read ok, but 1 or more values were too large (small) to fit into a short (in which case the max (min) short is used)

Definition at line 312 of file gs3.c.

◆ GS_look_here()

int GS_look_here ( int  sx,
int  sy 
)

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.

Parameters
sx,syscreen coordinates
Returns
1 on success
0 on error (invalid surface id)

Definition at line 3005 of file gs2.c.

References FROM, geoview::from_to, GS_distance(), GS_get_selected_point_on_surface(), gs_get_surf(), GS_set_focus(), GS_v3dir(), GS_v3mult(), gsd_get_los(), g_surf::ox, g_surf::oy, geoview::real_to, TO, x, X, g_surf::x_trans, Y, g_surf::y_trans, Z, and g_surf::z_trans.

Referenced by Nviz_look_here().

◆ gs_los_intersect()

int gs_los_intersect ( int  surfid,
float **  los,
float *  point 
)

Crude method of intersecting line of sight with closest part of surface.

This version uses the shadow of the los projected down to the surface to generate a line_on_surf, then follows each point in that line until the los intersects it.

Parameters
surfidsurface id
losshould be in surf-world coordinates
[out]pointintersect point (real)
Returns
0 on failure
1 on success

Definition at line 191 of file gs_query.c.

◆ gs_los_intersect1()

int gs_los_intersect1 ( int  surfid,
float(*)  los[3],
float *  point 
)

Crude method of intersecting line of sight with closest part of surface.

Uses los vector to determine the point of first intersection which is returned in point. Returns 0 if los doesn't intersect.

Parameters
surfidsurface id
losshould be in surf-world coordinates
[out]pointintersect point (real)
Returns
0 on failure
1 on success

Definition at line 52 of file gs_query.c.

◆ gs_malloc_att_buff()

size_t gs_malloc_att_buff ( geosurf gs,
int  desc,
int  type 
)

Allocate attribute buffer.

Parameters
gspointer to geosurf struct
descattribute id (descriptor)
typebuffer type (based on raster map type)
Returns
-1 on error
amount of allocated memory

Definition at line 717 of file gs.c.

◆ gs_malloc_lookup()

int gs_malloc_lookup ( geosurf gs,
int  desc 
)

Allocate attribute lookup.

Parameters
gspointer to geosurf struct
descattribute id
Returns
-1 on error
pointer to typbuff (casted)

Definition at line 746 of file gs.c.

References g_surf::att, gsurf_att::att_type, ATTY_CHAR, ATTY_SHORT, G_debug(), G_free(), G_malloc, G_warning(), gsurf_att::lookup, and NULL.

◆ gs_mapcolor()

int gs_mapcolor ( typbuff cobuff,
gsurf_att coloratt,
int  offset 
)

Call this one when you already know att_src is MAP_ATT.

Parameters
cobuff
colorattcolor attribute
offsetoffset value
Returns
packed color for category at offset

Definition at line 969 of file gs.c.

References typbuff::cb, typbuff::ib, and gsurf_att::lookup.

Referenced by GS_get_val_at_xy(), gs_update_curmask(), gsd_wire_arrows(), gsd_wire_surf_const(), and gsd_wire_surf_map().

◆ gs_mask_defined()

int gs_mask_defined ( geosurf gs)

Check if mask is defined.

Parameters
gspointer to geosurf struct
Returns
1 if defined
0 not defined

Definition at line 915 of file gs.c.

References g_surf::att, ATT_MASK, gsurf_att::att_src, and NOTSET_ATT.

Referenced by gs_update_curmask().

◆ gs_masked()

int gs_masked ( typbuff tb,
int  col,
int  row,
int  offset 
)

Should only be called when setting up the current mask (gs_bm.c)

Parameters
tbpointer to typbuff
colnumber of cols
rownumber of rows
offsetoffset value
Returns
1
0

Definition at line 933 of file gs.c.

References typbuff::bm, BM_get(), typbuff::cb, typbuff::fb, typbuff::ib, and typbuff::sb.

Referenced by gs_update_curmask().

◆ GS_moveto()

void GS_moveto ( float *  pt)

Move viewpoint.

Parameters
pt'from' model coordinates

Definition at line 2617 of file gs2.c.

References FROM, geoview::from_to, G_debug(), GS_v3add(), GS_v3eq(), GS_v3normalize(), GS_v3sub(), geoview::infocus, and TO.

Referenced by GS_moveto_real(), and Nviz_set_viewpoint_position().

◆ GS_moveto_real()

void GS_moveto_real ( float *  pt)

Move position to (real)

Parameters
ptpoint real coordinates

Definition at line 2647 of file gs2.c.

References GS_moveto(), and gsd_real2model().

Referenced by Gs_load_3dview().

◆ GS_new_light()

int GS_new_light ( void  )

Add new model light.

Returns
light model id
-1 on error (MAX_LIGHTS exceded)

Definition at line 268 of file gs2.c.

References lightdefs::ambient, lightdefs::color, GS_get_light_reset(), GS_set_light_reset(), gsd_init_lightmodel(), geoview::lights, MAX_LIGHTS, lightdefs::position, lightdefs::shine, W, X, Y, and Z.

◆ GS_new_surface()

int GS_new_surface ( void  )

Add new surface.

Note that origin has 1/2 cell added to represent center of cells because library assumes that east - west = (cols - 1) * ew_res, since left and right columns are on the edges.

Returns
surface id
-1 on error (MAX_SURFS exceded)

Definition at line 224 of file gs2.c.

References G_debug().

◆ gs_num_datah_reused()

int gs_num_datah_reused ( int  dh)

Get number of reused values.

Parameters
dhvalue
Returns
number of reused values

Definition at line 597 of file gs.c.

References g_surf::att, G_debug(), gsurf_att::hdata, MAX_ATTS, and g_surf::next.

◆ gs_num_surfaces()

int gs_num_surfaces ( void  )

Get number of surfaces.

Returns
number of surfaces

Definition at line 127 of file gs.c.

References G_debug(), and g_surf::next.

Referenced by GS_draw_cplane(), and GS_num_surfs().

◆ GS_num_surfs()

int GS_num_surfs ( void  )

Get number of surfaces.

Returns
number of surfaces

Definition at line 1524 of file gs2.c.

References gs_num_surfaces().

◆ Gs_numtype()

int Gs_numtype ( const char *  filename,
int *  negflag 
)

Get map data type.

Parameters
filenameraster map name
negflag
Returns
-1 if map is integer and Rast_read_range() fails
data type (ARRY_*)

Definition at line 230 of file gs3.c.

◆ GS_P2distance()

float GS_P2distance ( float *  from,
float *  to 
)

Calculate distance in plane.

Parameters
from'from' point (X,Y)
to'to' point (X,Y)
Returns
distance

Definition at line 160 of file gs_util.c.

References x, X, and Y.

Referenced by gv_line_length(), and seg_intersect_vregion().

◆ Gs_pack_colors()

void Gs_pack_colors ( const char *  filename,
int *  buff,
int  rows,
int  cols 
)

Pack color table.

Passed an array of 32 bit ints that is converted from cell values to packed colors (0xbbggrr)

Parameters
filenameraster map name
buff
rowsnumber of rows
colsnumber of cols

Definition at line 636 of file gs3.c.

◆ Gs_pack_colors_float()

void Gs_pack_colors_float ( const char *  filename,
float *  fbuf,
int *  ibuf,
int  rows,
int  cols 
)

Pack color table (floating-point map)

Passed a array of floats that will be converted from cell values to packed colors (0xbbggrr) and float to int Floating point data not freed here, use: gsds_free_data_buff(id, ATTY_FLOAT)

Parameters
filenameraster map name
fbuf
ibuf
rowsnumber of rows
colsnumber of cols

Definition at line 705 of file gs3.c.

◆ gs_point_in_region()

int gs_point_in_region ( geosurf gs,
float *  pt,
float *  region 
)

Check if point is in region.

Check for cancel every CHK_FREQ points

Parameters
gssurface (geosurf)
ptpoint (array(X,Y,Z))
regionregion settings (array (top,bottom,left,right))
Returns
0 point outside of region
1 point inside region

Definition at line 39 of file gpd.c.

◆ gs_point_is_masked()

int gs_point_is_masked ( geosurf gs,
float *  pt 
)

Check if point is masked.

Parameters
gspointer to geosurf struct
ptpoint coordinates (X,Y,Z)
Returns
1 masked
0 not masked

Definition at line 1317 of file gs.c.

References BM_get(), g_surf::curmask, MASK_BL, MASK_BR, MASK_TL, MASK_TR, VCOL2DCOL, VCOL2X, VCOLS, VROW2DROW, VROW2Y, VROWS, VXRES, VYRES, X, X2VCOL, Y, and Y2VROW.

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

◆ gs_put_label()

void gs_put_label ( const char *  text,
GLuint  fontbase,
int  size,
unsigned long  color,
int *  pt 
)

Put label.

Todo:
Allocate label dynamically
Parameters
fontbasefontbase settings
sizefont size
colorfont color
pt

Definition at line 41 of file gsd_label.c.

◆ GS_ready_draw()

void GS_ready_draw ( void  )

◆ GS_save_3dview()

int GS_save_3dview ( const char *  vname,
int  surfid 
)

Save 3d view.

Parameters
vnameview file name
surfidsurface id
Returns
?

Definition at line 3316 of file gs2.c.

References Gs_save_3dview().

◆ Gs_save_3dview()

◆ GS_set_att_const()

int GS_set_att_const ( int  id,
int  att,
float  constant 
)

Set attribute constant.

Parameters
idsurface id
attattribute id
constantvalue
Returns
?

Definition at line 1412 of file gs2.c.

References gs_get_surf(), gs_set_att_const(), and Gs_update_attrange().

◆ gs_set_att_const()

int gs_set_att_const ( geosurf gs,
int  desc,
float  constant 
)

Set attribute constant value.

Todo:
set typbuf constant
Parameters
gspointer to geosurf struct
descattribute id
constantconstant value
Returns
0 on success
-1 on error

Definition at line 872 of file gs.c.

References g_surf::att, ATT_MASK, CONST_ATT, gsurf_att::constant, G_debug(), gs_set_att_src(), Gs_update_attrange(), g_surf::gsurf_id, and g_surf::mask_needupdate.

Referenced by GS_set_att_const().

◆ GS_set_att_defaults()

void GS_set_att_defaults ( float *  defs,
float *  null_defs 
)

Set default attributes for map objects.

Parameters
defsattributes array (dim MAX_ATTS)
null_defsnull attributes array (dim MAX_ATTS)

Definition at line 172 of file gs2.c.

References G_debug(), and MAX_ATTS.

Referenced by Nviz_set_surface_attr_default().

◆ gs_set_att_src()

int gs_set_att_src ( geosurf gs,
int  desc,
int  src 
)

Set attribute source.

Parameters
gspointer to geosurf struct
descattribute id (descriptor)
srcsource id
Returns
-1 on error
0 on success

Definition at line 827 of file gs.c.

Referenced by gs_set_att_const(), and GS_unset_att().

◆ gs_set_att_type()

int gs_set_att_type ( geosurf gs,
int  desc,
int  type 
)

Set attribute type.

Parameters
gspointer to geosurf struct
descattribute id
typeattribute type
Returns
-1 on error
0 on success

Definition at line 803 of file gs.c.

◆ GS_set_cancel()

void GS_set_cancel ( int  )

Set cancel.

Definition at line 40 of file gsx.c.

◆ GS_Set_ClientData()

int GS_Set_ClientData ( int  id,
void *  clientd 
)

Set client data.

Parameters
idsurface id
clientdpointer to client data struct
Returns
1 on success
-1 on error (invalid surface id)

Definition at line 1485 of file gs2.c.

References g_surf::clientdata, and gs_get_surf().

◆ GS_set_cplane()

void GS_set_cplane ( int  num)

Set cplace.

Parameters
numcplane id

Definition at line 3215 of file gs2.c.

References gsd_cplane_on().

◆ GS_set_cplane_rot()

void GS_set_cplane_rot ( int  num,
float  dx,
float  dy,
float  dz 
)

Set cplace rotation.

Parameters
numcplace id
dx,dy,dzrotation values

Definition at line 3122 of file gs2.c.

References gsd_cplane_setrot().

Referenced by Nviz_set_cplane_rotation().

◆ GS_set_cplane_trans()

void GS_set_cplane_trans ( int  num,
float  dx,
float  dy,
float  dz 
)

Set cplace trans.

Parameters
numcplace id
dx,dy,dzrotation values

Definition at line 3135 of file gs2.c.

References gsd_cplane_settrans().

Referenced by Nviz_set_cplane_translation().

◆ GS_set_cxl_func()

void GS_set_cxl_func ( void(*)(void)  f)

Set cxl function.

Parameters
pointerto function

Definition at line 52 of file gsx.c.

References Cxl_func.

◆ gs_set_defaults()

void gs_set_defaults ( geosurf gs,
float *  defs,
float *  null_defs 
)

Set default attribute values.

Parameters
gspointer to geosurf struct
defsarray of default values (dim MAX_ATTRS)
null_defsarray of null default values (dim MAX_ATTRS)

Definition at line 441 of file gs.c.

References g_surf::att, gsurf_att::att_src, gsurf_att::constant, gsurf_att::default_null, G_debug(), g_surf::gsurf_id, gsurf_att::hdata, gsurf_att::lookup, MAX_ATTS, NOTSET_ATT, and NULL.

◆ GS_set_draw()

◆ GS_set_drawmode()

int GS_set_drawmode ( int  id,
int  mode 
)

Set draw mode.

Parameters
idsurface id
modemode type(s)
Returns
0 on success
-1 on error (invalid surface id)

Definition at line 2083 of file gs2.c.

◆ GS_set_drawres()

int GS_set_drawres ( int  id,
int  xres,
int  yres,
int  xwire,
int  ywire 
)

Set draw resolution for surface.

Parameters
idsurface id
xres,yresx/y resolution value
xwire,ywirex/y wire value
Returns
-1 on error
0 on success

Definition at line 2221 of file gs2.c.

References G_debug(), gs_get_surf(), g_surf::norm_needupdate, g_surf::x_mod, g_surf::x_modw, g_surf::y_mod, and g_surf::y_modw.

◆ GS_set_exag()

void GS_set_exag ( int  id,
float  exag 
)

Set Z exag for surface.

Parameters
idsurface id
exagz-exag value

Definition at line 1953 of file gs2.c.

References G_debug(), gs_get_surf(), g_surf::norm_needupdate, and g_surf::z_exag.

◆ GS_set_fencecolor()

void GS_set_fencecolor ( int  mode)

Set fence color.

Parameters
modemode id

Definition at line 3256 of file gs2.c.

◆ GS_set_focus()

void GS_set_focus ( float *  realto)

Set focus.

Parameters
realtoreal coordinates to

Definition at line 2520 of file gs2.c.

References G_debug(), GS_v3eq(), gsd_set_view(), geoview::infocus, and geoview::real_to.

Referenced by Gs_load_3dview(), GS_look_here(), GS_set_focus_center_map(), and GVL_set_focus_center_map().

◆ GS_set_focus_center_map()

void GS_set_focus_center_map ( int  id)

Set focus to map center.

Parameters
idsurface id

Definition at line 2582 of file gs2.c.

References G_debug(), gs_get_surf(), GS_set_focus(), X, g_surf::xmax, g_surf::xmin, Y, g_surf::ymax, g_surf::ymin, Z, g_surf::zmax_nz, and g_surf::zmin_nz.

◆ GS_set_focus_real()

void GS_set_focus_real ( float *  realto)

Set real focus.

Parameters
realtoreal coordinates to

Definition at line 2538 of file gs2.c.

References G_get_set_window().

◆ GS_set_fov()

void GS_set_fov ( int  fov)

Set field of view.

Parameters
fovfov value

Definition at line 2843 of file gs2.c.

References geoview::fov.

Referenced by Gs_load_3dview(), and Nviz_set_viewpoint_persp().

◆ GS_set_global_exag()

void GS_set_global_exag ( float  exag)

Set global z-exag value.

Parameters
exagexag value to be set up

Definition at line 1977 of file gs2.c.

References G_debug(), and geoview::vert_exag.

Referenced by Gs_load_3dview().

◆ GS_set_infocus()

void GS_set_infocus ( void  )

Set focus.

Make sure that the center of view is set

Definition at line 2967 of file gs2.c.

References G_debug(), and geoview::infocus.

Referenced by Nviz_set_focus_state().

◆ GS_set_light_reset()

void GS_set_light_reset ( int  )

Definition at line 252 of file gs2.c.

Referenced by GS_new_light().

◆ GS_set_maskmode()

int GS_set_maskmode ( int  id,
int  mode 
)

Set mask mode.

Mask attribute special: constant is set to indicate invert or no

Parameters
idsurface id
modeid
Returns
mode id
-1 on error (invalid surface id)

Definition at line 1436 of file gs2.c.

◆ gs_set_maskmode()

void gs_set_maskmode ( int  invert)

Set geosurf mask mode.

Parameters
invertinvert mask

Definition at line 900 of file gs.c.

Referenced by gs_update_curmask().

◆ GS_set_Narrow()

void GS_set_Narrow ( int *  pt,
int  id,
float *  pos2 
)

Set decoration, north arrow ??

Todo:
scale used to calculate len of arrow still needs work needs go function that returns center / eye distance gsd_get_los function is not working correctly ??
Parameters
ptpoint value in true world coordinates (?)
idsurface id
[out]pos2output coordinates

Definition at line 568 of file gs2.c.

References GS_get_selected_point_on_surface(), gs_get_surf(), gsd_do_scale(), gsd_pushmatrix(), g_surf::ox, g_surf::oy, x, X, g_surf::x_trans, Y, g_surf::y_trans, Z, g_surf::z_trans, and g_surf::zmax.

◆ GS_set_nofocus()

void GS_set_nofocus ( void  )

Unset focus.

Definition at line 2953 of file gs2.c.

References G_debug(), and geoview::infocus.

Referenced by Nviz_set_focus_state().

◆ GS_set_nozero()

void GS_set_nozero ( int  id,
int  att,
int  mode 
)

Set no-zero ?

Parameters
idsurface id
attattribute id
modemode id

Definition at line 2131 of file gs2.c.

◆ GS_set_rotation()

void GS_set_rotation ( double  ,
double  ,
double  ,
double   
)

Set rotation params.

Definition at line 2887 of file gs2.c.

References georot::do_rot, georot::rot_angle, georot::rot_axes, geoview::rotate, and x.

Referenced by Nviz_set_rotation().

◆ GS_set_rotation_matrix()

void GS_set_rotation_matrix ( double *  )

Set rotation matrix.

Definition at line 2941 of file gs2.c.

References geoview::rotate, and georot::rotMatrix.

◆ GS_set_SDscale()

int GS_set_SDscale ( float  scale)

Set ?

Parameters
scalescale value
Returns
1

Definition at line 1070 of file gs2.c.

◆ GS_set_SDsurf()

int GS_set_SDsurf ( int  id)

Set surface as Scaled Difference surface.

Parameters
idsurface id
Returns
1 on success
0 on error, invalid surface id

Definition at line 1049 of file gs2.c.

References gs_get_surf(), and gsdiff_set_SDref().

◆ GS_set_trans()

void GS_set_trans ( int  id,
float  xtrans,
float  ytrans,
float  ztrans 
)

Set translation (surface position)

Parameters
idsurface id
xtrans,ytrans,ztranstranslation values

Definition at line 2391 of file gs2.c.

References G_debug(), gs_get_surf(), g_surf::x_trans, g_surf::y_trans, and g_surf::z_trans.

◆ GS_set_twist()

void GS_set_twist ( int  t)

Set viewpoint twist value.

10ths of degrees off twelve o'clock

Parameters
ttenths of degrees clockwise from 12:00.

Definition at line 2877 of file gs2.c.

References t, and geoview::twist.

Referenced by Gs_load_3dview(), and Nviz_set_viewpoint_twist().

◆ GS_set_viewdir()

void GS_set_viewdir ( float *  dir)

Set viewdir.

Automatically turns off focus

Parameters
dirviewdir value

Definition at line 2823 of file gs2.c.

◆ GS_set_viewport()

void GS_set_viewport ( int  left,
int  right,
int  bottom,
int  top 
)

Set viewport.

Parameters
left,right,bottom,topviewport extent values

Definition at line 2981 of file gs2.c.

References G_debug(), and gsd_viewport().

◆ GS_set_wire_color()

void GS_set_wire_color ( int  id,
int  colr 
)

Set wire color.

Todo:
error-handling
Parameters
idsurface id
colrcolor value

Definition at line 2014 of file gs2.c.

References G_debug(), gs_get_surf(), and g_surf::wire_color.

◆ GS_setall_drawmode()

int GS_setall_drawmode ( int  mode)

Set all draw-modes.

Parameters
modemode id
Returns
0 on success
-1 on error

Definition at line 2061 of file gs2.c.

Referenced by Gs_load_3dview().

◆ GS_setall_drawres()

int GS_setall_drawres ( int  xres,
int  yres,
int  xwire,
int  ywire 
)

Set all draw resolutions.

Parameters
xres,yresx/y resolution value
xwire,ywirex/y wire value
Returns
0 on success
-1 on error

Definition at line 2198 of file gs2.c.

Referenced by Gs_load_3dview().

◆ gs_setall_norm_needupdate()

int gs_setall_norm_needupdate ( void  )

Set for geosurf need-to-update mark.

Returns
-1 no surface available
1 on success

Definition at line 1290 of file gs.c.

References g_surf::next, and g_surf::norm_needupdate.

◆ GS_setlight_ambient()

void GS_setlight_ambient ( int  num,
float  red,
float  green,
float  blue 
)

Set light ambient.

Red, green, blue from 0.0 to 1.0

Parameters
numlight id (starts at 1)
red,green,bluecolor values

Definition at line 402 of file gs2.c.

◆ GS_setlight_color()

void GS_setlight_color ( int  num,
float  red,
float  green,
float  blue 
)

Set light color.

Parameters
numlight id (starts at 1)
red,green,bluecolor values (from 0.0 to 1.0)

Definition at line 358 of file gs2.c.

◆ GS_setlight_position()

void GS_setlight_position ( int  num,
float  xpos,
float  ypos,
float  zpos,
int  local 
)

Set light position.

Bug:
I think lights array doesnt match sgi_light array
Parameters
numlight id (starts with 1)
xpos,ypos,zposcoordinates (model)
locallocal coordinate (for viewport)

Definition at line 309 of file gs2.c.

◆ gs_setlos_enterdata()

int gs_setlos_enterdata ( Point3 los)

Gets all current cutting planes & data bounding planes

Intersects los with resulting convex polyhedron, then replaces los[FROM] with first point on ray inside data.

Parameters
[out]los
Returns
0 on failure
1 on success

Definition at line 529 of file gs_query.c.

References FROM, FRONTFACE, GS_distance(), gs_get_databounds_planes(), GS_v3add(), GS_v3dir(), GS_v3mult(), gsd_get_cplanes(), MISSED, RayCvxPolyhedronInt(), and TO.

◆ GS_surf_exists()

int GS_surf_exists ( int  id)

Check if surface exists

Parameters
idsurface id
Returns
0 not found
1 found

Definition at line 194 of file gs2.c.

References G_debug(), gs_get_surf(), and NULL.

Referenced by GP_select_surf(), GS_delete_surface(), and GV_select_surf().

◆ GS_switchlight()

void GS_switchlight ( int  num,
int  on 
)

Switch on/off light.

Parameters
numlight id (starts at 1)
onnon-zero for 'on' otherwise 'off'

Definition at line 473 of file gs2.c.

◆ GS_transp_is_set()

int GS_transp_is_set ( void  )

Check if transparency is set.

Returns
0 transparency not set
1 transparency is set

Definition at line 492 of file gs2.c.

References ATT_TRANSP, FC_GREY, gs_att_is_set(), gsd_getfc(), and NULL.

◆ GS_unset_att()

int GS_unset_att ( int  id,
int  att 
)

Unset attribute.

Parameters
idsurface id
attattribute id
Returns
?

Definition at line 1393 of file gs2.c.

References gs_get_surf(), gs_set_att_src(), g_surf::mask_needupdate, and NOTSET_ATT.

◆ GS_unset_cplane()

void GS_unset_cplane ( int  num)

Unset clip place (turn off)

Parameters
numcplane id

Definition at line 3227 of file gs2.c.

References gsd_cplane_off().

◆ GS_unset_rotation()

void GS_unset_rotation ( void  )

Stop scene rotation.

Definition at line 2901 of file gs2.c.

References georot::do_rot, and geoview::rotate.

Referenced by Nviz_unset_rotation().

◆ GS_unset_SDsurf()

void GS_unset_SDsurf ( void  )

Unset Scaled Difference surface.

Definition at line 1033 of file gs2.c.

References gsdiff_set_SDref(), and NULL.

◆ Gs_update_attrange()

int Gs_update_attrange ( geosurf gs,
int  desc 
)

◆ GS_update_curmask()

int GS_update_curmask ( int  id)

Update current mask.

May be called to update total mask for a surface at convenient times instead of waiting until ready to redraw surface

Parameters
idsurface id
Returns
?

Definition at line 997 of file gs2.c.

References gs_get_surf(), and gs_update_curmask().

◆ gs_update_curmask()

◆ GS_update_normals()

int GS_update_normals ( int  id)

Update normals.

Parameters
idsurface id
Returns
?

Definition at line 1119 of file gs2.c.

References gs_calc_normals(), and gs_get_surf().

◆ GS_v2dir()

void GS_v2dir ( float *  v1,
float *  v2,
float *  v3 
)

Get a normalized direction from v1 to v2, store in v3 (2D)

Parameters
v1first vector
v2second vector
[out]v3output vector
Returns
0 if magnitude of dx is zero
1 if magnitude of dx > 0

Definition at line 385 of file gs_util.c.

References X, and Y.

◆ GS_v2norm()

int GS_v2norm ( float *  v1)

Change v1 so that it is a unit vector (3D)

Parameters
[in,out]v1vector
Returns
0 if magnitude of v1 is zero
1 if magnitude of v1 > 0

Definition at line 271 of file gs_util.c.

References X, and Y.

◆ GS_v3add()

void GS_v3add ( float *  v1,
float *  v2 
)

Sum vectors.

v1 += v2

Parameters
[in,out]v1first vector
v2second vector

Definition at line 195 of file gs_util.c.

References X, Y, and Z.

Referenced by GS_moveto(), and gs_setlos_enterdata().

◆ GS_v3cross()

void GS_v3cross ( float *  v1,
float *  v2,
float *  v3 
)

Get the cross product v3 = v1 cross v2.

Parameters
v1first vector
v2second vector
[out]v3output vector

Definition at line 406 of file gs_util.c.

References X, Y, and Z.

◆ GS_v3dir()

int GS_v3dir ( float *  v1,
float *  v2,
float *  v3 
)

Get a normalized direction from v1 to v2, store in v3.

Parameters
v1first vector
v2second vector
[out]v3output vector
Returns
0 if magnitude of dx is zero
1 if magnitude of dx > 0

Definition at line 353 of file gs_util.c.

References X, Y, and Z.

Referenced by GS_get_modelposition(), GS_get_viewdir(), GS_look_here(), gs_setlos_enterdata(), and gsd_get_zup().

◆ GS_v3eq()

void GS_v3eq ( float *  v1,
float *  v2 
)

Copy vector values.

v1 = v2

Parameters
[out]v1first vector
v2second vector

Definition at line 178 of file gs_util.c.

References X, Y, and Z.

Referenced by gpd_obj(), GS_get_focus(), GS_get_from(), GS_get_from_real(), GS_get_to(), GS_moveto(), Gs_save_3dview(), GS_set_focus(), gsd_check_focus(), gsd_zup_twist(), and gsdrape_get_allsegments().

◆ GS_v3mag()

void GS_v3mag ( float *  v1,
float *  mag 
)

Magnitude of vector.

Parameters
v1vector
[out]magmagnitude value

Definition at line 421 of file gs_util.c.

References X, Y, and Z.

◆ GS_v3mult()

void GS_v3mult ( float *  v1,
float  k 
)

Multiple vectors.

v1 *= k

Parameters
[in,out]v1vector
kmultiplicator

Definition at line 229 of file gs_util.c.

References X, Y, and Z.

Referenced by GS_look_here(), Gs_save_3dview(), gs_setlos_enterdata(), and gsd_check_focus().

◆ GS_v3norm()

int GS_v3norm ( float *  v1)

Change v1 so that it is a unit vector (2D)

Parameters
[in,out]v1vector
Returns
0 if magnitude of v1 is zero
1 if magnitude of v1 > 0

Definition at line 246 of file gs_util.c.

References X, Y, and Z.

◆ GS_v3normalize()

int GS_v3normalize ( float *  v1,
float *  v2 
)

Change v2 so that v1v2 is a unit vector.

Parameters
v1first vector
v2[in,out]second vector
Returns
0 if magnitude of dx is zero
1 if magnitude of dx > 0

Definition at line 322 of file gs_util.c.

References X, Y, and Z.

Referenced by GS_moveto(), and gsd_check_focus().

◆ GS_v3sub()

void GS_v3sub ( float *  v1,
float *  v2 
)

Subtract vectors.

v1 -= v2

Parameters
[in,out]v1first vector
v2second vector

Definition at line 212 of file gs_util.c.

References X, Y, and Z.

Referenced by GS_moveto().

◆ GS_write_ppm()

int GS_write_ppm ( const char *  name)

Save current GL screen to ppm file.

Parameters
namefile name
Returns
1 on failure
0 on success

Definition at line 41 of file gsd_img_ppm.c.

References _, b, g, G_free(), G_warning(), gsd_getimage(), NULL, r, and x.

◆ GS_write_tif()

int GS_write_tif ( const char *  name)

Write data to tif file.

Parameters
namefilename
Returns
1 on error
0 on success

Definition at line 53 of file gsd_img_tif.c.

References _, config, G_free(), G_malloc, G_warning(), gsd_getimage(), NULL, rowsperstrip, and x.

◆ GS_write_zoom()

int GS_write_zoom ( const char *  name,
unsigned int  xsize,
unsigned int  ysize 
)

Write zoom to file.

Parameters
namefile name
xsize,ysize
Returns
1 on failure
0 on success

Definition at line 88 of file gsd_img_ppm.c.

References _, b, free(), g, G_warning(), gsd_writeView(), NULL, r, and x.

◆ GS_zoom_setup()

void GS_zoom_setup ( int *  a,
int *  b,
int *  c,
int *  d,
int *  maxx,
int *  maxy 
)

Get zoom setup.

Parameters
[out]a,b,c,dcurrent viewport settings
[out]maxx,maxymax viewport size

Definition at line 2772 of file gs2.c.

◆ gsbm_and_masks()

int gsbm_and_masks ( struct BM bmvar,
struct BM bmcon 
)

Mask bitmap (mask type ADD)

Must be same size, ADDs bitmaps & stores in bmvar

Parameters
bmvarbitmap (BM) to changed
bmcombitmap (BM)
mask_typemask type (see mask types macros)
Returns
-1 on failure (bitmap mispatch)
0 on success

Definition at line 202 of file gs_bm.c.

◆ gsbm_make_mask()

struct BM* gsbm_make_mask ( typbuff frombuff,
float  maskval,
int  rows,
int  cols 
)

Do combining of bitmaps, make bitmaps from other data w/maskval.

Parameters
frombuffdata buffer
maskvalmask type
rowsnumber of rows
colsnumber of cols
Returns
pointer to BM struct

Definition at line 35 of file gs_bm.c.

References typbuff::bm, BM_create(), BM_get(), BM_set(), BM::cols, GET_MAPATT, and BM::rows.

Referenced by gs_update_curmask().

◆ gsbm_or_masks()

int gsbm_or_masks ( struct BM bmvar,
struct BM bmcon 
)

Mask bitmap (mask type OR)

Must be same size, ORs bitmaps & stores in bmvar

Parameters
bmvarbitmap (BM) to changed
bmcombitmap (BM)
mask_typemask type (see mask types macros)
Returns
-1 on failure (bitmap mispatch)
0 on success

Definition at line 168 of file gs_bm.c.

Referenced by gs_update_curmask().

◆ gsbm_ornot_masks()

int gsbm_ornot_masks ( struct BM bmvar,
struct BM bmcon 
)

Mask bitmap (mask type ORNOT)

Must be same size, ORNOTs bitmaps & stores in bmvar

Parameters
bmvarbitmap (BM) to changed
bmcombitmap (BM)
mask_typemask type (see mask types macros)
Returns
-1 on failure (bitmap mispatch)
0 on success

Definition at line 185 of file gs_bm.c.

Referenced by gs_update_curmask().

◆ gsbm_xor_masks()

int gsbm_xor_masks ( struct BM bmvar,
struct BM bmcon 
)

Mask bitmap (mask type XOR)

Must be same size, XORs bitmaps & stores in bmvar

Parameters
bmvarbitmap (BM) to changed
bmcombitmap (BM)
mask_typemask type (see mask types macros)
Returns
-1 on failure (bitmap mispatch)
0 on success

Definition at line 219 of file gs_bm.c.

◆ gsbm_zero_mask()

void gsbm_zero_mask ( struct BM map)

Zero mask.

Parameters
mappointer to BM struct

Definition at line 78 of file gs_bm.c.

References BM::bytes, BM::data, and BM::rows.

Referenced by gs_update_curmask().

◆ gsd_3darrow()

void gsd_3darrow ( float *  center,
unsigned long  colr,
float  siz1,
float  siz2,
float *  dir,
float  sz 
)

Draw 3d north arrow.

Parameters
centercenter point
colrcolor value
siz1height
siz2is diameter
dir
sz

Definition at line 1082 of file gsd_objs.c.

◆ gsd_3dcursor()

void gsd_3dcursor ( float *  pt)

Draw 3d cursor.

Parameters
ptpoint

Definition at line 711 of file gsd_objs.c.

References gsd_bgnline(), gsd_endline(), gsd_vert_func(), X, Y, and Z.

◆ gsd_arrow()

int gsd_arrow ( float *  center,
unsigned long  colr,
float  siz,
float *  dir,
float  sz,
geosurf onsurf 
)

ADD.

siz is height, sz is global exag to correct for.

If onsurf in non-null, z component of dir is dropped and line-on-suf is used, resulting in length of arrow being proportional to slope

Parameters
centercenter point
colrcolor value
sizsize value
dir
sz
onsurfsurface (geosurf)
Returns
1 no surface given
0 on surface

Definition at line 923 of file gsd_objs.c.

Referenced by gsd_wire_arrows().

◆ gsd_arrow_onsurf()

int gsd_arrow_onsurf ( float *  base,
float *  tip,
unsigned long  colr,
int  wid,
geosurf gs 
)

Draw north arrow on surface.

Parameters
base
tip
colr
wid
gssurface (geosurf)
Returns
0

Definition at line 995 of file gsd_objs.c.

◆ gsd_backbuffer()

void gsd_backbuffer ( void  )

Draw to the back buffer.

Definition at line 469 of file gsd_prim.c.

◆ gsd_backface()

void gsd_backface ( int  n)

ADD.

Parameters
n

Definition at line 253 of file gsd_prim.c.

◆ gsd_bgn_legend_viewport()

void gsd_bgn_legend_viewport ( GLint  wl,
GLint  wb,
GLint  wr,
GLint  wt 
)

ADD.

Parameters
wl
wb
wr
wt

Definition at line 61 of file gsd_legend.c.

References CM_COLOR, GS_ready_draw(), GS_set_draw(), gsd_colormode(), GSD_FRONT, gsd_linewidth(), gsd_popmatrix(), and gsd_pushmatrix().

◆ gsd_bgnline()

◆ gsd_bgnlist()

void gsd_bgnlist ( int  listno,
int  do_draw 
)

ADD.

Parameters
listno
do_draw

Definition at line 1128 of file gsd_prim.c.

Referenced by gsd_put_legend().

◆ gsd_bgnpolygon()

void gsd_bgnpolygon ( void  )

Delimit the vertices of a primitive or a group of like primitives.

Definition at line 371 of file gsd_prim.c.

Referenced by gsd_box(), gsd_cube(), gsd_diamond(), gsd_north_arrow(), and gsd_scalebar().

◆ gsd_bgnqstrip()

void gsd_bgnqstrip ( void  )

ADD.

Definition at line 276 of file gsd_prim.c.

Referenced by gsd_fringe_horiz_poly(), and gsd_fringe_vert_poly().

◆ gsd_bgntfan()

void gsd_bgntfan ( void  )

ADD.

Definition at line 336 of file gsd_prim.c.

◆ gsd_bgntmesh()

void gsd_bgntmesh ( void  )

ADD.

Definition at line 296 of file gsd_prim.c.

Referenced by gsd_diamond().

◆ gsd_bgntstrip()

void gsd_bgntstrip ( void  )

ADD.

Definition at line 316 of file gsd_prim.c.

◆ gsd_blend()

void gsd_blend ( int  yesno)

Specify pixel arithmetic.

Parameters
yesnoturn on/off

Definition at line 996 of file gsd_prim.c.

◆ gsd_bothbuffers()

void gsd_bothbuffers ( void  )

Draw to the front and back buffers.

Definition at line 445 of file gsd_prim.c.

◆ gsd_box()

void gsd_box ( float *  center,
int  colr,
float *  siz 
)

Draw box.

Warning siz is an array (we need it for scale only Z in histograms)

Parameters
centercenter point
colrcolor value
sizsize value

Definition at line 1440 of file gsd_objs.c.

References Box, BoxN, gsd_bgnpolygon(), gsd_endpolygon(), gsd_getshademodel(), gsd_litvert_func(), gsd_popmatrix(), gsd_pushmatrix(), gsd_scale(), gsd_shademodel(), gsd_translate(), X, Y, and Z.

Referenced by gpd_obj().

◆ gsd_call_label()

void gsd_call_label ( void  )

Call display list and draw defined labels – called from gsd_prim (gsd_call_lists)

Definition at line 122 of file gsd_label.c.

References label_base, and MAX_LIST.

◆ gsd_calllist()

void gsd_calllist ( int  listno)

ADD.

Parameters
listno

Definition at line 1176 of file gsd_prim.c.

Referenced by GS_draw_list().

◆ gsd_calllists()

void gsd_calllists ( int  listno)

ADD.

Parameters
listno

Definition at line 1189 of file gsd_prim.c.

References gsd_pushmatrix(), and MAX_OBJS.

Referenced by GS_draw_all_list().

◆ 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_checkpoint()

int gsd_checkpoint ( float *  ,
int *  ,
int *  ,
double *  ,
double *   
)

◆ gsd_checkwindow()

void gsd_checkwindow ( int *  ,
int *  ,
double *  ,
double *   
)

◆ gsd_circ()

void gsd_circ ( float  x,
float  y,
float  rad 
)

ADD.

Parameters
x,y
rad

Definition at line 166 of file gsd_prim.c.

Referenced by gsd_draw_gyro().

◆ gsd_coarse_surf_map()

int gsd_coarse_surf_map ( geosurf surf)

Draw coarse surface.

New (TEST) wire routine that draws low res surface Based on new Trinagle Fan routine Resolution is a function of current surface resolution times wire resolution

Todo:
normals have to be recalculated before proper low res surface can be drawn

In window optimization has been removed

Parameters
surfsurface (geosurf)
Returns

Definition at line 572 of file gsd_wire.c.

Referenced by gsd_wire_surf().

◆ gsd_color_func()

void gsd_color_func ( unsigned int  col)

◆ gsd_colormode()

void gsd_colormode ( int  cm)

Set color mode.

Call glColorMaterial before enabling the GL_COLOR_MATERIAL

Parameters
cmcolor mode value

Definition at line 97 of file gsd_prim.c.

References CM_AD, CM_COLOR, CM_DIFFUSE, CM_EMISSION, and CM_NULL.

Referenced by gpd_obj(), gsd_bgn_legend_viewport(), gsd_display_fringe(), gsd_wire_arrows(), gsd_wire_surf_const(), gsd_wire_surf_map(), and gvld_wind3_box().

◆ gsd_cplane_off()

void gsd_cplane_off ( int  num)

Turn off clip plane.

Parameters
numcplane id

Definition at line 126 of file gsd_cplane.c.

References gsd_set_clipplane().

Referenced by GS_draw_lighting_model(), and GS_unset_cplane().

◆ gsd_cplane_on()

void gsd_cplane_on ( int  num)

ADD.

Parameters
num

Definition at line 104 of file gsd_cplane.c.

Referenced by GS_set_cplane().

◆ gsd_cplane_setrot()

void gsd_cplane_setrot ( int  num,
float  rx,
float  ry,
float  rz 
)

ADD.

Parameters
num
rx,ry,rz

Definition at line 211 of file gsd_cplane.c.

Referenced by GS_set_cplane_rot().

◆ gsd_cplane_settrans()

void gsd_cplane_settrans ( int  num,
float  tx,
float  ty,
float  tz 
)

ADD.

Parameters
num
tx,ty,tz

Definition at line 229 of file gsd_cplane.c.

Referenced by GS_set_cplane_trans().

◆ gsd_cube()

void gsd_cube ( float *  center,
unsigned long  colr,
float  siz 
)

Draw cube.

Added by Hamish Bowman Nov 2005

Parameters
centercenter point
colrcolor value
sizsize value

Definition at line 429 of file gsd_objs.c.

References CubeNormals, CubeVertices, gsd_bgnpolygon(), gsd_endpolygon(), gsd_getshademodel(), gsd_litvert_func(), gsd_popmatrix(), gsd_pushmatrix(), gsd_scale(), gsd_shademodel(), gsd_translate(), X, Y, and Z.

Referenced by gpd_obj().

◆ gsd_def_clipplane()

void gsd_def_clipplane ( int  num,
double *  params 
)

Define clip plane.

Parameters
num
params

Definition at line 1016 of file gsd_prim.c.

◆ gsd_def_cplane()

void gsd_def_cplane ( int  num,
float *  pt,
float *  norm 
)

Define cplace.

Parameters
num
pt
norm

Definition at line 55 of file gsd_cplane.c.

◆ gsd_deflight()

void gsd_deflight ( int  num,
struct lightdefs vals 
)

Define light.

Parameters
numlight id (starts with 1)
valsposition(x,y,z,w), color, ambientm, emission

Definition at line 839 of file gsd_prim.c.

References MAX_LIGHTS.

◆ gsd_deletelist()

void gsd_deletelist ( GLuint  listno,
int  range 
)

Delete list.

Parameters
listno
range

Definition at line 1156 of file gsd_prim.c.

References MAX_OBJS.

Referenced by GS_delete_list().

◆ gsd_diamond()

void gsd_diamond ( float *  center,
unsigned long  colr,
float  siz 
)

Draw diamond symbol.

Parameters
centercenter point
colrcolor value
sizesize value

Definition at line 327 of file gsd_objs.c.

References gsd_bgnpolygon(), gsd_bgntmesh(), gsd_endpolygon(), gsd_endtmesh(), gsd_getshademodel(), gsd_litvert_func(), gsd_popmatrix(), gsd_pushmatrix(), gsd_scale(), gsd_shademodel(), gsd_swaptmesh(), gsd_translate(), Octo, OctoN, X, Y, and Z.

Referenced by gpd_obj().

◆ gsd_diamond_lines()

void gsd_diamond_lines ( void  )

Draw diamond lines.

Definition at line 577 of file gsd_objs.c.

References gsd_bgnline(), gsd_endline(), gsd_vert_func(), and Octo.

Referenced by gsd_draw_asterisk().

◆ gsd_disc()

void gsd_disc ( float  x,
float  y,
float  z,
float  rad 
)

ADD.

Parameters
x,y,z
rad

Definition at line 186 of file gsd_prim.c.

◆ gsd_display_fringe()

void gsd_display_fringe ( geosurf surf,
unsigned long  clr,
float  elev,
int  where[4] 
)

Display fridge.

Todo:
add elevation for bottom add color option add ruler grid lines
Parameters
surfsurface (geosurf)
clr
elev
where

Definition at line 51 of file gsd_fringe.c.

References CM_COLOR, FRINGE_WIDTH, gsd_color_func(), gsd_colormode(), gsd_linewidth(), gsd_zwritemask(), Nnorth, VCOLS, VROWS, g_surf::x_mod, g_surf::xmax, g_surf::xres, g_surf::y_mod, g_surf::ymax, g_surf::yres, g_surf::z_exag, and g_surf::zrange.

Referenced by GS_draw_fringe().

◆ gsd_do_scale()

◆ gsd_draw_asterisk()

void gsd_draw_asterisk ( float *  center,
unsigned long  colr,
float  siz 
)

Draw asterisk.

Parameters
centercenter point
colrcolor value
sizsize value

Definition at line 604 of file gsd_objs.c.

References gsd_color_func(), gsd_diamond_lines(), gsd_popmatrix(), gsd_pushmatrix(), gsd_rot(), gsd_scale(), gsd_translate(), X, Y, and Z.

Referenced by gpd_obj().

◆ gsd_draw_box()

void gsd_draw_box ( float *  center,
unsigned long  colr,
float  siz 
)

Draw box.

Added by Hamish Bowman Nov 2005

Parameters
centercenter point
colrcolor value
sizsize value

Definition at line 506 of file gsd_objs.c.

References CubeVertices, gsd_bgnline(), gsd_color_func(), gsd_endline(), gsd_popmatrix(), gsd_pushmatrix(), gsd_scale(), gsd_translate(), gsd_vert_func(), X, Y, and Z.

Referenced by gpd_obj().

◆ gsd_draw_cplane()

void gsd_draw_cplane ( int  num)

Draw cplane.

Parameters
num

Definition at line 296 of file gsd_cplane.c.

References MAX_CPLANES.

Referenced by GS_draw_cplane().

◆ gsd_draw_cplane_fence()

void gsd_draw_cplane_fence ( geosurf surf1,
geosurf surf2,
int  cpnum 
)

ADD.

Parameters
surf1first surface (geosurf)
surf2second surface (geosurf) [unused]
cpnum

Definition at line 247 of file gsd_cplane.c.

Referenced by GS_draw_cplane(), and GS_draw_cplane_fence().

◆ gsd_draw_gyro()

void gsd_draw_gyro ( float *  center,
unsigned long  colr,
float  siz 
)

Draw gyro.

Parameters
centercenter point
colrcolor value
sizsize value

Definition at line 659 of file gsd_objs.c.

References gsd_bgnline(), gsd_circ(), gsd_color_func(), gsd_endline(), gsd_popmatrix(), gsd_pushmatrix(), gsd_rot(), gsd_scale(), gsd_translate(), gsd_vert_func(), Octo, X, Y, and Z.

Referenced by gpd_obj().

◆ gsd_drawsphere()

void gsd_drawsphere ( float *  center,
unsigned long  colr,
float  siz 
)

Draw sphere.

Parameters
centercenter point
colrcolor value
sizesize value

Definition at line 565 of file gsd_objs.c.

References gsd_color_func(), and gsd_sphere().

◆ gsd_end_legend_viewport()

void gsd_end_legend_viewport ( void  )

ADD.

Definition at line 91 of file gsd_legend.c.

References GS_done_draw(), GS_set_draw(), GSD_BACK, and gsd_popmatrix().

◆ gsd_endline()

◆ gsd_endlist()

void gsd_endlist ( void  )

End list.

Definition at line 1143 of file gsd_prim.c.

◆ gsd_endpolygon()

void gsd_endpolygon ( void  )

Delimit the vertices of a primitive or a group of like primitives.

Definition at line 386 of file gsd_prim.c.

Referenced by gsd_box(), gsd_cube(), gsd_diamond(), gsd_north_arrow(), and gsd_scalebar().

◆ gsd_endqstrip()

void gsd_endqstrip ( void  )

ADD.

Definition at line 286 of file gsd_prim.c.

Referenced by gsd_fringe_horiz_poly(), and gsd_fringe_vert_poly().

◆ gsd_endtfan()

void gsd_endtfan ( void  )

ADD.

Definition at line 346 of file gsd_prim.c.

◆ gsd_endtmesh()

void gsd_endtmesh ( void  )

ADD.

Definition at line 306 of file gsd_prim.c.

Referenced by gsd_diamond().

◆ gsd_endtstrip()

void gsd_endtstrip ( void  )

ADD.

Definition at line 326 of file gsd_prim.c.

◆ gsd_finish()

void gsd_finish ( void  )

Finish.

Does nothing, only called from src.contrib/GMSL/NVIZ2.2/src/glwrappers.c

Definition at line 1061 of file gsd_prim.c.

◆ gsd_flush()

void gsd_flush ( void  )

Mostly for flushing drawing commands across a network.

glFlush doesn't block, so if blocking is desired use glFinish.

Definition at line 83 of file gsd_prim.c.

Referenced by GS_draw_X(), gsd_fringe_horiz_line(), gsd_fringe_horiz_line2(), gsd_fringe_horiz_poly(), gsd_fringe_vert_line(), gsd_fringe_vert_poly(), gsd_north_arrow(), gsd_scalebar(), and gsd_scalebar_v2().

◆ gsd_fringe_horiz_line()

void gsd_fringe_horiz_line ( float  bot,
geosurf surf,
int  row,
int  side 
)

Draw fringe outline in x direction.

Parameters
botcoordinate of fringe bottom
surfsurface (geosurf)
rowrow along which is fringe drawn
side

Definition at line 225 of file gsd_fringe.c.

References ATT_TOPO, g_surf::cols, GET_MAPATT, GS_done_draw(), gs_get_att_typbuff(), GS_set_draw(), gsd_bgnline(), gsd_do_scale(), gsd_endline(), gsd_flush(), GSD_FRONT, gsd_popmatrix(), gsd_pushmatrix(), gsd_translate(), gsd_vert_func(), g_surf::rows, VCOLS, X, g_surf::x_mod, g_surf::x_trans, g_surf::xres, Y, g_surf::y_mod, g_surf::y_trans, g_surf::yres, Z, g_surf::z_exag, and g_surf::z_trans.

◆ gsd_fringe_horiz_poly()

void gsd_fringe_horiz_poly ( float  bot,
geosurf surf,
int  row,
int  side 
)

Draw fringe polygon in x direction.

Parameters
botcoordinate of fringe bottom
surfsurface (geosurf)
rowrow along which is fringe drawn
side

Definition at line 141 of file gsd_fringe.c.

References ATT_TOPO, g_surf::cols, GET_MAPATT, GS_done_draw(), gs_get_att_typbuff(), GS_set_draw(), gsd_bgnqstrip(), gsd_do_scale(), gsd_endqstrip(), gsd_flush(), GSD_FRONT, gsd_popmatrix(), gsd_pushmatrix(), gsd_translate(), gsd_vert_func(), g_surf::rows, VCOLS, X, g_surf::x_mod, g_surf::x_trans, g_surf::xres, Y, g_surf::y_mod, g_surf::y_trans, g_surf::yres, Z, g_surf::z_exag, and g_surf::z_trans.

◆ gsd_fringe_vert_line()

void gsd_fringe_vert_line ( float  bot,
geosurf surf,
int  col,
int  side 
)

Draw fringe outline in y direction.

Parameters
botcoordinate of fringe bottom
surfsurface (geosurf)
colcolumn along which is fringe drawn
side

Definition at line 403 of file gsd_fringe.c.

References ATT_TOPO, g_surf::cols, GET_MAPATT, GS_done_draw(), gs_get_att_typbuff(), GS_set_draw(), gsd_bgnline(), gsd_do_scale(), gsd_endline(), gsd_flush(), GSD_FRONT, gsd_popmatrix(), gsd_pushmatrix(), gsd_translate(), gsd_vert_func(), g_surf::rows, VROWS, X, g_surf::x_mod, g_surf::x_trans, g_surf::xres, Y, g_surf::y_mod, g_surf::y_trans, g_surf::yres, Z, g_surf::z_exag, and g_surf::z_trans.

◆ gsd_fringe_vert_poly()

void gsd_fringe_vert_poly ( float  bot,
geosurf surf,
int  col,
int  side 
)

Draw fringe outline in y direction.

Parameters
botcoordinate of fringe bottom
surfsurface (geosurf)
colcolumn along which is fringe drawn
side

Definition at line 321 of file gsd_fringe.c.

References ATT_TOPO, g_surf::cols, GET_MAPATT, GS_done_draw(), gs_get_att_typbuff(), GS_set_draw(), gsd_bgnqstrip(), gsd_do_scale(), gsd_endqstrip(), gsd_flush(), GSD_FRONT, gsd_popmatrix(), gsd_pushmatrix(), gsd_translate(), gsd_vert_func(), g_surf::rows, VROWS, X, g_surf::x_mod, g_surf::x_trans, g_surf::xres, Y, g_surf::y_mod, g_surf::y_trans, g_surf::yres, Z, g_surf::z_exag, and g_surf::z_trans.

◆ gsd_frontbuffer()

void gsd_frontbuffer ( void  )

Draw to the front buffer.

Definition at line 457 of file gsd_prim.c.

◆ gsd_get_cplanes()

int gsd_get_cplanes ( Point4 planes)

Get cplaces.

Planes MUST be big enough to hold MAX_CPLANES Point4s

Parameters
placessurface coordinates, normal pointing away from visible side
Returns
ADD

Definition at line 162 of file gsd_cplane.c.

References MAX_CPLANES.

Referenced by gs_setlos_enterdata().

◆ gsd_get_cplanes_state()

void gsd_get_cplanes_state ( int *  onstate)

Get cplane state.

onstate MUST be big enough to hold MAX_CPLANES ints

Parameters
onstate

Definition at line 142 of file gsd_cplane.c.

References MAX_CPLANES.

Referenced by GS_alldraw_cplane_fences(), and GS_draw_lighting_model().

◆ 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_txtheight()

int gsd_get_txtheight ( int  size)

Get text height.

Parameters
sizesize
Returns
text height

Definition at line 53 of file gsd_fonts.c.

Referenced by gsd_north_arrow(), and gsd_scalebar().

◆ gsd_get_txtwidth()

int gsd_get_txtwidth ( const char *  s,
int  size 
)

Get text width.

Parameters
stext string
sizesize
Returns
text width

Definition at line 36 of file gsd_fonts.c.

Referenced by gsd_north_arrow(), and gsd_scalebar().

◆ 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_getfc()

int gsd_getfc ( void  )

ADD.

Returns

Definition at line 1220 of file gsd_surf.c.

Referenced by GS_get_fencecolor(), and GS_transp_is_set().

◆ gsd_getimage()

int gsd_getimage ( unsigned char **  pixbuf,
unsigned int *  xsize,
unsigned int *  ysize 
)

Get image of current GL screen.

Parameters
pixbufdata buffer
[out]xsize,ysizepicture dimension
Returns
0 on failure
1 on success

Definition at line 905 of file gsd_prim.c.

References b, l, r, and t.

Referenced by GS_write_ppm(), and GS_write_tif().

◆ gsd_getshademodel()

int gsd_getshademodel ( void  )

Get shaded model.

Returns
shade

Definition at line 437 of file gsd_prim.c.

Referenced by gsd_box(), gsd_cube(), and gsd_diamond().

◆ gsd_getwindow()

void gsd_getwindow ( int *  window,
int *  viewport,
double *  modelMatrix,
double *  projMatrix 
)

Get viewport.

Parameters
[out]window
viewport
modelMatrixmodel matrix
projMatrixprojection matrix

Definition at line 553 of file gsd_prim.c.

◆ gsd_init_lightmodel()

void gsd_init_lightmodel ( void  )

Initialize model light.

Definition at line 722 of file gsd_prim.c.

Referenced by GS_new_light().

◆ gsd_line_onsurf()

void gsd_line_onsurf ( geosurf gs,
float *  v1,
float *  v2 
)

Line on surface, fix z-values.

Todo:
remove fudge, instead fudge the Z buffer
Parameters
gssurface (geosurf)
v1first point
v2second point

Definition at line 189 of file gsd_objs.c.

References FUDGE, gsd_bgnline(), gsd_endline(), gsd_vert_func(), gsdrape_get_segments(), and Z.

Referenced by gsd_x().

◆ gsd_linewidth()

void gsd_linewidth ( short  n)

Set width of rasterized lines.

Parameters
nline width

Definition at line 266 of file gsd_prim.c.

Referenced by GS_draw_X(), gsd_bgn_legend_viewport(), gsd_display_fringe(), and gsd_scalebar_v2().

◆ gsd_litvert_func()

void gsd_litvert_func ( float *  norm,
unsigned long  col,
float *  pt 
)

Set the current normal vector & specify vertex.

Parameters
normnormal vector
colcolor value
ptpoint (model coordinates)

Definition at line 660 of file gsd_prim.c.

Referenced by gsd_box(), gsd_cube(), and gsd_diamond().

◆ gsd_litvert_func2()

void gsd_litvert_func2 ( float *  norm,
unsigned long  col,
float *  pt 
)

ADD.

Parameters
norm
col
pt

Definition at line 676 of file gsd_prim.c.

◆ gsd_make_nice_number()

int gsd_make_nice_number ( float *  num)

ADD.

Parameters
num
Returns
0 on error
1 on success

Definition at line 154 of file gsd_legend.c.

Referenced by gsd_get_nice_range().

◆ gsd_makelist()

int gsd_makelist ( void  )

ADD.

First time called, gets a bunch of objects, then hands them back when needed

Returns
-1 on failure
number of objects

Definition at line 1096 of file gsd_prim.c.

Referenced by gsd_put_legend().

◆ gsd_model2real()

void gsd_model2real ( Point3  point)

Convert model to real coordinates.