|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-1d1e47ad9d
|

Go to the source code of this file.
Functions | |
| int | GK_set_interpmode (int) |
| Set interpolation mode. | |
| void | GK_set_tension (float) |
| Set value for tension when interpmode is KF_SPLINE. | |
| void | GK_showtension_start (void) |
| void | GK_showtension_stop (void) |
| Show tension stop ? | |
| void | GK_update_tension (void) |
| Update tension. | |
| void | GK_update_frames (void) |
| Recalculate path using the current number of frames requested. | |
| void | GK_set_numsteps (int) |
| Set the number of frames to be interpolated from keyframes. | |
| void | GK_clear_keys (void) |
| Deletes all keyframes, resets field masks. | |
| void | GK_print_keys (const char *) |
| Print keyframe info. | |
| int | GK_move_key (float, float, float) |
| Move keyframe. | |
| int | GK_delete_key (float, float, int) |
| int | GK_add_key (float, unsigned long, int, float) |
| Add keyframe. | |
| void | GK_do_framestep (int, int) |
| Moves the animation to frame number "step". | |
| void | GK_show_path (int) |
| Draw the current path. | |
| void | GK_show_vect (int) |
| Show vector sets. | |
| void | GK_show_site (int) |
| Show point sets. | |
| void | GK_show_vol (int) |
| Show volumes. | |
| void | GK_show_list (int) |
| Show list. | |
| int | GP_site_exists (int) |
| Check if point set exists. | |
| int | GP_new_site (void) |
| Create new point set. | |
| int | GP_num_sites (void) |
| Get number of loaded point sets. | |
| int * | GP_get_site_list (int *) |
| Get list of point sets. | |
| int | GP_delete_site (int) |
| Delete registered point set. | |
| int | GP_load_site (int, const char *) |
| Load point set from file. | |
| int | GP_get_sitename (int, char **) |
| Get point set filename. | |
| int | GP_get_style (int, int *, int *, float *, int *) |
| Get point set style. | |
| int | GP_set_style (int, int, int, float, int) |
| Set point style. | |
| int | GP_set_style_thematic (int, int, const char *, const char *, const char *, const char *, struct Colors *) |
| Set point set style for thematic mapping. | |
| int | GP_unset_style_thematic (int) |
| Make style for thematic mapping inactive. | |
| int | GP_attmode_color (int, const char *) |
| int | GP_attmode_none (int) |
| int | GP_set_zmode (int, int) |
| Set z mode for point set. | |
| int | GP_get_zmode (int, int *) |
| Get z-mode. | |
| void | GP_set_trans (int, float, float, float) |
| Set transformation params. | |
| void | GP_get_trans (int, float *, float *, float *) |
| Get transformation params. | |
| int | GP_select_surf (int, int) |
| Select surface for given point set. | |
| int | GP_unselect_surf (int, int) |
| Unselect surface. | |
| int | GP_surf_is_selected (int, int) |
| Check if surface is selected. | |
| void | GP_draw_site (int) |
| Draw point set. | |
| void | GP_alldraw_site (void) |
| Draw all available point sets. | |
| int | GP_Set_ClientData (int, void *) |
| Set client data. | |
| void * | GP_Get_ClientData (int) |
| Get client data. | |
| int | GP_str_to_marker (const char *) |
| Determine point marker symbol for string. | |
| void | void_func (void) |
| void | GS_libinit (void) |
| Initialize OGSF library. | |
| int | GS_get_longdim (float *) |
| Get largest dimension. | |
| int | GS_get_region (float *, float *, float *, float *) |
| Get 2D region extent. | |
| void | GS_set_att_defaults (float *, float *) |
| Set default attributes for map objects. | |
| int | GS_surf_exists (int) |
| int | GS_new_surface (void) |
| Add new surface. | |
| int | GS_new_light (void) |
| Add new model light. | |
| void | GS_set_light_reset (int) |
| int | GS_get_light_reset (void) |
| void | GS_setlight_position (int, float, float, float, int) |
| Set light position. | |
| void | GS_setlight_color (int, float, float, float) |
| Set light color. | |
| void | GS_setlight_ambient (int, float, float, float) |
| Set light ambient. | |
| void | GS_lights_off (void) |
| Switch off all lights. | |
| void | GS_lights_on (void) |
| Switch on all lights. | |
| void | GS_switchlight (int, int) |
| Switch on/off light. | |
| int | GS_transp_is_set (void) |
| Check if transparency is set. | |
| void | GS_get_modelposition1 (float *) |
| void | GS_get_modelposition (float *, float *) |
| Retrieves coordinates for lighting model position, at center of view. | |
| void | GS_draw_X (int, float *) |
| Draw place marker. | |
| void | GS_set_Narrow (int *, int, float *) |
| Set decoration, north arrow ?? | |
| void | GS_draw_line_onsurf (int, float, float, float, float) |
| Draw line on surface. | |
| int | GS_draw_nline_onsurf (int, float, float, float, float, float *, int) |
| Draw multiline on surface. | |
| void | GS_draw_flowline_at_xy (int, float, float) |
| Draw flow-line on surace. | |
| void | GS_draw_lighting_model1 (void) |
| Draw lighting model. | |
| void | GS_draw_lighting_model (void) |
| Draw lighting model. | |
| int | GS_update_curmask (int) |
| Update current mask. | |
| int | GS_is_masked (int, float *) |
| Check if point is masked ? | |
| void | GS_unset_SDsurf (void) |
| Unset Scaled Difference surface. | |
| int | GS_set_SDsurf (int) |
| Set surface as Scaled Difference surface. | |
| int | GS_set_SDscale (float) |
| Set ? | |
| int | GS_get_SDsurf (int *) |
| Get ? | |
| int | GS_get_SDscale (float *) |
| Get ? | |
| int | GS_update_normals (int) |
| Update normals. | |
| int | GS_get_att (int, int, int *, float *, char *) |
| Get attributes. | |
| int | GS_get_cat_at_xy (int, int, char *, float, float) |
| Get surface category on given position. | |
| int | GS_get_norm_at_xy (int, float, float, float *) |
| Get surface normal at x,y (real coordinates) | |
| int | GS_get_val_at_xy (int, int, char *, float, float) |
| Get RGB color at given point. | |
| int | GS_unset_att (int, int) |
| Unset attribute. | |
| int | GS_set_att_const (int, int, float) |
| Set attribute constant. | |
| int | GS_set_maskmode (int, int) |
| Set mask mode. | |
| int | GS_get_maskmode (int, int *) |
| Get mask mode. | |
| int | GS_Set_ClientData (int, void *) |
| Set client data. | |
| void * | GS_Get_ClientData (int) |
| Get client data. | |
| int | GS_num_surfs (void) |
| Get number of surfaces. | |
| int * | GS_get_surf_list (int *) |
| Get surface list. | |
| int | GS_delete_surface (int) |
| Delete surface. | |
| int | GS_load_att_map (int, const char *, int) |
| Load raster map as attribute. | |
| void | GS_draw_surf (int) |
| Draw surface. | |
| void | GS_draw_wire (int) |
| Draw surface wire. | |
| void | GS_alldraw_wire (void) |
| Draw all wires. | |
| void | GS_alldraw_surf (void) |
| Draw all surfaces. | |
| void | GS_set_exag (int, float) |
| Set Z exag for surface. | |
| void | GS_set_global_exag (float) |
| Set global z-exag value. | |
| float | GS_global_exag (void) |
| Get global z-exag value. | |
| void | GS_set_wire_color (int, int) |
| Set wire color. | |
| int | GS_get_wire_color (int, int *) |
| Get wire color. | |
| int | GS_setall_drawmode (int) |
| Set all draw-modes. | |
| int | GS_set_drawmode (int, int) |
| Set draw mode. | |
| int | GS_get_drawmode (int, int *) |
| Get draw mode. | |
| void | GS_set_nozero (int, int, int) |
| Set no-zero ? | |
| int | GS_get_nozero (int, int, int *) |
| Get no-zero ? | |
| int | GS_setall_drawres (int, int, int, int) |
| Set all draw resolutions. | |
| int | GS_set_drawres (int, int, int, int, int) |
| Set draw resolution for surface. | |
| void | GS_get_drawres (int, int *, int *, int *, int *) |
| Get draw resolution of surface. | |
| void | GS_get_dims (int, int *, int *) |
| Get dimension of surface. | |
| int | GS_get_exag_guess (int, float *) |
| Get exag-value guess. | |
| void | GS_get_zrange_nz (float *, float *) |
| Get Z extents for all loaded surfaces. | |
| void | GS_set_trans (int, float, float, float) |
| Set translation (surface position) | |
| void | GS_get_trans (int, float *, float *, float *) |
| Get translation values (surface position) | |
| unsigned int | GS_default_draw_color (void) |
| Get default draw color. | |
| unsigned int | GS_background_color (void) |
| Get background color. | |
| void | GS_set_draw (int) |
| Sets which buffer to draw to. | |
| void | GS_ready_draw (void) |
| void | GS_done_draw (void) |
| Draw done, swap buffers. | |
| void | GS_set_focus (float *) |
| Set focus. | |
| int | GS_get_focus (float *) |
| Get focus. | |
| void | GS_set_focus_center_map (int) |
| Set focus to map center. | |
| void | GS_moveto (float *) |
| Move viewpoint. | |
| void | GS_moveto_real (float *) |
| Move position to (real) | |
| void | GS_set_focus_real (float *) |
| Set real focus. | |
| void | GS_get_to_real (float *) |
| Get 'to' real coordinates. | |
| int | GS_get_zextents (int, float *, float *, float *) |
| Get z-extent for a single surface. | |
| int | GS_get_zrange (float *, float *, int) |
| Get z-extent for all loaded surfaces. | |
| void | GS_get_from (float *) |
| Get viewpoint 'from' position. | |
| void | GS_get_from_real (float *) |
| Get viewpoint 'from' real coordinates. | |
| void | GS_get_to (float *) |
| Get 'to' model coordinates. | |
| void | GS_get_viewdir (float *) |
| Get viewdir. | |
| void | GS_set_viewdir (float *) |
| Set viewdir. | |
| void | GS_set_fov (int) |
| Set field of view. | |
| void | GS_set_rotation (double, double, double, double) |
| Set rotation params. | |
| void | GS_get_rotation_matrix (double *) |
| Get rotation matrix. | |
| void | GS_set_rotation_matrix (double *) |
| Set rotation matrix. | |
| void | GS_init_rotation (void) |
| Reset scene rotation. | |
| void | GS_unset_rotation (void) |
| Stop scene rotation. | |
| int | GS_get_fov (void) |
| Get field of view. | |
| int | GS_get_twist (void) |
| Get twist value. | |
| void | GS_set_twist (int) |
| Set viewpoint twist value. | |
| void | GS_set_nofocus (void) |
| Unset focus. | |
| void | GS_set_infocus (void) |
| Set focus. | |
| void | GS_set_viewport (int, int, int, int) |
| Set viewport. | |
| int | GS_look_here (int, int) |
| Send screen coords sx and sy, lib traces through surfaces; sets new center to point of nearest intersection. | |
| int | GS_get_selected_point_on_surface (int, int, int *, float *, float *, float *) |
| Get selected point of surface. | |
| void | GS_set_cplane_rot (int, float, float, float) |
| Set cplace rotation. | |
| void | GS_set_cplane_trans (int, float, float, float) |
| Set cplace trans. | |
| void | GS_draw_cplane (int) |
| Draw cplace. | |
| int | GS_draw_cplane_fence (int, int, int) |
| Draw cplace fence ? | |
| void | GS_alldraw_cplane_fences (void) |
| Draw all cplace fences ? | |
| void | GS_set_cplane (int) |
| Set cplace. | |
| void | GS_unset_cplane (int) |
| Unset clip place (turn off) | |
| void | GS_get_scale (float *, float *, float *, int) |
| Get axis scale. | |
| void | GS_set_fencecolor (int) |
| Set fence color. | |
| int | GS_get_fencecolor (void) |
| Get fence color. | |
| int | GS_get_distance_alongsurf (int, float, float, float, float, float *, int) |
| Measure distance "as the ball rolls" between two points on surface. | |
| int | GS_save_3dview (const char *, int) |
| Save 3d view. | |
| int | GS_load_3dview (const char *, int) |
| Load 3d view. | |
| void | GS_init_view (void) |
| Init viewpoint. | |
| void | GS_clear (int) |
| Clear view. | |
| double | GS_get_aspect (void) |
| Get aspect value. | |
| int | GS_has_transparency (void) |
| Check for transparency. | |
| void | GS_zoom_setup (int *, int *, int *, int *, int *, int *) |
| Get zoom setup. | |
| int | GS_write_zoom (const char *, unsigned int, unsigned int) |
| Write zoom to file. | |
| void | GS_draw_all_list (void) |
| Draw all glLists. | |
| void | GS_delete_list (GLuint) |
| Delete pre-defined list. | |
| int | GS_draw_legend (const char *, GLuint, int, int *, float *, int *) |
| Draw legend. | |
| void | GS_draw_fringe (int, unsigned long, float, int *) |
| Draw fringe around data (surface) at selected corners. | |
| void | GS_getlight_position (int, float *, float *, float *, int *) |
| Get light position. | |
| void | GS_getlight_color (int, float *, float *, float *) |
| Get light color. | |
| void | GS_getlight_ambient (int, float *, float *, float *) |
| Get light ambient. | |
| int | GS_check_cancel (void) |
| Check for cancel. | |
| void | GS_set_cancel (int) |
| Set cancel. | |
| void | GS_set_cxl_func (void(*)(void)) |
| Set cxl function. | |
| double | GS_geodistance (double *, double *, const char *) |
| Calculate distance between 2 coordinates. | |
| float | GS_distance (float *, float *) |
| Calculate distance. | |
| float | GS_P2distance (float *, float *) |
| Calculate distance in plane. | |
| void | GS_v3eq (float *, float *) |
| Copy vector values. | |
| void | GS_v3add (float *, float *) |
| Sum vectors. | |
| void | GS_v3sub (float *, float *) |
| Subtract vectors. | |
| void | GS_v3mult (float *, float) |
| Multiple vectors. | |
| int | GS_v3norm (float *) |
| Change v1 so that it is a unit vector (3D) | |
| int | GS_v2norm (float *) |
| Change v1 so that it is a unit vector (2D) | |
| int | GS_dv3norm (double *) |
| Changes v1 so that it is a unit vector. | |
| int | GS_v3normalize (float *, float *) |
| Change v2 so that v1v2 is a unit vector. | |
| int | GS_v3dir (float *, float *, float *) |
| Get a normalized direction from v1 to v2, store in v3. | |
| void | GS_v2dir (float *, float *, float *) |
| Get a normalized direction from v1 to v2, store in v3 (2D) | |
| void | GS_v3cross (float *, float *, float *) |
| Get the cross product v3 = v1 cross v2. | |
| void | GS_v3mag (float *, float *) |
| Magnitude of vector. | |
| int | GS_coordpair_repeats (float *, float *, int) |
| ADD. | |
| int | GV_vect_exists (int) |
| Check if vector set exists. | |
| int | GV_new_vector (void) |
| Register new vector set. | |
| int | GV_num_vects (void) |
| Get number of available vector sets. | |
| int * | GV_get_vect_list (int *) |
| Get list of vector sets. | |
| int | GV_delete_vector (int) |
| Delete vector set from list. | |
| int | GV_load_vector (int, const char *) |
| Load vector set. | |
| int | GV_get_vectname (int, char **) |
| Get vector map name. | |
| int | GV_set_style (int, int, int, int, int) |
| Set vector style. | |
| int | GV_get_style (int, int *, int *, int *, int *) |
| Get vector style. | |
| int | GV_set_style_thematic (int, int, const char *, const char *, struct Colors *) |
| Set vector set style for thematic mapping. | |
| int | GV_unset_style_thematic (int) |
| Make style for thematic mapping inactive. | |
| void | GV_set_trans (int, float, float, float) |
| Set trans ? | |
| int | GV_get_trans (int, float *, float *, float *) |
| Get trans ? | |
| int | GV_select_surf (int, int) |
| Select surface identified by hs to have vector identified by hv draped over it. | |
| int | GV_unselect_surf (int, int) |
| Unselect surface. | |
| int | GV_surf_is_selected (int, int) |
| Check if surface is selected. | |
| void | GV_draw_vect (int) |
| Draw vector set. | |
| void | GV_alldraw_vect (void) |
| Draw all loaded vector sets. | |
| void | GV_alldraw_fastvect (void) |
| Draw all loaded vector sets (fast mode) | |
| void | GV_draw_fastvect (int) |
| Draw vector set (fast mode) | |
| int | GV_Set_ClientData (int, void *) |
| Set client data. | |
| void * | GV_Get_ClientData (int) |
| Get client data. | |
| void | GVL_libinit (void) |
| Library initialization for volumes. | |
| void | GVL_init_region (void) |
| Initialize 3D region. | |
| int | GVL_get_region (float *, float *, float *, float *, float *, float *) |
| Get region extent settings. | |
| void * | GVL_get_window (void) |
| Get window. | |
| int | GVL_vol_exists (int) |
| Check if volume set exists. | |
| int | GVL_new_vol (void) |
| Create new volume set. | |
| int | GVL_num_vols (void) |
| Get number of loaded volume sets. | |
| int * | GVL_get_vol_list (int *) |
| Get list of loaded volume sets. | |
| int | GVL_delete_vol (int) |
| Delete volume set from list. | |
| int | GVL_load_vol (int, const char *) |
| Load 3d raster map to volume set. | |
| int | GVL_get_volname (int, char *) |
| Get volume set name. | |
| void | GVL_set_trans (int, float, float, float) |
| Set trans ? | |
| int | GVL_get_trans (int, float *, float *, float *) |
| Get trans ? | |
| void | GVL_set_draw_wire (int, int) |
| Set drawing wire box. | |
| void | GVL_draw_vol (int) |
| Draw volume set. | |
| void | GVL_draw_wire (int) |
| Draw volume in wire mode. | |
| void | GVL_alldraw_vol (void) |
| Draw all volume sets. | |
| void | GVL_alldraw_wire (void) |
| Draw all volume sets in wire mode. | |
| int | GVL_Set_ClientData (int, void *) |
| Set client data for volume set. | |
| void * | GVL_Get_ClientData (int) |
| Get client data. | |
| void | GVL_get_dims (int, int *, int *, int *) |
| Get volume dimensions. | |
| void | GVL_set_focus_center_map (int) |
| Set focus on map center. | |
| int | GVL_isosurf_move_up (int, int) |
| Move up isosurface in list. | |
| int | GVL_isosurf_move_down (int, int) |
| Move down isosurface in list. | |
| void | GVL_isosurf_get_drawres (int, int *, int *, int *) |
| Get draw resolution for isosurface. | |
| int | GVL_isosurf_set_drawres (int, int, int, int) |
| Set isosurface draw resolution. | |
| int | GVL_isosurf_get_drawmode (int, int *) |
| Get isosurface draw mode. | |
| int | GVL_isosurf_set_drawmode (int, int) |
| Set isosurface draw mode. | |
| int | GVL_isosurf_add (int) |
| Add isosurface. | |
| int | GVL_isosurf_del (int, int) |
| Delete isosurface. | |
| int | GVL_isosurf_get_att (int, int, int, int *, float *, char *) |
| Get isosurface attributes. | |
| int | GVL_isosurf_unset_att (int, int, int) |
| Unset isosurface attributes. | |
| int | GVL_isosurf_set_att_const (int, int, int, float) |
| Set constant isosurface attribute. | |
| int | GVL_isosurf_set_att_map (int, int, int, const char *) |
| Set isosurface map attribute. | |
| int | GVL_isosurf_get_flags (int, int, int *) |
| Get isosurface flags. | |
| int | GVL_isosurf_set_flags (int, int, int) |
| Set isosurface flags. | |
| int | GVL_isosurf_num_isosurfs (int) |
| Get number of available isosurfaces. | |
| int | GVL_isosurf_set_maskmode (int, int, int) |
| Set mask attribute mode. | |
| int | GVL_isosurf_get_maskmode (int, int, int *) |
| Get isosurface mask mode. | |
| int | GVL_slice_move_up (int, int) |
| Move up slice. | |
| int | GVL_slice_move_down (int, int) |
| Move down slice. | |
| void | GVL_slice_get_drawres (int, int *, int *, int *) |
| Get draw resolution of slice. | |
| int | GVL_slice_get_transp (int, int, int *) |
| Get slice trans ? | |
| int | GVL_slice_set_transp (int, int, int) |
| Set slice trans ? | |
| int | GVL_slice_set_drawres (int, int, int, int) |
| Set slice draw resolution. | |
| int | GVL_slice_get_drawmode (int, int *) |
| Get slice draw mode. | |
| int | GVL_slice_set_drawmode (int, int) |
| Set slice draw mode. | |
| int | GVL_slice_add (int) |
| Add slice. | |
| int | GVL_slice_del (int, int) |
| Delete slice. | |
| int | GVL_slice_num_slices (int) |
| Get number or slices. | |
| int | GVL_slice_get_pos (int, int, float *, float *, float *, float *, float *, float *, int *) |
| Get slice position. | |
| int | GVL_slice_set_pos (int, int, float, float, float, float, float, float, int) |
| Get slice position. | |
| int | Gp_set_color (const char *, geopoint *) |
| geopoint * | Gp_load_sites (const char *, int *, int *) |
| Load to points to memory. | |
| int | Gp_load_sites_thematic (geosite *, struct Colors *) |
| Load styles for geopoints based on thematic mapping. | |
| double | Gs_distance (double *, double *) |
| Calculates distance in METERS between two points in current projection (2D) | |
| int | Gs_loadmap_as_float (struct Cell_head *, const char *, float *, struct BM *, int *) |
| Load raster map as floating point map. | |
| int | Gs_loadmap_as_int (struct Cell_head *, const char *, int *, struct BM *, int *) |
| Load raster map as integer map. | |
| int | Gs_numtype (const char *, int *) |
| Get map data type. | |
| int | Gs_loadmap_as_short (struct Cell_head *, const char *, short *, struct BM *, int *) |
| Load raster map as integer map. | |
| int | Gs_loadmap_as_char (struct Cell_head *, const char *, unsigned char *, struct BM *, int *) |
| Load raster map as integer map. | |
| int | Gs_loadmap_as_bitmap (struct Cell_head *, const char *, struct BM *) |
| Load raster map as integer map. | |
| int | Gs_build_256lookup (const char *, int *) |
| Build color table (256) | |
| void | Gs_pack_colors (const char *, int *, int, int) |
| Pack color table. | |
| void | Gs_pack_colors_float (const char *, float *, int *, int, int) |
| Pack color table (floating-point map) | |
| int | Gs_get_cat_label (const char *, int, int, char *) |
| Get categories/labels. | |
| int | Gs_save_3dview (const char *, geoview *, geodisplay *, struct Cell_head *, geosurf *) |
| Save 3dview. | |
| int | Gs_load_3dview (const char *, geoview *, geodisplay *, struct Cell_head *, const geosurf *) |
| Load 3dview. | |
| int | Gs_update_attrange (geosurf *, int) |
| Update no_zero ranges for attribute (actually no_null now) | |
| geoline * | Gv_load_vect (const char *, int *) |
| Load vector map to memory. | |
| int | Gv_load_vect_thematic (geovect *, struct Colors *) |
| Load styles for geolines based on thematic mapping. | |
| void | sub_Vectmem (int) |
| Tracking memory. | |
| Keylist * | gk_copy_key (Keylist *) |
| Copy keyframes. | |
| unsigned long | gk_get_mask_sofar (float, Keylist *) |
| Get mask value. | |
| int | gk_viable_keys_for_mask (unsigned long, Keylist *, Keylist **) |
| ADD. | |
| void | gk_follow_frames (Viewnode *, int, Keylist *, int, int, int, unsigned long) |
| Checks key masks. | |
| void | gk_free_key (Keylist *) |
| Free keyframe list. | |
| Viewnode * | gk_make_framesfromkeys (Keylist *, int, int, int, float) |
| Generate viewnode from keyframes. | |
| double | get_key_neighbors (int, double, double, int, Keylist **, Keylist **, Keylist **, Keylist **, Keylist **, double *, double *) |
| double | lin_interp (float, float, float) |
| Linear interpolation. | |
| double | get_2key_neighbors (int, float, float, int, Keylist **, Keylist **, Keylist **) |
| Viewnode * | gk_make_linear_framesfromkeys (Keylist *, int, int, int) |
| Generate viewnode from keyframe list (linear interpolation) | |
| void | correct_twist (Keylist *) |
| Correct twist value. | |
| int | gk_draw_path (Viewnode *, int, Keylist *) |
| Draw path. | |
| geosite * | gp_get_site (int) |
| Get geosite struct. | |
| geosite * | gp_get_prev_site (int) |
| Get previous geosite struct from list. | |
| int | gp_num_sites (void) |
| Get number of loaded point sets. | |
| geosite * | gp_get_last_site (void) |
| Get last point set. | |
| geosite * | gp_get_new_site (void) |
| Create new geosite instance and add it to list. | |
| void | gp_update_drapesurfs (void) |
| Update drape surfaces. | |
| int | gp_set_defaults (geosite *) |
| Set default value for geosite struct. | |
| void | print_site_fields (geosite *) |
| int | gp_init_site (geosite *) |
| Initialize geosite struct. | |
| void | gp_delete_site (int) |
| Delete point set and remove from list. | |
| int | gp_free_site (geosite *) |
| Free allocated geosite struct. | |
| void | gp_free_sitemem (geosite *) |
| Free geosite (lower level) | |
| void | gp_set_drapesurfs (geosite *, int *, int) |
| int | gs_point_in_region (geosurf *, float *, float *) |
| Check if point is in region. | |
| void | gpd_obj (geosurf *, gvstyle *, Point3) |
| Draw point representing object. | |
| int | gpd_2dsite (geosite *, geosurf *, int) |
| Draw 2D point set. | |
| int | gpd_3dsite (geosite *, float, float, int) |
| Draw 3D point set. | |
| void | gs_err (const char *) |
| void | gs_init (void) |
| Initialize library. | |
| geosurf * | gs_get_surf (int) |
| Get geosurf struct. | |
| geosurf * | gs_get_prev_surface (int) |
| Get previous geosurf struct. | |
| int | gs_getall_surfaces (geosurf **) |
| Get array of geosurf structs. | |
| int | gs_num_surfaces (void) |
| Get number of surfaces. | |
| int | gs_att_is_set (geosurf *, IFLAG) |
| geosurf * | gs_get_last_surface (void) |
| Get last allocated geosurf struct from list. | |
| geosurf * | gs_get_new_surface (void) |
| Allocate new geosurf struct. | |
| int | gs_init_surf (geosurf *, double, double, int, int, double, double) |
| Initialize allocated geosurf struct. | |
| int | gs_init_normbuff (geosurf *) |
| Init geosurf normbuff. | |
| void | print_frto (float(*)[4]) |
| Debugging, print 'from/to' model coordinates to stderr. | |
| void | print_realto (float *) |
| Debugging, print 'to' real coordinates to stderr. | |
| void | print_256lookup (int *) |
| Debugging, 256 integer values from buffer. | |
| void | print_surf_fields (geosurf *) |
| Debugging, print geosurf fields to stderr. | |
| void | print_view_fields (geoview *) |
| Debugging, print geoview fields to stderr. | |
| void | gs_set_defaults (geosurf *, float *, float *) |
| Set default attribute values. | |
| void | gs_delete_surf (int) |
| Remove geosurf struct from list. | |
| int | gs_free_surf (geosurf *) |
| Free geosurf struct. | |
| void | gs_free_unshared_buffs (geosurf *) |
| Free unshared buffers of geosurf struct. | |
| int | gs_num_datah_reused (int) |
| Get number of reused values. | |
| int | gs_get_att_type (geosurf *, int) |
| Get attribute type. | |
| int | gs_get_att_src (geosurf *, int) |
| Get attribute source. | |
| typbuff * | gs_get_att_typbuff (geosurf *, int, int) |
| Get attribute data buffer. | |
| size_t | gs_malloc_att_buff (geosurf *, int, int) |
| Allocate attribute buffer. | |
| int | gs_malloc_lookup (geosurf *, int) |
| Allocate attribute lookup. | |
| int | gs_set_att_type (geosurf *, int, int) |
| Set attribute type. | |
| int | gs_set_att_src (geosurf *, int, int) |
| Set attribute source. | |
| int | gs_set_att_const (geosurf *, int, float) |
| Set attribute constant value. | |
| void | gs_set_maskmode (int) |
| Set geosurf mask mode. | |
| int | gs_mask_defined (geosurf *) |
| Check if mask is defined. | |
| int | gs_masked (typbuff *, int, int, int) |
| Should only be called when setting up the current mask (gs_bm.c) | |
| int | gs_mapcolor (typbuff *, gsurf_att *, int) |
| Call this one when you already know att_src is MAP_ATT. | |
| int | gs_get_zextents (geosurf *, float *, float *, float *) |
| Get z-extent values. | |
| int | gs_get_xextents (geosurf *, float *, float *) |
| Get x-extent values. | |
| int | gs_get_yextents (geosurf *, float *, float *) |
| Get y-extent values. | |
| int | gs_get_zrange0 (float *, float *) |
| Get z-range. | |
| int | gs_get_zrange (float *, float *) |
| Get z-range. | |
| int | gs_get_xrange (float *, float *) |
| Get x-range. | |
| int | gs_get_yrange (float *, float *) |
| Get y-range. | |
| int | gs_get_data_avg_zmax (float *) |
| Get average z-max value. | |
| int | gs_get_datacenter (float *) |
| Get data center point. | |
| int | gs_setall_norm_needupdate (void) |
| Set for geosurf need-to-update mark. | |
| int | gs_point_is_masked (geosurf *, float *) |
| Check if point is masked. | |
| int | gs_distance_onsurf (geosurf *, float *, float *, float *, int) |
| Calculate distance on surface. | |
| struct BM * | gsbm_make_mask (typbuff *, float, int, int) |
| Do combining of bitmaps, make bitmaps from other data w/maskval. | |
| void | gsbm_zero_mask (struct BM *) |
| Zero mask. | |
| int | gsbm_or_masks (struct BM *, struct BM *) |
| Mask bitmap (mask type OR) | |
| int | gsbm_ornot_masks (struct BM *, struct BM *) |
| Mask bitmap (mask type ORNOT) | |
| int | gsbm_and_masks (struct BM *, struct BM *) |
| Mask bitmap (mask type ADD) | |
| int | gsbm_xor_masks (struct BM *, struct BM *) |
| Mask bitmap (mask type XOR) | |
| int | gs_update_curmask (geosurf *) |
| Update current maps. | |
| void | print_bm (struct BM *) |
| Print bitmap to stderr. | |
| void | init_vars (geosurf *) |
| Init variables. | |
| int | gs_calc_normals (geosurf *) |
| Calculate normals. | |
| int | calc_norm (geosurf *, int, int, unsigned int) |
| Calculate normals. | |
| int | gs_los_intersect1 (int, float(*)[3], float *) |
| Crude method of intersecting line of sight with closest part of surface. | |
| int | gs_los_intersect (int, float **, float *) |
| Crude method of intersecting line of sight with closest part of surface. | |
| int | RayCvxPolyhedronInt (Point3, Point3, double, Point4 *, int, double *, int *) |
| Ray-Convex Polyhedron Intersection Test. | |
| void | gs_get_databounds_planes (Point4 *) |
| Get data bounds for plane. | |
| int | gs_setlos_enterdata (Point3 *) |
| void | gsd_def_cplane (int, float *, float *) |
| Define cplace. | |
| void | gsd_update_cplanes (void) |
| Update cplaces. | |
| void | gsd_cplane_on (int) |
| ADD. | |
| void | gsd_cplane_off (int) |
| Turn off clip plane. | |
| void | gsd_get_cplanes_state (int *) |
| Get cplane state. | |
| int | gsd_get_cplanes (Point4 *) |
| Get cplaces. | |
| void | gsd_update_cpnorm (int) |
| ADD. | |
| void | gsd_cplane_setrot (int, float, float, float) |
| ADD. | |
| void | gsd_cplane_settrans (int, float, float, float) |
| ADD. | |
| void | gsd_draw_cplane_fence (geosurf *, geosurf *, int) |
| ADD. | |
| void | gsd_draw_cplane (int) |
| Draw cplane. | |
| GLuint | gsd_set_font (const char *) |
| int | gsd_get_txtwidth (const char *, int) |
| Get text width. | |
| int | gsd_get_txtheight (int size) |
| Get text height. | |
| void | do_label_display (GLuint, float *, const char *) |
| Display label. | |
| int | get_txtdescender (void) |
| Get text descender. | |
| int | get_txtxoffset (void) |
| Get text offset. | |
| int | GS_write_ppm (const char *) |
| Save current GL screen to ppm file. | |
| int | GS_write_tif (const char *) |
| Write data to tif file. | |
| void | gs_put_label (const char *, GLuint, int, unsigned long, int *) |
| Put label. | |
| void | gsd_remove_curr (void) |
| Remove current label. | |
| void | gsd_remove_all (void) |
| Remove all labels from display list. | |
| void | gsd_call_label (void) |
| Call display list and draw defined labels – called from gsd_prim (gsd_call_lists) | |
| void | gsd_box (float *, int, float *) |
| Draws a box at the specified center location. | |
| void | gsd_plus (float *, int, float) |
| Draws a plus sign symbol at the specified center location. | |
| void | gsd_line_onsurf (geosurf *, float *, float *) |
| Line on surface, fix z-values. | |
| int | gsd_nline_onsurf (geosurf *, float *, float *, float *, int) |
| Multiline on surface, fix z-values. | |
| void | gsd_x (geosurf *, float *, int, float) |
| Draws a X symbol at the specified center location. | |
| void | gsd_diamond (float *, unsigned long, float) |
| Draws a diamond symbol at the specified center location. | |
| void | gsd_diamond_lines (void) |
| Draw diamond lines. | |
| void | gsd_cube (float *, unsigned long, float) |
| Draws a cube symbol at the specified center location. | |
| void | gsd_draw_box (float *, unsigned long, float) |
| Draws a box symbol at the specified center location. | |
| void | gsd_drawsphere (float *, unsigned long, float) |
| Draws a sphere at the specified center location. | |
| void | gsd_draw_asterisk (float *, unsigned long, float) |
| Draws an asterisk symbol at the specified center location. | |
| void | gsd_draw_gyro (float *, unsigned long, float) |
| Draws a gyro symbol at the specified center location. | |
| void | gsd_3dcursor (float *) |
| Draw 3d cursor. | |
| void | dir_to_slope_aspect (float *, float *, float *, int) |
| Converts a direction vector to slope and aspect angles. | |
| int | gsd_north_arrow (float *, float, GLuint, unsigned long, unsigned long) |
| Draw North Arrow. | |
| int | gsd_arrow (float *, unsigned long, float, float *, float, geosurf *) |
| Draws an arrow. | |
| int | gsd_arrow_onsurf (float *, float *, unsigned long, int, geosurf *) |
| Draw north arrow on surface. | |
| void | gsd_3darrow (float *, unsigned long, float, float, float *, float) |
| Draw 3d north arrow. | |
| int | gsd_scalebar (float *, float, GLuint, unsigned long, unsigned long) |
| Draw Scalebar takes OpenGL coords and size. | |
| int | gsd_scalebar_v2 (float *, float, GLuint, unsigned long, unsigned long) |
| Draw Scalebar (as lines) | |
| void | primitive_cone (unsigned long) |
| Primitives only called after transforms. | |
| void | primitive_cylinder (unsigned long, int) |
| Primitives only called after transforms. | |
| void | gsd_flush (void) |
| Mostly for flushing drawing commands across a network. | |
| void | gsd_colormode (int) |
| Set color mode. | |
| void | show_colormode (void) |
| Print color mode to stderr. | |
| void | gsd_circ (float, float, float) |
| ADD. | |
| void | gsd_disc (float, float, float, float) |
| ADD. | |
| void | gsd_sphere (float *, float) |
| ADD. | |
| void | gsd_zwritemask (unsigned long) |
| Write out z-mask. | |
| void | gsd_backface (int) |
| ADD. | |
| void | gsd_linewidth (short) |
| Set width of rasterized lines. | |
| void | gsd_bgnqstrip (void) |
| ADD. | |
| void | gsd_endqstrip (void) |
| ADD. | |
| void | gsd_bgntmesh (void) |
| ADD. | |
| void | gsd_endtmesh (void) |
| ADD. | |
| void | gsd_bgntstrip (void) |
| ADD. | |
| void | gsd_endtstrip (void) |
| ADD. | |
| void | gsd_bgntfan (void) |
| ADD. | |
| void | gsd_endtfan (void) |
| ADD. | |
| void | gsd_swaptmesh (void) |
| ADD. | |
| void | gsd_bgnpolygon (void) |
| Delimit the vertices of a primitive or a group of like primitives. | |
| void | gsd_endpolygon (void) |
| Delimit the vertices of a primitive or a group of like primitives. | |
| void | gsd_bgnline (void) |
| Begin line. | |
| void | gsd_endline (void) |
| End line. | |
| void | gsd_shademodel (int) |
| Set shaded model. | |
| int | gsd_getshademodel (void) |
| Get shaded model. | |
| void | gsd_bothbuffers (void) |
| Draw to the front and back buffers. | |
| void | gsd_frontbuffer (void) |
| Draw to the front buffer. | |
| void | gsd_backbuffer (void) |
| Draw to the back buffer. | |
| void | gsd_swapbuffers (void) |
| Swap buffers. | |
| void | gsd_popmatrix (void) |
| Pop the current matrix stack. | |
| void | gsd_pushmatrix (void) |
| Push the current matrix stack. | |
| void | gsd_scale (float, float, float) |
| Multiply the current matrix by a general scaling matrix. | |
| void | gsd_translate (float, float, float) |
| Multiply the current matrix by a translation matrix. | |
| void | gsd_rot (float, char) |
| ADD. | |
| void | gsd_checkwindow (int *, int *, double *, double *) |
| int | gsd_checkpoint (float[4], int[4], int[4], double[16], double[16]) |
| ADD. | |
| void | gsd_litvert_func (float *, unsigned long, float *) |
| Set the current normal vector & specify vertex. | |
| void | gsd_litvert_func2 (float *, unsigned long, float *) |
| ADD. | |
| void | gsd_vert_func (float *) |
| ADD. | |
| void | gsd_color_func (unsigned int) |
| Set current color. | |
| void | gsd_init_lightmodel (void) |
| Initialize model light. | |
| void | gsd_set_material (int, int, float, float, int) |
| Set material. | |
| void | gsd_deflight (int, struct lightdefs *) |
| Define light. | |
| void | gsd_switchlight (int, int) |
| Switch light on/off. | |
| int | gsd_getimage (unsigned char **, unsigned int *, unsigned int *) |
| Get image of current GL screen. | |
| void | gsd_blend (int) |
| Specify pixel arithmetic. | |
| void | gsd_def_clipplane (int, double *) |
| Define clip plane. | |
| void | gsd_set_clipplane (int, int) |
| Set clip plane. | |
| void | gsd_finish (void) |
| Finish. | |
| void | gsd_viewport (int, int, int, int) |
| Set the viewport. | |
| int | gsd_makelist (void) |
| ADD. | |
| void | gsd_bgnlist (int, int) |
| ADD. | |
| void | gsd_endlist (void) |
| End list. | |
| void | gsd_calllist (int) |
| ADD. | |
| void | gsd_deletelist (GLuint, int) |
| Delete list. | |
| void | gsd_calllists (int) |
| ADD. | |
| void | gsd_getwindow (int *, int *, double *, double *) |
| Get viewport. | |
| int | gsd_writeView (unsigned char **, unsigned int, unsigned int) |
| Write view. | |
| int | gsd_surf (geosurf *) |
| ADD. | |
| int | gsd_surf_map (geosurf *) |
| Draw surface using triangle fan instead of strip. | |
| int | gsd_surf_const (geosurf *, float) |
| Using tmesh - not confident with qstrips portability. | |
| int | gsd_surf_func (geosurf *, int(*)(void)) |
| Define user function. | |
| int | gsd_triangulated_wall (int, int, geosurf *, geosurf *, Point3 *, Point3 *, float *) |
| ADD. | |
| void | gsd_setfc (int) |
| ADD. | |
| int | gsd_getfc (void) |
| ADD. | |
| int | gsd_ortho_wall (int, int, geosurf **, Point3 **, float *) |
| ADD. | |
| int | gsd_wall (float *, float *, float *) |
| ADD. | |
| int | gsd_norm_arrows (geosurf *) |
| ADD. | |
| int | gsd_get_los (float(*)[3], short, short) |
| ADD. | |
| void | gsd_set_view (geoview *, geodisplay *) |
| Set view. | |
| void | gsd_check_focus (geoview *) |
| Check focus. | |
| void | gsd_get_zup (geoview *, double *) |
| Get z-up vector (z-direction) | |
| int | gsd_zup_twist (geoview *) |
| ADD. | |
| void | gsd_do_scale (int) |
| Set current scale. | |
| void | gsd_real2model (Point3) |
| Convert real to model coordinates. | |
| void | gsd_model2real (Point3) |
| Convert model to real coordinates. | |
| void | gsd_model2surf (geosurf *, Point3) |
| Convert model to surface coordinates. | |
| void | gsd_surf2model (Point3) |
| Convert surface to model coordinates. | |
| void | gsd_surf2real (geosurf *, Point3) |
| Convert surface to real coordinates. | |
| void | gsd_real2surf (geosurf *, Point3) |
| Convert real to surface coordinates. | |
| int | gsd_wire_surf (geosurf *) |
| Draw surface wire. | |
| int | gsd_wire_surf_map (geosurf *) |
| ADD. | |
| int | gsd_coarse_surf_map (geosurf *) |
| Draw coarse surface. | |
| int | gsd_wire_surf_const (geosurf *, float) |
| ADD. | |
| int | gsd_wire_surf_func (geosurf *, int(*)(void)) |
| ADD. | |
| int | gsd_wire_arrows (geosurf *) |
| ADD. | |
| void | gsdiff_set_SDscale (float) |
| Set scale. | |
| float | gsdiff_get_SDscale (void) |
| Get scale. | |
| void | gsdiff_set_SDref (geosurf *) |
| ADD. | |
| geosurf * | gsdiff_get_SDref (void) |
| ADD. | |
| float | gsdiff_do_SD (float, int) |
| ADD. | |
| int | gsdrape_set_surface (geosurf *) |
| ADD. | |
| int | seg_intersect_vregion (geosurf *, float *, float *) |
| Check if segment intersect vector region. | |
| Point3 * | gsdrape_get_segments (geosurf *, float *, float *, int *) |
| ADD. | |
| Point3 * | gsdrape_get_allsegments (geosurf *, float *, float *, int *) |
| Get all segments. | |
| void | interp_first_last (geosurf *, float *, float *, Point3, Point3) |
| ADD. | |
| int | _viewcell_tri_interp (geosurf *, Point3) |
| ADD. | |
| int | viewcell_tri_interp (geosurf *, typbuff *, Point3, int) |
| ADD. | |
| int | in_vregion (geosurf *, float *) |
| ADD. | |
| int | order_intersects (geosurf *, Point3, Point3, int, int, int) |
| ADD. | |
| int | get_vert_intersects (geosurf *, float *, float *, float *) |
| ADD. | |
| int | get_horz_intersects (geosurf *, float *, float *, float *) |
| Get horizontal intersects. | |
| int | get_diag_intersects (geosurf *, float *, float *, float *) |
| Get diagonal intersects. | |
| int | segs_intersect (float, float, float, float, float, float, float, float, float *, float *) |
| Line intersect. | |
| int | Point_on_plane (Point3, Point3, Point3, Point3) |
| Check if point is on plane. | |
| int | XY_intersect_plane (float *, float *) |
| Check for intersection (point and plane) | |
| int | P3toPlane (Point3, Point3, Point3, float *) |
| Define plane. | |
| int | V3Cross (Point3, Point3, Point3) |
| Get cross product. | |
| int | gsds_findh (const char *, IFLAG *, IFLAG *, int) |
| int | gsds_newh (const char *) |
| Get handle to gsds. | |
| typbuff * | gsds_get_typbuff (int, IFLAG) |
| char * | gsds_get_name (int) |
| Get name. | |
| int | gsds_free_datah (int) |
| Free allocated dataset. | |
| int | gsds_free_data_buff (int, int) |
| Free allocated buffer. | |
| size_t | free_data_buffs (dataset *, int) |
| Free data buffer. | |
| size_t | gsds_alloc_typbuff (int, int *, int, int) |
| Allocates correct buffer according to type, keeps track of total mem. | |
| int | gsds_get_changed (int) |
| ADD. | |
| int | gsds_set_changed (int, IFLAG) |
| int | gsds_get_type (int) |
| ADD. | |
| int | get_mapatt (typbuff *, int, float *) |
| Get map attributes. | |
| geovect * | gv_get_vect (int) |
| Get vector set. | |
| geovect * | gv_get_prev_vect (int) |
| Get previous vector set. | |
| int | gv_num_vects (void) |
| Get number of loaded vector sets. | |
| geovect * | gv_get_last_vect (void) |
| Get last loaded vector set. | |
| geovect * | gv_get_new_vect (void) |
| Allocate memory for new vector set. | |
| void | gv_update_drapesurfs (void) |
| Update drape surfaces. | |
| int | gv_set_defaults (geovect *) |
| Set attributes of vector set to default values. | |
| int | gv_init_vect (geovect *) |
| Initialize geovect struct. | |
| void | gv_delete_vect (int) |
| Delete vector set (unload) | |
| int | gv_free_vect (geovect *) |
| Free allocated memory for geovect struct. | |
| void | gv_free_vectmem (geovect *) |
| Free allocated memory. | |
| void | gv_set_drapesurfs (geovect *, int *, int) |
| Set drape surfaces for vector set. | |
| float | gv_line_length (geoline *) |
| Get line width. | |
| int | gln_num_points (geoline *) |
| Get number of line vertices. | |
| int | gv_num_points (geovect *) |
| Get number of points in vector. | |
| int | gv_decimate_lines (geovect *) |
| Decimate line. | |
| int | gs_clip_segment (geosurf *, float *, float *, float *) |
| Clip segment. | |
| int | gvd_vect (geovect *, geosurf *, int) |
| Draw vector set. | |
| void | gvd_draw_lineonsurf (geosurf *, float *, float *, int) |
| Draw line on surface. | |
| geovol * | gvl_get_vol (int) |
| Get volume set structure. | |
| geovol * | gvl_get_prev_vol (int) |
| Get previous volume. | |
| int | gvl_getall_vols (geovol **) |
| Get all volumes. | |
| int | gvl_num_vols (void) |
| Get number of loaded volume sets. | |
| geovol * | gvl_get_last_vol (void) |
| Get last volume set from the list. | |
| geovol * | gvl_get_new_vol (void) |
| Allocate new volume set and add it to the list. | |
| int | gvl_init_vol (geovol *, double, double, double, int, int, int, double, double, double) |
| Initialize geovol structure. | |
| void | gvl_delete_vol (int) |
| Remove volume set from list. | |
| int | gvl_free_vol (geovol *) |
| Free geovol struct. | |
| void | gvl_free_volmem (geovol *) |
| Free geovol struct memory. | |
| void | print_vol_fields (geovol *) |
| Debug volume fields. | |
| int | gvl_get_xextents (geovol *, float *, float *) |
| Get volume x-extent value. | |
| int | gvl_get_yextents (geovol *, float *, float *) |
| Get volume y-extent value. | |
| int | gvl_get_zextents (geovol *, float *, float *) |
| Get volume z-extent value. | |
| int | gvl_get_xrange (float *, float *) |
| Get volume x-range value. | |
| int | gvl_get_yrange (float *, float *) |
| Get volume y-range value. | |
| int | gvl_get_zrange (float *, float *) |
| Get volume z-range value. | |
| int | gvl_isosurf_init (geovol_isosurf *) |
| Initialize geovol_isosurf struct. | |
| int | gvl_isosurf_freemem (geovol_isosurf *) |
| Free geovol_isosurf struct. | |
| geovol_isosurf * | gvl_isosurf_get_isosurf (int, int) |
| Get isosurface of given volume set. | |
| int | gvl_isosurf_get_att_src (geovol_isosurf *, int) |
| Get attribute source. | |
| int | gvl_isosurf_set_att_src (geovol_isosurf *, int, int) |
| Set attribute source. | |
| int | gvl_isosurf_set_att_const (geovol_isosurf *, int, float) |
| Set isosurface attribute constant. | |
| int | gvl_isosurf_set_att_map (geovol_isosurf *, int, const char *) |
| Set attribute map. | |
| int | gvl_isosurf_set_att_changed (geovol_isosurf *, int) |
| Set attribute changed. | |
| int | gvl_slice_init (geovol_slice *) |
| Initialize geovol_slice struct. | |
| geovol_slice * | gvl_slice_get_slice (int, int) |
| Get geovol_slice struct. | |
| int | gvl_slice_freemem (geovol_slice *) |
| Free geovol_slice struct. | |
| void | P_scale (float, float, float) |
| ADD. | |
| void | P_transform (int, float(*)[4], float(*)[4]) |
| Transform array of vectors using current T matrix. | |
| int | P_pushmatrix (void) |
| Push current transformation matrix onto matrix stack. | |
| int | P_popmatrix (void) |
| Pop top of matrix stack, placing it into the current transformation matrix. | |
| void | P_rot (float, char) |
| Rotate matrix. | |
| geovol_file * | gvl_file_get_volfile (int) |
| Get geovol_file structure for given handle. | |
| char * | gvl_file_get_name (int) |
| Get file name for given handle. | |
| int | gvl_file_get_file_type (geovol_file *) |
| Get file type for given handle. | |
| int | gvl_file_get_data_type (geovol_file *) |
| Get data type for given handle. | |
| int | gvl_file_newh (const char *, IFLAG) |
| int | gvl_file_free_datah (int) |
| Free geovol_file structure for given handle. | |
| int | gvl_file_start_read (geovol_file *) |
| Start read - allocate memory buffer a read first data into buffer. | |
| int | gvl_file_end_read (geovol_file *) |
| End read - free buffer memory. | |
| int | gvl_file_get_value (geovol_file *, int, int, int, void *) |
| Get value for volume file at x, y, z. | |
| int | gvl_file_is_null_value (geovol_file *, void *) |
| Check for null value. | |
| int | gvl_file_set_mode (geovol_file *, IFLAG) |
| int | gvl_file_set_slices_param (geovol_file *, int, int) |
| Set parameters for slice reading. | |
| void | gvl_file_get_min_max (geovol_file *, double *, double *) |
| Get minimum and maximum value in volume file. | |
| int | Gvl_load_colors_data (void **, const char *) |
| Load color table. | |
| int | Gvl_unload_colors_data (void *) |
| Unload color table. | |
| int | Gvl_get_color_for_value (void *, float *) |
| Get color for value. | |
| int | gvl_isosurf_calc (geovol *) |
| Fill data structure with computed isosurfaces polygons. | |
| int | gvl_slices_calc (geovol *) |
| Calculate slices for given volume set. | |
| void | gvl_write_char (int, unsigned char **, unsigned char) |
| ADD. | |
| unsigned char | gvl_read_char (int, const unsigned char *) |
| Read char. | |
| void | gvl_align_data (int, unsigned char **) |
| Append data to buffer. | |
| int | gvld_vol (geovol *) |
| Draw volume set (slices and isosurfaces) | |
| int | gvld_wire_vol (geovol *) |
| Draw volume in wire mode (bounding box) | |
| int | gvld_isosurf (geovol *) |
| Draw volume isosurfaces. | |
| int | gvld_wire_isosurf (geovol *) |
| Draw volume isosurface in draw mode. | |
| int | gvld_slices (geovol *) |
| Draw slices. | |
| int | gvld_slice (geovol *, int) |
| Draw slice. | |
| int | gvld_wire_slices (geovol *) |
| Draw wire slices. | |
| int | gvld_wind3_box (geovol *) |
| Draw volume bounding box. | |
| void | gsd_display_fringe (geosurf *, unsigned long, float, int[4]) |
| Display fridge. | |
| void | gsd_fringe_horiz_poly (float, geosurf *, int, int) |
| Draw fringe polygon in x direction. | |
| void | gsd_fringe_horiz_line (float, geosurf *, int, int) |
| Draw fringe outline in x direction. | |
| void | gsd_fringe_vert_poly (float, geosurf *, int, int) |
| Draw fringe outline in y direction. | |
| void | gsd_fringe_vert_line (float, geosurf *, int, int) |
| Draw fringe outline in y direction. | |
| GLuint | gsd_put_legend (const char *, GLuint, int, int *, float *, int *) |
| Put legend. | |
| void | gsd_bgn_legend_viewport (GLint, GLint, GLint, GLint) |
| ADD. | |
| void | gsd_end_legend_viewport (void) |
| ADD. | |
| int | gsd_make_nice_number (float *) |
| ADD. | |
ADD.
| gs | surface (geosurf) | |
| [in,out] | pt |
Definition at line 464 of file gsdrape.c.
References ATT_TOPO, gs_get_att_typbuff(), and viewcell_tri_interp().
Referenced by GS_draw_X().
Calculate normals.
Need either four neighbors or two non-linear neighbors passed initial state of neighbors known from array position and data row & col
| gs | surface (geosurf) |
| drow | data row |
| dcol | data col |
| neighbors | neighbors id |
Definition at line 206 of file gs_norms.c.
References BM_get(), DRC2OFF, GET_MAPATT, NBOT, NLFT, NRGT, NTOP, and SET_NORM.
Referenced by gs_calc_normals().
Correct twist value.
| k | keyframe list |
Definition at line 711 of file gk.c.
References key_node::fields, KF_TWIST, key_node::next, NULL, and t.
Referenced by gk_make_framesfromkeys(), and gk_make_linear_framesfromkeys().
Converts a direction vector to slope and aspect angles.
Given a 3D direction vector, this function computes the slope and aspect angles corresponding to the vector. The aspect is the compass direction (azimuth) of the projection of the vector onto the XY plane, and the slope is the angle between the vector and the vertical axis (Z).
| [in] | dir | Pointer to an array of 3 floats representing the direction vector [dx, dy, dz]. |
| [out] | slope | Pointer to a float where the computed slope angle will be stored (in radians or degrees). |
| [out] | aspect | Pointer to a float where the computed aspect angle will be stored (in radians or degrees). |
| [in] | degrees | If non-zero, the output angles are converted to degrees; otherwise, they are in radians. |
The function handles edge cases where the direction vector is vertical or horizontal. Aspect is set to 0 if the vector has no horizontal component. Slope is negative for upward-pointing vectors, positive for downward.
Definition at line 776 of file gsd_objs.c.
Referenced by gsd_3darrow(), and gsd_arrow().
Display label.
| fontbase | font-base |
| lab_pos | label position |
| txt | text string |
Definition at line 97 of file gsd_fonts.c.
Referenced by gs_put_label(), and gsd_put_legend().
Free data buffer.
| ds | pointer to dataset struct |
| typ | data type |
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::data_id, dataset::databuff, dataset::dims, typbuff::fb, free(), G_debug(), typbuff::ib, dataset::ndims, typbuff::nm, NULL, dataset::numbytes, and typbuff::sb.
Referenced by gsds_free_data_buff(), and gsds_free_datah().
Get diagonal intersects.
Colinear already eliminated
| gs | surface (geosurf) | |
| [in] | bgn | begin point |
| [in] | end | end point |
| dir | ? (unused) |
Definition at line 1073 of file gsdrape.c.
References ATT_TOPO, DCOL2X, DRC2OFF, DROW2Y, EPSILON, GET_MAPATT, ISNODE, LERP, segs_intersect(), VCOL2X, VCOLS, VROW2Y, VROWS, VXRES, VYRES, X, X2VCOL, Y, Y2VROW, and Z.
Get horizontal intersects.
| gs | surface (geosurf) | |
| [in] | bgn | begin point |
| [in] | end | end point |
| [in] | dir |
Definition at line 978 of file gsdrape.c.
References ATT_TOPO, DRC2OFF, EPSILON, GET_MAPATT, LERP, segs_intersect(), VCOLS, VROW2Y, VROWS, VXRES, X, X2VCOL, Y, Y2VROW, and Z.
| double get_key_neighbors | ( | int | , |
| double | , | ||
| double | , | ||
| int | , | ||
| Keylist ** | , | ||
| Keylist ** | , | ||
| Keylist ** | , | ||
| Keylist ** | , | ||
| Keylist ** | , | ||
| double * | , | ||
| double * | |||
| ) |
Get map attributes.
| buff | ||
| [in] | offset | |
| [out] | att |
Definition at line 31 of file gsget.c.
References BM_get(), typbuff::cb, typbuff::fb, typbuff::ib, typbuff::k, typbuff::nm, typbuff::sb, and typbuff::tfunc.
Get text descender.
yorig ??
Is this defined somewhere ?
Definition at line 71 of file gsd_fonts.c.
Get text offset.
xorig ??
Is this defined somewhere ?
Definition at line 85 of file gsd_fonts.c.
Referenced by gsd_put_legend().
ADD.
Colinear already eliminated
| gs | surface (geosurf) | |
| [in] | bgn | begin point |
| [in] | end | end point |
| [in] | dir | direction |
Definition at line 884 of file gsdrape.c.
References ATT_TOPO, DRC2OFF, EPSILON, GET_MAPATT, LERP, segs_intersect(), VCOL2X, VCOLS, VROWS, VYRES, X, X2VCOL, Y, Y2VROW, and Z.
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:
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.
| pos | position |
| fmask | |
| force_replace | |
| precis | precision value |
Definition at line 431 of file gk2.c.
References G_debug(), GK_update_frames(), GS_get_fov(), GS_get_from(), GS_get_twist(), GS_get_viewdir(), KF_DIRX, KF_DIRY, KF_DIRZ, KF_FOV, KF_FROMX, KF_FROMY, KF_FROMZ, KF_TWIST, malloc(), NULL, X, Y, and Z.
Deletes all keyframes, resets field masks.
Doesn't change number of frames requested.
Definition at line 312 of file gk2.c.
References free(), gk_free_key(), and NULL.
Copy keyframes.
| k | source keyframes |
Definition at line 45 of file gk.c.
References key_node::fieldmask, key_node::fields, G_malloc, KF_NUMFIELDS, key_node::look_ahead, NULL, and key_node::pos.
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.
| pos | position |
| precis | precision |
| justone | delete only one keyframe |
Definition at line 369 of file gk2.c.
References free(), GK_update_frames(), key_node::next, and key_node::pos.
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.
| step | step value |
| render |
Definition at line 487 of file gk2.c.
References gk_follow_frames().
Draw path.
| views | Viewnode struct |
| steps | step value |
| keys | keyframe list |
Definition at line 749 of file gk.c.
References CM_COLOR, view_node::fields, key_node::fields, GS_background_color(), GS_default_draw_color(), GS_get_from(), GS_get_longdim(), gsd_bgnline(), gsd_color_func(), gsd_colormode(), gsd_endline(), gsd_linewidth(), gsd_vert_func(), gsd_x(), gsd_zwritemask(), KF_FROMX, key_node::next, and NULL.
Referenced by gk_follow_frames(), GK_set_tension(), and GK_show_path().
| 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.
| view | pointer to Viewmode struct |
| numsteps | number of steps |
| keys | list of keyframes |
| step | step value |
| onestep | |
| render | |
| mode |
Definition at line 141 of file gk.c.
References view_node::fields, FM_LABEL, FM_PATH, FM_SITE, FM_VECT, FM_VOL, G_debug(), gk_draw_path(), gk_get_mask_sofar(), GP_alldraw_site(), GS_alldraw_cplane_fences(), GS_alldraw_surf(), GS_alldraw_wire(), GS_background_color(), GS_clear(), GS_done_draw(), GS_draw_all_list(), GS_get_from(), GS_get_viewdir(), GS_getlight_position(), GS_moveto(), GS_ready_draw(), GS_set_draw(), GS_set_fov(), GS_set_twist(), GS_set_viewdir(), GS_setlight_position(), GSD_BACK, GSD_FRONT, GV_alldraw_vect(), GVL_alldraw_vol(), KF_DIRX, KF_DIRX_MASK, KF_DIRY, KF_DIRY_MASK, KF_DIRZ, KF_DIRZ_MASK, KF_FOV, KF_FOV_MASK, KF_FROMX, KF_FROMX_MASK, KF_FROMY, KF_FROMY_MASK, KF_FROMZ, KF_FROMZ_MASK, KF_TWIST, KF_TWIST_MASK, X, x, Y, and Z.
Referenced by GK_do_framestep().
Free keyframe list.
| ok | pointer to Keylist struct |
Definition at line 271 of file gk.c.
References G_free(), and key_node::next.
Referenced by GK_clear_keys().
Get mask value.
Get begin & end pos, AND all masks in keys <= pos
Time must be between 0.0 & 1.0
| time | timestamp |
| keys | list of keyframes |
Definition at line 79 of file gk.c.
References key_node::fieldmask, key_node::next, and key_node::pos.
Referenced by gk_follow_frames().
Generate viewnode from keyframes.
Here we use a cardinal cubic spline
| keys | list of keyframes |
| keysteps | keyframe step |
| newsteps | new step value |
| loop | loop indicator |
| t |
Definition at line 301 of file gk.c.
References _, correct_twist(), view_node::fields, key_node::fields, G_free(), G_malloc, G_warning(), get_key_neighbors(), gk_viable_keys_for_mask(), KF_NUMFIELDS, lin_interp(), key_node::next, NULL, key_node::pos, t, and x.
Referenced by GK_update_frames().
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.
| keys | keyframe list |
| keysteps | step value |
| newsteps | new step value |
| loop | loop indicator |
Definition at line 611 of file gk.c.
References _, correct_twist(), view_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.
Referenced by GK_update_frames().
Move keyframe.
Precis works as in other functions - to identify keyframe to move. Only the first keyframe in the precis range will be moved.
| oldpos | old position |
| precis | precision value |
| newpos | new position |
Definition at line 338 of file gk2.c.
References GK_update_frames(), key_node::next, and key_node::pos.
Print keyframe info.
| name | filename |
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, name, key_node::next, NULL, and key_node::pos.
Set interpolation mode.
| mode | interpolation mode (KF_LINEAR or KF_SPLINE) |
Definition at line 140 of file gk2.c.
References KF_LEGAL_MODE.
Set the number of frames to be interpolated from keyframes.
| newsteps | number of frames |
Definition at line 299 of file gk2.c.
References GK_update_frames().
Set value for tension when interpmode is KF_SPLINE.
Definition at line 155 of file gk2.c.
References gk_draw_path(), GK_update_frames(), GS_alldraw_wire(), GS_background_color(), GS_clear(), GS_done_draw(), GS_ready_draw(), GS_set_draw(), and GSD_BACK.
Show list.
| flag |
Definition at line 609 of file gk2.c.
References FM_LABEL, and GS_draw_all_list().
Draw the current path.
| flag |
Definition at line 503 of file gk2.c.
References FM_PATH, gk_draw_path(), GS_done_draw(), GS_ready_draw(), GS_set_draw(), and GSD_FRONT.
Show point sets.
| flag |
Definition at line 555 of file gk2.c.
References FM_SITE, GP_alldraw_site(), GS_done_draw(), GS_ready_draw(), GS_set_draw(), and GSD_FRONT.
Show vector sets.
| flag |
Definition at line 529 of file gk2.c.
References FM_VECT, GS_done_draw(), GS_ready_draw(), GS_set_draw(), GSD_FRONT, and GV_alldraw_vect().
Show volumes.
| flag |
Definition at line 582 of file gk2.c.
References FM_VOL, GS_done_draw(), GS_ready_draw(), GS_set_draw(), GSD_FRONT, and GVL_alldraw_vol().
Recalculate path using the current number of frames requested.
Call after changing number of frames or when Keyframes change.
Definition at line 245 of file gk2.c.
References _, key_node::fields, free(), G_warning(), gk_make_framesfromkeys(), gk_make_linear_framesfromkeys(), KF_FROMX, KF_FROMY, KF_FROMZ, KF_LINEAR, NULL, and key_node::pos.
Referenced by GK_add_key(), GK_delete_key(), GK_move_key(), GK_set_numsteps(), GK_set_tension(), and GK_update_tension().
ADD.
| mask | mask value | |
| keys | list of keyframes | |
| [out] | keyret | output list of keyframes |
Definition at line 113 of file gk.c.
References key_node::fieldmask, and key_node::next.
Referenced by gk_make_framesfromkeys(), and gk_make_linear_framesfromkeys().
Get number of line vertices.
| gln | line (geoline) |
Definition at line 197 of file gv_quick.c.
Referenced by gv_decimate_lines(), and gv_num_points().
Draw all available point sets.
Definition at line 615 of file gp2.c.
References GP_draw_site().
Referenced by gk_follow_frames(), GK_show_site(), and Nviz_draw_quick().
Delete registered point set.
| id | point set id |
Definition at line 132 of file gp2.c.
References G_debug(), gp_delete_site(), and GP_site_exists().
Referenced by Nviz_new_map_obj().
Delete point set and remove from list.
| id | point set id |
Definition at line 238 of file gp.c.
References G_debug(), gp_free_site(), and gp_get_site().
Referenced by GP_delete_site().
Draw point set.
| id | point set id |
Definition at line 581 of file gp2.c.
References G_debug(), gp_get_site(), gpd_2dsite(), gpd_3dsite(), GS_get_region(), and gs_get_surf().
Referenced by GP_alldraw_site(), and Nviz_draw_all_site().
Free allocated geosite struct.
| fp | pointer to geosite struct |
Definition at line 261 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().
Free geosite (lower level)
| fp | pointer to geosite struct |
Definition at line 310 of file gp.c.
References g_vect_style_thematic::color_column, g_site::filename, G_free(), g_site::hstyle, g_site::n_sites, NULL, g_site::points, g_vect_style_thematic::size_column, g_site::style, g_vect_style_thematic::symbol_column, g_site::tstyle, and g_vect_style_thematic::width_column.
Referenced by gp_free_site(), and GP_load_site().
Get client data.
| id | point set id |
Definition at line 657 of file gp2.c.
References gp_get_site(), and NULL.
Get last point set.
Definition at line 95 of file gp.c.
References G_debug(), and NULL.
Referenced by gp_get_new_site().
Create new geosite instance and add it to list.
Definition at line 119 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, NULL, and g_site::style.
Referenced by GP_new_site().
Get geosite struct.
| id | point set id |
Definition at line 33 of file gp.c.
References G_debug(), and NULL.
Referenced by gp_delete_site(), GP_draw_site(), GP_Get_ClientData(), GP_get_sitename(), GP_get_style(), GP_get_trans(), GP_get_zmode(), GP_load_site(), GP_select_surf(), GP_Set_ClientData(), GP_set_style(), GP_set_style_thematic(), GP_set_trans(), GP_set_zmode(), GP_site_exists(), GP_surf_is_selected(), GP_unselect_surf(), GP_unset_style_thematic(), and Nviz_set_vpoint_attr_default().
Get list of point sets.
Must freed when no longer needed!
| numsites | number of point sets |
Definition at line 102 of file gp2.c.
References G_malloc, and NULL.
Referenced by Nviz_draw_all_site().
Get point set style.
| id | point set id |
| color | |
| width | |
| size | |
| symbol |
Definition at line 236 of file gp2.c.
References G_debug(), gp_get_site(), and NULL.
Get transformation params.
| id | point set id | |
| [out] | xtrans,ytrans,ztrans | x/y/z values |
Definition at line 461 of file gp2.c.
References G_debug(), and gp_get_site().
Load point set from file.
Check to see if handle already loaded, if so - free before loading new for now, always load to memory.
| id | point set id |
| filename | point set filename |
Definition at line 173 of file gp2.c.
References G_debug(), G_store(), gp_free_sitemem(), gp_get_site(), Gp_load_sites(), and NULL.
Referenced by Nviz_new_map_obj().
Load to points to memory.
The other alternative may be to load to a tmp file.
| name | name of vector map to be loaded | |
| [out] | nsites | number of loaded points |
| [out] | has_z | 2D or 3D points data loaded? |
Definition at line 45 of file gp3.c.
References _, Cell_head::east, G_debug(), G_fatal_error(), G_find_vector2(), G_free(), G_fully_qualified_name(), G_get_set_window(), G_malloc, G_message(), G_warning(), G_zero(), GV_POINTS, name, g_point::next, Cell_head::north, NULL, PORT_DOUBLE_MAX, Cell_head::south, Cell_head::top, Vect_close(), Vect_is_3d(), Vect_new_cats_struct(), Vect_new_line_struct(), Vect_open_old(), Vect_read_next_line(), Vect_reset_cats(), Vect_set_constraint_region(), Vect_set_open_level(), Cell_head::west, X, line_pnts::x, Y, line_pnts::y, Z, and line_pnts::z.
Referenced by GP_load_site().
Load styles for geopoints based on thematic mapping.
| gp | pointer to geosite structure |
| colors | pointer to Colors structure or NULL |
Definition at line 181 of file gp3.c.
References _, BLU_MASK, db_close_database_shutdown_driver(), db_get_value_int(), db_get_value_string(), db_select_value(), db_start_driver_open_database(), G_fatal_error(), G_find_vector2(), G_free(), G_fully_qualified_name(), G_malloc, G_message(), G_str_to_color(), G_warning(), G_zero(), GP_str_to_marker(), GRN_MASK, NULL, Rast_get_c_color(), RED_MASK, Vect_cat_get(), Vect_destroy_field_info(), Vect_get_field(), Vect_open_old(), and Vect_set_open_level().
Referenced by GP_set_style_thematic().
Create new point set.
Definition at line 64 of file gp2.c.
References G_debug(), gp_get_new_site(), gp_set_defaults(), g_site::gsite_id, and MAX_SITES.
Referenced by Nviz_new_map_obj().
Get number of loaded point sets.
Definition at line 87 of file gp2.c.
References gp_num_sites().
Referenced by Nviz_new_map_obj().
Get number of loaded point sets.
Definition at line 76 of file gp.c.
References G_debug().
Referenced by GP_num_sites().
Select surface for given point set.
| hp | point set id |
| hs | surface id |
Definition at line 488 of file gp2.c.
References G_debug(), gp_get_site(), GP_surf_is_selected(), and GS_surf_exists().
Referenced by Nviz_new_map_obj().
Set client data.
| id | point set id |
| clientd | client data |
Definition at line 635 of file gp2.c.
References gp_get_site().
Set default value for geosite struct.
| gp | pointer to geosite struct |
Definition at line 189 of file gp.c.
References G_debug(), GS_get_longdim(), NULL, and ST_X.
Referenced by GP_new_site().
Set point style.
Supported icon symbols (markers):
| id | point set id |
| color | icon color |
| width | icon line width |
| size | icon size |
| symbol | icon symbol |
Definition at line 278 of file gp2.c.
References G_debug(), gp_get_site(), and NULL.
Referenced by Nviz_new_map_obj().
| 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.
| id | point set id |
| layer | layer number for thematic mapping (-1 for undefined) |
| color | icon color column name |
| width | icon line width column name |
| size | icon size column name |
| symbol | icon symbol column name |
| color_rules | pointer to Colors structure or NULL |
Definition at line 313 of file gp2.c.
References G_debug(), G_malloc, G_store(), G_zero(), gp_get_site(), Gp_load_sites_thematic(), and NULL.
Set transformation params.
| id | point set id |
| xtrans,ytrans,ztrans | x/y/z values |
Definition at line 438 of file gp2.c.
References G_debug(), and gp_get_site().
Set z mode for point set.
| id | point set id |
| use_z | TRUE to use z-coordinaces when vector map is 3D |
Definition at line 384 of file gp2.c.
References G_debug(), gp_get_site(), and NULL.
Check if point set exists.
| id | point set id |
Definition at line 37 of file gp2.c.
References G_debug(), gp_get_site(), and NULL.
Referenced by GP_delete_site().
Determine point marker symbol for string.
Supported markers:
| str | string buffer |
Definition at line 688 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.
Referenced by Gp_load_sites_thematic().
Check if surface is selected.
| hp | point set id |
| hs | surface id |
Definition at line 556 of file gp2.c.
References G_debug(), and gp_get_site().
Referenced by GP_select_surf(), and GP_unselect_surf().
Unselect surface.
| hp | point set id |
| hs | surface id |
Definition at line 518 of file gp2.c.
References G_debug(), gp_get_site(), and GP_surf_is_selected().
Make style for thematic mapping inactive.
| id | point set id |
Definition at line 356 of file gp2.c.
References G_debug(), gp_get_site(), and NULL.
Update drape surfaces.
Call after surface is deleted
Definition at line 157 of file gp.c.
References gs_get_surf(), and NULL.
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
| gp | site (geosite) |
| gs | surface (geosurf) |
| do_fast | (unused) |
Definition at line 215 of file gpd.c.
References ATT_TOPO, CHK_FREQ, CONST_ATT, gpd_obj(), GS_check_cancel(), gs_get_att_src(), gs_get_att_typbuff(), gs_point_in_region(), gs_point_is_masked(), gs_update_curmask(), gsd_checkpoint(), gsd_do_scale(), gsd_getwindow(), gsd_linewidth(), gsd_popmatrix(), gsd_pushmatrix(), gsd_translate(), MAP_ATT, NULL, viewcell_tri_interp(), X, Y, and Z.
Referenced by GP_draw_site().
Draw 3D point set.
| gp | site (geosite) |
| xo,yo | |
| do_fast | (unused) |
Definition at line 312 of file gpd.c.
References CHK_FREQ, gpd_obj(), GS_check_cancel(), GS_global_exag(), gsd_checkpoint(), gsd_do_scale(), gsd_getwindow(), gsd_linewidth(), gsd_popmatrix(), gsd_pushmatrix(), NULL, X, Y, and Z.
Referenced by GP_draw_site().
Draw point representing object.
Do normal transforms before calling
Note gs: NULL if 3d obj or const elev surface
| gs | surface (geosurf) |
| style | object displaying style (highlighted or not) |
| pt | 3d point (Point3) |
Definition at line 70 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 gpd_2dsite(), gpd_3dsite(), and GS_draw_X().
Draw all cplace fences ?
Definition at line 3194 of file gs2.c.
References GS_draw_cplane_fence(), gsd_get_cplanes_state(), and MAX_CPLANES.
Referenced by gk_follow_frames().
Draw all surfaces.
Definition at line 1937 of file gs2.c.
References GS_draw_surf().
Referenced by gk_follow_frames().
Draw all wires.
Overrides draw_mode for fast display
Definition at line 1920 of file gs2.c.
References gs_get_surf(), and gsd_wire_surf().
Referenced by gk_follow_frames(), GK_set_tension(), Gs_load_3dview(), Nviz_draw_quick(), and Nviz_resize_window().
Referenced by GS_transp_is_set().
Get background color.
Definition at line 2452 of file gs2.c.
Referenced by gk_draw_path(), gk_follow_frames(), and GK_set_tension().
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
| filename | raster map name | |
| [out] | buff | data buffer |
Definition at line 576 of file gs3.c.
References _, b, g, G_debug(), G_find_raster2(), G_warning(), G_zero(), max, min, NO_DATA_COL, r, Rast_get_c_color_range(), Rast_lookup_c_colors(), and Rast_read_colors().
Referenced by GS_load_att_map().
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.
Uses the previous and next cells (when available) for normal calculations to produce smoother normals
| gs | surface (geosurf) |
Definition at line 124 of file gs_norms.c.
References calc_norm(), G_debug(), gs_update_curmask(), init_vars(), NALL, NBL, NBOT, NBR, NLFT, NRGT, NTL, NTOP, NTR, VCOLS, and VROWS.
Referenced by GS_get_norm_at_xy(), GS_update_normals(), gsd_coarse_surf_map(), and gsd_surf().
Check for cancel.
Definition at line 30 of file gsx.c.
References Cxl_func.
Referenced by gpd_2dsite(), gpd_3dsite(), gsd_norm_arrows(), gsd_ortho_wall(), gsd_surf_const(), gsd_surf_map(), gsd_surf_map_old(), gvd_vect(), and gvld_isosurf().
Clear view.
| col | color value |
Definition at line 3417 of file gs2.c.
References G_debug(), and gsd_flush().
Referenced by gk_follow_frames(), GK_set_tension(), Nviz_draw_all(), and Nviz_draw_quick().
ADD.
Initialize by calling with a number nhist to represent number of previous entries to check, then call with zero as nhist
| [in] | p1 | first point |
| [in] | p2 | second point |
| [in] | nhist | ? |
Definition at line 440 of file gs_util.c.
References G_free(), G_malloc, and NULL.
Referenced by GS_draw_flowline_at_xy().
Get default draw color.
Definition at line 2439 of file gs2.c.
References G_debug().
Referenced by gk_draw_path(), GS_draw_line_onsurf(), GS_draw_nline_onsurf(), and gsd_draw_cplane().
Delete pre-defined list.
| list_id | list id |
Definition at line 886 of file gs2.c.
References gsd_deletelist().
Remove geosurf struct from list.
| id | surface id |
Definition at line 463 of file gs.c.
References G_debug(), gs_free_surf(), and gs_get_surf().
Referenced by GS_delete_surface().
Delete surface.
| id | surface id |
Definition at line 1559 of file gs2.c.
References FALSE, G_debug(), gs_delete_surf(), GS_surf_exists(), gv_update_drapesurfs(), and TRUE.
Calculates distance in METERS between two points in current projection (2D)
Uses G_distance().
| [in] | from | 'from' point (X, Y) |
| [in] | to | 'to' point (X, Y) |
Definition at line 79 of file gs3.c.
References G_begin_distance_calculations(), and G_distance().
Referenced by GS_geodistance().
Calculate distance.
| [in] | from | 'from' point (X,Y,Z) |
| [in] | to | 'to' point (X,Y,Z) |
Definition at line 141 of file gs_util.c.
Referenced by gs_distance_onsurf(), GS_get_selected_point_on_surface(), GS_look_here(), gs_los_intersect1(), gs_setlos_enterdata(), gsd_zup_twist(), gv_line_length(), and Nviz_set_cplane_here().
Calculate distance on surface.
| gs | pointer to geosurf struct | |
| p1 | from point | |
| p2 | to point | |
| [out] | dist | distance |
| use_exag | use exag for calculation |
Definition at line 1414 of file gs.c.
References GS_distance(), GS_global_exag(), gsdrape_get_segments(), in_vregion(), NULL, and Z.
Referenced by GS_get_distance_alongsurf().
Draw done, swap buffers.
Definition at line 2501 of file gs2.c.
References G_debug(), GSD_BACK, gsd_flush(), and gsd_swapbuffers().
Referenced by gk_follow_frames(), GK_set_tension(), GK_show_path(), GK_show_site(), GK_show_vect(), GK_show_vol(), gsd_end_legend_viewport(), 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(), gsd_scalebar_v2(), Nviz_draw_all(), Nviz_draw_all_site(), Nviz_draw_all_vect(), Nviz_draw_all_vol(), Nviz_draw_image(), Nviz_draw_model(), Nviz_draw_quick(), and Nviz_resize_window().
Draw all glLists.
Uses glFlush() to ensure all drawing is complete before returning
Definition at line 874 of file gs2.c.
References gsd_calllists().
Referenced by gk_follow_frames(), and GK_show_list().
Draw cplace.
| num | cplace id |
Definition at line 3147 of file gs2.c.
References gs_getall_surfaces(), gs_num_surfaces(), gsd_draw_cplane(), gsd_draw_cplane_fence(), and MAX_SURFS.
Draw cplace fence ?
| hs1,hs2 | |
| num | cplane id |
Definition at line 3174 of file gs2.c.
References gs_get_surf(), gsd_draw_cplane_fence(), and NULL.
Referenced by GS_alldraw_cplane_fences(), and Nviz_draw_all_surf().
Draw flow-line on surace.
This is slow - should be moved to gs_ but GS_ good for testing and useful for app programmer
| id | surface id |
| x,y | coordinates of flow-line |
Definition at line 753 of file gs2.c.
References G_debug(), GS_coordpair_repeats(), GS_draw_nline_onsurf(), GS_get_norm_at_xy(), gs_get_surf(), GS_v2norm(), VXRES, VYRES, X, x, Y, and Z.
Draw fringe around data (surface) at selected corners.
| id | surface id |
| clr | color |
| elev | elevation value |
| where | nw/ne/sw/se edges - 0 (turn off) 1 (turn on) |
Definition at line 820 of file gs2.c.
References G_debug(), gs_get_surf(), and gsd_display_fringe().
Referenced by Nviz_draw_all(), and Nviz_draw_fringe().
| int GS_draw_legend | ( | const char * | name, |
| GLuint | fontbase, | ||
| int | size, | ||
| int * | flags, | ||
| float * | range, | ||
| int * | pt | ||
| ) |
Draw legend.
| name | legend name |
| fontbase | font-base |
| size | ? |
| flags | legend flags |
| range | values range |
| pt | ? |
Definition at line 843 of file gs2.c.
References gsd_put_legend(), and name.
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 936 of file gs2.c.
References CM_DIFFUSE, DM_GOURAUD, GS_get_modelposition(), GS_v3eq(), gsd_backface(), gsd_colormode(), gsd_cplane_off(), gsd_cplane_on(), gsd_drawsphere(), gsd_flush(), gsd_get_cplanes_state(), gsd_popmatrix(), gsd_pushmatrix(), gsd_shademodel(), gsd_zwritemask(), and MAX_CPLANES.
Referenced by Nviz_draw_model().
Draw lighting model.
Definition at line 896 of file gs2.c.
References CM_AD, DM_GOURAUD, GS_get_modelposition1(), GS_v3eq(), gsd_backface(), gsd_colormode(), gsd_do_scale(), gsd_drawsphere(), gsd_popmatrix(), gsd_pushmatrix(), gsd_scale(), gsd_shademodel(), gsd_zwritemask(), and Z.
Draw line on surface.
| id | surface id |
| x1,y1,x2,y2 | line nodes |
Definition at line 675 of file gs2.c.
References GS_default_draw_color(), gs_get_surf(), gsd_color_func(), gsd_do_scale(), gsd_flush(), gsd_line_onsurf(), gsd_linewidth(), gsd_popmatrix(), gsd_pushmatrix(), gsd_translate(), X, and Y.
Draw multiline on surface.
Like above but limits points in line to n or points found in segment, whichever is smaller.
| id | surface id |
| x1,y1,x2,y2 | line nodes |
| lasp | |
| n |
Definition at line 715 of file gs2.c.
References GS_default_draw_color(), gs_get_surf(), gsd_color_func(), gsd_do_scale(), gsd_flush(), gsd_linewidth(), gsd_nline_onsurf(), gsd_popmatrix(), gsd_pushmatrix(), gsd_surf2real(), gsd_translate(), X, and Y.
Referenced by GS_draw_flowline_at_xy().
Draw surface.
| id | surface id |
Definition at line 1865 of file gs2.c.
References DM_GOURAUD, DM_POLY, DM_WIRE, DM_WIRE_POLY, G_debug(), gs_get_surf(), gsd_shademodel(), gsd_surf(), and gsd_wire_surf().
Referenced by GS_alldraw_surf(), and Nviz_draw_all_surf().
Draw surface wire.
Overrides draw_mode for fast display
| id | surface id |
Definition at line 1900 of file gs2.c.
References G_debug(), gs_get_surf(), and gsd_wire_surf().
Draw place marker.
Used to display query point for raster queries.
| id | surface id |
| pt | point, X, Y value in true world coordinates |
Definition at line 634 of file gs2.c.
References _viewcell_tri_interp(), ATT_TOPO, g_vect_style::color, CONST_ATT, gpd_obj(), gs_get_att_src(), GS_get_longdim(), gs_get_surf(), gsd_do_scale(), gsd_flush(), gsd_linewidth(), gsd_popmatrix(), gsd_pushmatrix(), gsd_translate(), NULL, g_vect_style::size, ST_GYRO, g_vect_style::symbol, X, Y, and Z.
Free geosurf struct.
| fs | pointer to geosurf struct |
Definition at line 487 of file gs.c.
References G_debug(), G_free(), gs_free_unshared_buffs(), and NULL.
Referenced by gs_delete_surf().
Free unshared buffers of geosurf struct.
fs has already been taken out of the list
This function is fairly revealing about how shared datasets work
| fs | pointer to geosurf struct |
Definition at line 557 of file gs.c.
References G_debug(), gsds_free_datah(), and MAX_ATTS.
Referenced by gs_free_surf().
Calculate distance between 2 coordinates.
Units is one of:
Default is meters.
| [in] | from | starting point (X,Y) |
| [in] | to | ending point (X,Y) |
| [in] | units | map units |
Definition at line 55 of file gs_util.c.
References Gs_distance().
Get aspect value.
Definition at line 3450 of file gs2.c.
References Cell_head::bottom, G_debug(), and Cell_head::top.
Referenced by GS_init_view(), and gsd_set_view().
Get attributes.
| id | surface id | |
| att | ||
| [out] | set | |
| [out] | constant | |
| [out] | mapname |
Definition at line 1134 of file gs2.c.
References CONST_ATT, gs_get_att_src(), gs_get_surf(), gsds_get_name(), MAP_ATT, and strcpy.
Get attribute source.
| gs | pointer to geosurf struct |
| desc | attribute id (descriptor) |
Definition at line 656 of file gs.c.
References G_debug(), and LEGAL_ATT.
Referenced by gpd_2dsite(), GS_draw_X(), GS_get_att(), GS_get_cat_at_xy(), GS_get_exag_guess(), GS_get_val_at_xy(), gs_set_att_src(), Gs_update_attrange(), gsd_surf(), gsd_wire_surf(), gsdrape_get_allsegments(), gsdrape_get_segments(), gvd_vect(), and viewcell_tri_interp().
Get attribute data buffer.
| gs | pointer to geosurf struct |
| desc | attribute id (descriptor) |
| to_write | non-zero value for 'write' |
Definition at line 681 of file gs.c.
References ATT_TOPO, G_debug(), gsdiff_do_SD(), gsdiff_get_SDref(), gsds_get_typbuff(), and NULL.
Referenced by _viewcell_tri_interp(), gpd_2dsite(), GS_get_cat_at_xy(), GS_get_val_at_xy(), GS_load_att_map(), gs_los_intersect(), gs_los_intersect1(), gs_update_curmask(), gsd_coarse_surf_map(), gsd_fringe_horiz_line(), gsd_fringe_horiz_line2(), gsd_fringe_horiz_poly(), gsd_fringe_vert_line(), gsd_fringe_vert_poly(), gsd_norm_arrows(), gsd_ortho_wall(), gsd_surf_const(), gsd_surf_map(), gsd_surf_map_old(), gsd_triangulated_wall(), gsd_wire_arrows(), gsd_wire_surf_const(), gsd_wire_surf_map(), gsdiff_set_SDref(), gsdrape_set_surface(), and init_vars().
Get attribute type.
| gs | pointer to geosurf struct |
| desc | attribute id |
Definition at line 630 of file gs.c.
References G_debug(), LEGAL_ATT, and NOTSET_ATT.
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
| id | surface id |
| att | attribute id (MAP_ATT) |
| catstr | cat string (must be allocated, dim?) |
| x,y | real coordinates |
Definition at line 1177 of file gs2.c.
References _, 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(), in_vregion(), MAP_ATT, NULL, VCOL2DCOL, VROW2DROW, X, x, X2VCOL, Y, and Y2VROW.
Get categories/labels.
Formats label as in d.what.rast -> (catval) catlabel
| filename | raster map name |
| drow | |
| dcol | |
| catstr | category string |
Definition at line 776 of file gs3.c.
References _, CELL_TYPE, G_find_raster2(), G_free(), G_warning(), NULL, Rast_allocate_c_buf(), Rast_allocate_d_buf(), Rast_close(), Rast_free_cats(), Rast_get_c_cat(), Rast_get_c_row(), Rast_get_d_cat(), Rast_get_d_row(), Rast_get_map_type(), Rast_is_c_null_value, Rast_is_d_null_value, Rast_open_old(), Rast_read_cats(), and strcpy.
Referenced by GS_get_cat_at_xy().
Get client data.
| id | surface id |
Definition at line 1500 of file gs2.c.
References gs_get_surf(), and NULL.
Get average z-max value.
Useful for setting position of cplane, lighting ball, etc.
| [out] | azmax | average z-max value |
Definition at line 1201 of file gs.c.
Referenced by GS_get_modelposition1().
Get data bounds for plane.
| [out] | planes |
Definition at line 469 of file gs_query.c.
References b, DOT3, gs_get_xrange(), gs_get_yrange(), GS_get_zrange(), t, W, X, Y, and Z.
Referenced by gs_setlos_enterdata().
Get data center point.
| [out] | cen | center (array X,Y,Z) |
Definition at line 1230 of file gs.c.
Referenced by GS_get_modelposition1(), and gsd_set_view().
Get dimension of surface.
| id | surface id | |
| [out] | rows,cols | number of rows/cols |
Definition at line 2280 of file gs2.c.
References Cell_head::cols, gs_get_surf(), and Cell_head::rows.
Referenced by Nviz_set_attr().
| 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.
| hs | surface id | |
| x1,y1,x2,y2 | two points on surface | |
| [out] | dist | measured distance |
| use_exag | use exag. surface |
Definition at line 3284 of file gs2.c.
References G_debug(), gs_distance_onsurf(), gs_get_surf(), gsd_real2surf(), NULL, X, and Y.
Get draw mode.
| id | surface id | |
| [out] | mode | mode id |
Definition at line 2110 of file gs2.c.
References gs_get_surf().
Get draw resolution of surface.
| id | surface id | |
| [out] | xres,yres | x/y resolution value |
| [out] | xwire,ywire | x/y wire value |
Definition at line 2256 of file gs2.c.
References G_debug(), and gs_get_surf().
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
| id | surface id | |
| [out] | exag | exag value |
Definition at line 2307 of file gs2.c.
References ATT_TOPO, CONST_ATT, G_debug(), gs_get_att_src(), and gs_get_surf().
Referenced by Nviz_get_exag(), and Nviz_get_exag_height().
Get focus.
OK to call with NULL argument if just want to check state
| realto | real coordinates to |
Definition at line 2562 of file gs2.c.
References G_debug(), and GS_v3eq().
Referenced by GS_get_to_real(), Nviz_get_focus(), and Nviz_has_focus().
Get field of view.
Definition at line 2853 of file gs2.c.
Referenced by GK_add_key().
Get viewpoint 'from' position.
| [out] | fr | from model coordinates |
Definition at line 2724 of file gs2.c.
References FROM, G_debug(), and GS_v3eq().
Referenced by GK_add_key(), gk_draw_path(), gk_follow_frames(), Nviz_flythrough(), Nviz_get_viewpoint_position(), and Nviz_set_viewpoint_position().
Get viewpoint 'from' real coordinates.
| [out] | fr | 'from' real coordinates |
Definition at line 2738 of file gs2.c.
References FROM, GS_v3eq(), and gsd_model2real().
Referenced by Nviz_get_viewpoint_height(), and Nviz_set_viewpoint_height().
Get last allocated geosurf struct from list.
Definition at line 173 of file gs.c.
References G_debug(), and NULL.
Referenced by gs_get_new_surface().
Definition at line 257 of file gs2.c.
Referenced by GS_new_light().
Get largest dimension.
| [out] | dim | dimension |
Definition at line 140 of file gs2.c.
References G_debug().
Referenced by gk_draw_path(), gp_set_defaults(), GS_draw_X(), gsd_draw_cplane(), Nviz_get_exag_height(), Nviz_get_longdim(), and Nviz_update_ranges().
Get mask mode.
| id | surface id | |
| [out] | mode | id |
Definition at line 1454 of file gs2.c.
References ATT_MASK, and gs_get_surf().
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.
| [out] | size | size |
| [out] | pos | coordinates (X, Y, Z) |
Definition at line 528 of file gs2.c.
References FROM, GS_v3dir(), TO, X, Y, and Z.
Referenced by GS_draw_lighting_model().
Allocate new geosurf struct.
Definition at line 194 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.
Referenced by GS_new_surface().
Get surface normal at x,y (real coordinates)
Usually call after GS_get_selected_point_on_surface()
| id | surface id | |
| x,y | real coordinates | |
| [out] | nv | surface normal |
Definition at line 1239 of file gs2.c.
References DRC2OFF, FNORM, gs_calc_normals(), gs_get_surf(), gs_point_is_masked(), gsd_real2surf(), in_vregion(), NULL, VCOL2DCOL, VROW2DROW, X, x, X2VCOL, Y, and Y2VROW.
Referenced by GS_draw_flowline_at_xy().
Get 2D region extent.
| [out] | n,s,w,e | extent values |
Definition at line 156 of file gs2.c.
Referenced by GP_draw_site(), gsd_model2real(), gsd_real2model(), and Nviz_set_cplane_here().
Get axis scale.
| sx,sy,sz | x/y/z scale values |
| doexag | use vertical exaggeration |
Definition at line 3239 of file gs2.c.
Referenced by gsd_coarse_surf_map(), gsd_def_cplane(), gsd_do_scale(), gsd_model2real(), gsd_model2surf(), gsd_norm_arrows(), gsd_real2model(), gsd_surf2model(), gsd_surf_const(), gsd_surf_map(), gsd_surf_map_old(), gsd_wire_arrows(), gvd_vect(), gvld_isosurf(), gvld_slices(), and init_vars().
Get ?
| [out] | scale | value |
Definition at line 1099 of file gs2.c.
References gsdiff_get_SDscale().
Get ?
| [out] | id | ? |
Definition at line 1079 of file gs2.c.
References gsdiff_get_SDref().
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.
| sx,sy | screen coordinates | |
| [out] | id | surface id |
| [out] | x,y,z | point on surface (model coordinates?) |
Definition at line 3054 of file gs2.c.
References FROM, G_debug(), GS_distance(), gs_get_surf(), gs_los_intersect(), gs_los_intersect1(), gs_point_is_masked(), gs_setlos_enterdata(), GS_v3eq(), gsd_get_los(), gsd_surf2real(), MAX_SURFS, X, x, Y, and Z.
Referenced by GS_look_here(), GS_set_Narrow(), and Nviz_set_cplane_here().
Get geosurf struct.
| id | surface id |
Definition at line 63 of file gs.c.
References G_debug(), and NULL.
Referenced by GP_draw_site(), gp_update_drapesurfs(), GS_alldraw_wire(), gs_delete_surf(), GS_draw_cplane_fence(), GS_draw_flowline_at_xy(), GS_draw_fringe(), GS_draw_line_onsurf(), GS_draw_nline_onsurf(), GS_draw_surf(), GS_draw_wire(), GS_draw_X(), GS_get_att(), GS_get_cat_at_xy(), GS_Get_ClientData(), GS_get_dims(), GS_get_distance_alongsurf(), GS_get_drawmode(), GS_get_drawres(), GS_get_exag_guess(), GS_get_maskmode(), GS_get_norm_at_xy(), GS_get_nozero(), GS_get_selected_point_on_surface(), GS_get_trans(), GS_get_val_at_xy(), GS_get_wire_color(), GS_get_zextents(), GS_get_zrange_nz(), GS_is_masked(), GS_load_3dview(), GS_load_att_map(), GS_look_here(), gs_los_intersect(), gs_los_intersect1(), GS_save_3dview(), GS_set_att_const(), GS_Set_ClientData(), GS_set_drawmode(), GS_set_drawres(), GS_set_exag(), GS_set_focus_center_map(), GS_set_maskmode(), GS_set_Narrow(), GS_set_nozero(), GS_set_SDsurf(), GS_set_trans(), GS_set_wire_color(), GS_surf_exists(), GS_unset_att(), GS_update_curmask(), GS_update_normals(), GV_draw_fastvect(), GV_draw_vect(), gv_update_drapesurfs(), and Nviz_set_cplane_here().
Get surface list.
Must be freed when not needed!
| [out] | numsurfs | number of available surfaces |
Definition at line 1532 of file gs2.c.
References G_malloc, and NULL.
Referenced by Nviz_draw_all_surf(), Nviz_get_exag(), Nviz_get_exag_height(), Nviz_new_fringe(), Nviz_new_map_obj(), Nviz_set_arrow(), Nviz_set_focus_map(), Nviz_set_fringe(), and Nviz_set_scalebar().
Get 'to' real coordinates.
| [out] | to | 'to' real coordinates |
Definition at line 2751 of file gs2.c.
References G_get_set_window(), GS_get_focus(), X, Y, and Z.
Get translation values (surface position)
| id | surface id | |
| [out] | xtrans,ytrans,ztrans | trans values |
Definition at line 2416 of file gs2.c.
References G_debug(), and gs_get_surf().
Get twist value.
10ths of degrees off twelve o'clock
Definition at line 2863 of file gs2.c.
Referenced by GK_add_key().
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
| id | surface id | |
| att | attribute id | |
| [out] | valstr | value string (allocated, dim?) |
| x,y | real coordinates |
Definition at line 1303 of file gs2.c.
References ATT_COLOR, b, CONST_ATT, 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.
Get viewdir.
| [out] | dir | viewdir value |
Definition at line 2807 of file gs2.c.
References FROM, GS_v3dir(), and TO.
Referenced by GK_add_key(), gk_follow_frames(), and Nviz_flythrough().
Get wire color.
| id | surface id | |
| [out] | colr | color value |
Definition at line 2039 of file gs2.c.
References gs_get_surf().
Get x-extent values.
| gs | pointer to geosurf struct | |
| [out] | min | x-min value |
| [out] | max | x-max value |
Definition at line 1015 of file gs.c.
Referenced by gs_get_xrange().
Get x-range.
| [out] | min | x-min value |
| [out] | max | x-max value |
Definition at line 1124 of file gs.c.
References gs_get_xextents(), max, and min.
Referenced by gs_get_databounds_planes().
Get y-extent values.
| gs | pointer to geosurf struct | |
| [out] | min | y-min value |
| [out] | max | y-max value |
Definition at line 1032 of file gs.c.
Referenced by gs_get_yrange().
Get y-range.
| [out] | min | y-min value |
| [out] | max | y-max value |
Definition at line 1162 of file gs.c.
References gs_get_yextents(), max, and min.
Referenced by gs_get_databounds_planes().
Get z-extent values.
| gs | pointer to geosurf struct | |
| [out] | min | z-min value |
| [out] | max | z-max value |
| [out] | mid | z-middle value |
Definition at line 997 of file gs.c.
Referenced by GS_get_zextents(), and gs_get_zrange().
Get z-extent for a single surface.
| id | surface id | |
| [out] | min | min z-value |
| [out] | max | max z-value |
| [out] | mid | middle z-value |
Definition at line 2665 of file gs2.c.
References G_debug(), gs_get_surf(), gs_get_zextents(), max, min, and NULL.
Get z-range.
| [out] | min | z-min value |
| [out] | max | z-max value |
Definition at line 1086 of file gs.c.
References gs_get_zextents(), max, and min.
Referenced by GS_get_zrange(), and gvd_vect().
Get z-extent for all loaded surfaces.
| [out] | min | min z-value |
| [out] | max | max z-value |
| doexag | use z-exaggeration |
Definition at line 2688 of file gs2.c.
References G_debug(), gs_get_zrange(), gvl_get_zrange(), max, and min.
Referenced by gs_get_databounds_planes(), Gs_save_3dview(), gsd_check_focus(), gsd_def_cplane(), gsd_do_scale(), gsd_model2real(), gsd_model2surf(), gsd_real2model(), and gsd_surf2model().
Get Z extents for all loaded surfaces.
Treating zeros as "no data"
| [out] | min | min value |
| [out] | max | max value |
Definition at line 2358 of file gs2.c.
References G_debug(), gs_get_surf(), max, and min.
Referenced by Nviz_get_exag_height(), Nviz_get_zrange(), and Nviz_update_ranges().
Get array of geosurf structs.
| gsurfs | pointer to array |
Definition at line 109 of file gs.c.
References G_debug().
Referenced by GS_draw_cplane(), and gsd_wall().
Get global z-exag value.
Definition at line 2000 of file gs2.c.
References G_debug().
Referenced by gpd_3dsite(), gpd_obj(), gs_distance_onsurf(), gsd_coarse_surf_map(), gsd_draw_cplane(), gsd_norm_arrows(), gsd_surf_map(), gsd_surf_map_old(), gsd_wire_arrows(), init_vars(), Nviz_change_exag(), and Nviz_update_ranges().
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 48 of file gs.c.
References NULL.
Referenced by GS_libinit().
Init geosurf normbuff.
| gs | pointer to geosurf struct |
Definition at line 308 of file gs.c.
References G_free(), and G_malloc.
Referenced by GS_load_att_map().
Reset scene rotation.
Definition at line 2907 of file gs2.c.
Referenced by GS_init_view(), and Nviz_init_rotation().
| int gs_init_surf | ( | geosurf * | gs, |
| double | ox, | ||
| double | oy, | ||
| int | rows, | ||
| int | cols, | ||
| double | xres, | ||
| double | yres | ||
| ) |
Initialize allocated geosurf struct.
| gs | pointer to geosurf struct |
| ox,oy | x/y origin coordinates |
| rows | number of rows |
| cols | number of cols |
| xres,yres | x/y resolution value |
Definition at line 234 of file gs.c.
References ATTY_INT, DM_GOURAUD, FIRST_SURF_ID, G_debug(), gs_get_prev_surface(), MAX_ATTS, NOTSET_ATT, NULL, and ps.
Referenced by GS_new_surface().
Init viewpoint.
Definition at line 3346 of file gs2.c.
References FROM, G_debug(), GS_get_aspect(), GS_init_rotation(), GS_set_focus(), GS_UNIT_SIZE, GS_v3eq(), GS_v3normalize(), TO, W, X, Y, and Z.
Referenced by Nviz_init_view().
Check if point is masked ?
| id | surface id |
| pt | point |
Definition at line 1009 of file gs2.c.
References gs_get_surf(), gs_point_is_masked(), X, and Y.
Initialize OGSF library.
Get region settings - wind
Set Region (NSWE array) and compute scale
Definition at line 98 of file gs2.c.
References Cxl_func, G_debug(), G_get_set_window(), gs_init(), GS_UNIT_SIZE, and void_func().
| int Gs_load_3dview | ( | const char * | vname, |
| geoview * | gv, | ||
| geodisplay * | gd, | ||
| struct Cell_head * | w, | ||
| const geosurf * | defsurf | ||
| ) |
Load 3dview.
| vname | view name |
| gv | pointer to geoview struct |
| gd | pointer to geodisplay struct (unused) |
| w | current window |
| defsurf | default geosurf struct |
Definition at line 951 of file gs3.c.
References _, G_3dview::ambient, G_3dview::colorgrid, G_3dview::display_type, DM_COL_WIRE, DM_GOURAUD, DM_POLY, DM_WIRE, DM_WIRE_POLY, Cell_head::ew_res, G_3dview::exag, G_3dview::fov, FROM, G_3dview::from_to, G_find_file2(), G_get_3dview(), G_warning(), GS_alldraw_wire(), GS_moveto_real(), GS_set_focus(), GS_set_fov(), GS_set_global_exag(), GS_set_twist(), GS_setall_drawmode(), GS_setall_drawres(), G_3dview::lightcol, G_3dview::lightpos, G_3dview::lightson, G_3dview::mesh_freq, Cell_head::ns_res, NULL, G_3dview::pgm_id, G_3dview::poly_freq, G_3dview::shading, G_3dview::shine, Cell_head::south, TO, G_3dview::twist, G_3dview::vwin, Cell_head::west, X, Y, and Z.
Referenced by GS_load_3dview().
Load 3d view.
| vname | view file name |
| surfid | surface id |
Definition at line 3328 of file gs2.c.
References gs_get_surf(), and Gs_load_3dview().
Load raster map as attribute.
| id | surface id |
| filename | filename |
| att | attribute descriptor |
Definition at line 1600 of file gs2.c.
References _, ATT_COLOR, ATT_MASK, ATT_TOPO, ATTY_CHAR, ATTY_FLOAT, ATTY_INT, ATTY_MASK, ATTY_NULL, ATTY_SHORT, CF_COLOR_PACKED, free(), G_debug(), G_fatal_error(), G_find_raster2(), G_free(), G_fully_qualified_name(), G_warning(), Gs_build_256lookup(), gs_get_att_typbuff(), gs_get_surf(), gs_init_normbuff(), Gs_loadmap_as_bitmap(), Gs_loadmap_as_char(), Gs_loadmap_as_float(), Gs_loadmap_as_int(), Gs_loadmap_as_short(), gs_malloc_att_buff(), gs_malloc_lookup(), Gs_numtype(), Gs_pack_colors(), Gs_pack_colors_float(), gs_set_att_src(), gs_set_att_type(), Gs_update_attrange(), gs_update_curmask(), gsds_findh(), gsds_free_data_buff(), gsds_newh(), gsds_set_changed(), MAP_ATT, NULL, and Rast_get_cellhd().
Referenced by Nviz_set_attr().
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.
| wind | current window | |
| map_name | raster map name | |
| [out] | buff | data buffer |
Definition at line 516 of file gs3.c.
References _, BM_set(), Cell_head::cols, G_debug(), G_find_raster2(), G_free(), G_fully_qualified_name(), G_malloc, G_message(), G_warning(), Rast_close(), Rast_get_c_row(), Rast_is_c_null_value, Rast_open_old(), and Cell_head::rows.
Referenced by GS_load_att_map().
| 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.
| wind | current window | |
| map_name | raster map name | |
| [out] | buff | data buffer |
| [out] | nullmap | null map buffer |
| [out] | has_null | indicates if raster map contains null-data |
Definition at line 415 of file gs3.c.
References _, BM_set(), Cell_head::cols, G_debug(), G_find_raster2(), G_free(), G_fully_qualified_name(), G_malloc, G_message(), G_percent(), G_warning(), Rast_close(), Rast_get_c_row(), Rast_is_c_null_value, Rast_open_old(), and Cell_head::rows.
Referenced by GS_load_att_map().
| 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.
| wind | current window | |
| map_name | raster map name | |
| [out] | buff | data buffer |
| [out] | nullmap | null map buffer |
| [out] | has_null | indicates if raster map contains null-data |
Definition at line 109 of file gs3.c.
References _, BM_set(), Cell_head::cols, G_debug(), G_find_raster2(), G_free(), G_fully_qualified_name(), G_message(), G_percent(), G_warning(), Rast_close(), Rast_get_f_row(), Rast_is_f_null_value, Rast_open_old(), and Cell_head::rows.
Referenced by GS_load_att_map().
| 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.
| wind | current window | |
| map_name | raster map name | |
| [out] | buff | data buffer |
| [out] | nullmap | null map buffer |
| [out] | has_null | indicates if raster map contains null-data |
Definition at line 174 of file gs3.c.
References _, BM_set(), Cell_head::cols, G_debug(), G_find_raster2(), G_free(), G_fully_qualified_name(), G_message(), G_percent(), G_warning(), Rast_close(), Rast_get_c_row(), Rast_is_f_null_value, Rast_open_old(), and Cell_head::rows.
Referenced by GS_load_att_map().
| 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.
| wind | current window | |
| map_name | raster map name | |
| [out] | buff | data buffer |
| [out] | nullmap | null map buffer |
| [out] | has_null | indicates if raster map contains null-data |
Definition at line 309 of file gs3.c.
References _, BM_set(), Cell_head::cols, G_debug(), G_find_raster2(), G_free(), G_fully_qualified_name(), G_malloc, G_message(), G_percent(), G_warning(), Rast_close(), Rast_get_c_row(), Rast_is_c_null_value, Rast_open_old(), and Cell_head::rows.
Referenced by GS_load_att_map().
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.
| sx,sy | screen coordinates |
Definition at line 3005 of file gs2.c.
References FROM, GS_distance(), GS_get_selected_point_on_surface(), gs_get_surf(), GS_set_focus(), GS_v3dir(), GS_v3mult(), gsd_get_los(), TO, X, x, Y, and Z.
Referenced by Nviz_look_here().
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.
| surfid | surface id | |
| los | should be in surf-world coordinates | |
| [out] | point | intersect point (real) |
Definition at line 192 of file gs_query.c.
References ATT_TOPO, b, FROM, G_debug(), gs_get_att_typbuff(), gs_get_surf(), GS_v3dir(), GS_v3eq(), gsdrape_get_allsegments(), NULL, segs_intersect(), TO, viewcell_tri_interp(), X, Y, and Z.
Referenced by GS_get_selected_point_on_surface().
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.
| surfid | surface id | |
| los | should be in surf-world coordinates | |
| [out] | point | intersect point (real) |
Definition at line 52 of file gs_query.c.
References ATT_TOPO, b, FROM, G_debug(), GS_distance(), gs_get_att_typbuff(), gs_get_surf(), GS_v3dir(), NULL, TO, viewcell_tri_interp(), X, Y, and Z.
Referenced by GS_get_selected_point_on_surface().
Allocate attribute buffer.
| gs | pointer to geosurf struct |
| desc | attribute id (descriptor) |
| type | buffer type (based on raster map type) |
Definition at line 717 of file gs.c.
References G_debug(), gs_set_att_type(), and gsds_alloc_typbuff().
Referenced by GS_load_att_map().
Allocate attribute lookup.
| gs | pointer to geosurf struct |
| desc | attribute id |
Definition at line 746 of file gs.c.
References ATTY_CHAR, ATTY_SHORT, G_debug(), G_free(), G_malloc, G_warning(), and NULL.
Referenced by GS_load_att_map().
Call this one when you already know att_src is MAP_ATT.
| cobuff | |
| coloratt | color attribute |
| offset | offset value |
Definition at line 968 of file gs.c.
Referenced by GS_get_val_at_xy(), gs_update_curmask(), gsd_coarse_surf_map(), gsd_norm_arrows(), gsd_surf_const(), gsd_surf_map(), gsd_surf_map_old(), gsd_triangulated_wall(), gsd_wire_arrows(), gsd_wire_surf_const(), and gsd_wire_surf_map().
Check if mask is defined.
| gs | pointer to geosurf struct |
Definition at line 914 of file gs.c.
References ATT_MASK, and NOTSET_ATT.
Referenced by gs_update_curmask().
Should only be called when setting up the current mask (gs_bm.c)
| tb | pointer to typbuff |
| col | number of cols |
| row | number of rows |
| offset | offset value |
Definition at line 932 of file gs.c.
References BM_get().
Referenced by gs_update_curmask().
Move viewpoint.
| pt | 'from' model coordinates |
Definition at line 2616 of file gs2.c.
References FROM, G_debug(), GS_v3add(), GS_v3eq(), GS_v3normalize(), GS_v3sub(), and TO.
Referenced by gk_follow_frames(), GS_moveto_real(), Nviz_flythrough(), and Nviz_set_viewpoint_position().
Move position to (real)
| pt | point real coordinates |
Definition at line 2646 of file gs2.c.
References GS_moveto(), and gsd_real2model().
Referenced by Gs_load_3dview(), and Nviz_set_viewpoint_height().
Add new model light.
Definition at line 268 of file gs2.c.
References GS_get_light_reset(), GS_set_light_reset(), gsd_deflight(), gsd_init_lightmodel(), gsd_switchlight(), MAX_LIGHTS, W, X, Y, and Z.
Referenced by Nviz_new_light().
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.
Definition at line 223 of file gs2.c.
References ATT_SHINE, CONST_ATT, G_debug(), gs_get_new_surface(), gs_init_surf(), gs_set_att_src(), gs_set_defaults(), g_surf::gsurf_id, and MAX_SURFS.
Referenced by Nviz_new_map_obj().
Get number of reused values.
| dh | value |
Definition at line 597 of file gs.c.
References G_debug(), and MAX_ATTS.
Referenced by gs_set_att_src().
Get number of surfaces.
Definition at line 128 of file gs.c.
References G_debug().
Referenced by GS_draw_cplane(), and GS_num_surfs().
Get number of surfaces.
Definition at line 1517 of file gs2.c.
References gs_num_surfaces().
Referenced by Nviz_new_map_obj(), Nviz_set_arrow(), Nviz_set_focus_map(), and Nviz_set_scalebar().
Get map data type.
| filename | raster map name |
| negflag |
Definition at line 227 of file gs3.c.
References _, ATTY_CHAR, ATTY_FLOAT, ATTY_INT, ATTY_SHORT, G_debug(), G_find_raster2(), G_warning(), max, min, Rast_get_range_min_max(), Rast_map_is_fp(), and Rast_read_range().
Referenced by GS_load_att_map().
Calculate distance in plane.
| [in] | from | 'from' point (X,Y) |
| [in] | to | 'to' point (X,Y) |
Definition at line 160 of file gs_util.c.
Referenced by gsd_arrow(), gsd_draw_cplane_fence(), gv_line_length(), and seg_intersect_vregion().
Pack color table.
Passed an array of 32 bit ints that is converted from cell values to packed colors (0xbbggrr)
| filename | raster map name |
| buff | |
| rows | number of rows |
| cols | number of cols |
Definition at line 637 of file gs3.c.
References _, b, g, G_find_raster2(), G_free(), G_fully_qualified_name(), G_malloc, G_message(), G_percent(), G_warning(), NO_DATA_COL, r, Rast_free_colors(), Rast_lookup_c_colors(), and Rast_read_colors().
Referenced by GS_load_att_map().
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)
| filename | raster map name |
| fbuf | |
| ibuf | |
| rows | number of rows |
| cols | number of cols |
Definition at line 705 of file gs3.c.
References _, b, g, G_find_raster2(), G_free(), G_fully_qualified_name(), G_malloc, G_message(), G_percent(), G_warning(), NO_DATA_COL, r, Rast_free_colors(), Rast_lookup_f_colors(), and Rast_read_colors().
Referenced by GS_load_att_map().
Check if point is in region.
Check for cancel every CHK_FREQ points
| gs | surface (geosurf) |
| pt | point (array(X,Y,Z)) |
| region | region settings (array (top,bottom,left,right)) |
Definition at line 39 of file gpd.c.
References VCOL2X, VCOLS, VROW2Y, VROWS, X, and Y.
Referenced by gpd_2dsite().
Check if point is masked.
| gs | pointer to geosurf struct | |
| [in] | pt | point coordinates (X,Y,Z) |
Definition at line 1314 of file gs.c.
References BM_get(), MASK_BL, MASK_BR, MASK_TL, MASK_TR, VCOL2DCOL, VCOL2X, VCOLS, VROW2DROW, VROW2Y, VROWS, VXRES, VYRES, X, X2VCOL, Y, and Y2VROW.
Referenced by gpd_2dsite(), GS_get_cat_at_xy(), GS_get_norm_at_xy(), GS_get_selected_point_on_surface(), GS_get_val_at_xy(), GS_is_masked(), gvd_draw_lineonsurf(), gvd_vect(), and viewcell_tri_interp().
Put label.
| fontbase | fontbase settings |
| size | font size |
| color | font color |
| pt |
Definition at line 41 of file gsd_label.c.
References _, b, do_label_display(), G_warning(), gsd_bgn_legend_viewport(), gsd_color_func(), gsd_end_legend_viewport(), gsd_get_txtwidth(), l, label_base, label_id, MAX_LIST, r, t, X, and Y.
Definition at line 2488 of file gs2.c.
References G_debug(), and gsd_set_view().
Referenced by gk_follow_frames(), GK_set_tension(), GK_show_path(), GK_show_site(), GK_show_vect(), GK_show_vol(), gsd_bgn_legend_viewport(), gsd_get_los(), Nviz_draw_all(), Nviz_draw_all_site(), Nviz_draw_all_vect(), Nviz_draw_all_vol(), Nviz_draw_model(), Nviz_draw_quick(), and Nviz_resize_window().
| int Gs_save_3dview | ( | const char * | vname, |
| geoview * | gv, | ||
| geodisplay * | gd, | ||
| struct Cell_head * | w, | ||
| geosurf * | defsurf | ||
| ) |
Save 3dview.
| vname | view name |
| gv | pointer to geoview struct |
| gd | pointer to geodisplay struct (unused) |
| w | current window |
| defsurf | default geosurf struct |
Definition at line 852 of file gs3.c.
References G_3dview::ambient, G_3dview::colorgrid, G_3dview::display_type, DM_COL_WIRE, DM_GOURAUD, DM_POLY, DM_WIRE, DM_WIRE_POLY, G_3dview::dozero, G_3dview::exag, G_3dview::fov, G_3dview::fringe, FROM, G_3dview::from_to, G_get_3dview_defaults(), G_mapset(), G_put_3dview(), GS_get_zrange(), GS_v3eq(), GS_v3mult(), gsd_model2real(), G_3dview::lightcol, G_3dview::lightpos, G_3dview::lightson, G_3dview::mesh_freq, NULL, G_3dview::pgm_id, G_3dview::poly_freq, G_3dview::shading, G_3dview::shine, strcpy, G_3dview::surfonly, TO, G_3dview::twist, W, X, Y, and Z.
Referenced by GS_save_3dview().
Save 3d view.
| vname | view file name |
| surfid | surface id |
Definition at line 3315 of file gs2.c.
References gs_get_surf(), and Gs_save_3dview().
Set attribute constant value.
| gs | pointer to geosurf struct |
| desc | attribute id |
| constant | constant value |
Definition at line 871 of file gs.c.
References ATT_MASK, CONST_ATT, G_debug(), gs_set_att_src(), and Gs_update_attrange().
Referenced by GS_set_att_const().
Set attribute constant.
| id | surface id |
| att | attribute id |
| constant | value |
Definition at line 1405 of file gs2.c.
References gs_get_surf(), gs_set_att_const(), and Gs_update_attrange().
Referenced by Nviz_set_attr().
Set default attributes for map objects.
| defs | attributes array (dim MAX_ATTS) |
| null_defs | null 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().
Set attribute source.
| gs | pointer to geosurf struct |
| desc | attribute id (descriptor) |
| src | source id |
Definition at line 826 of file gs.c.
References ATT_TOPO, G_debug(), G_free(), gs_get_att_src(), gs_num_datah_reused(), gsds_free_datah(), LEGAL_SRC, MAP_ATT, and NULL.
Referenced by GS_load_att_map(), GS_new_surface(), gs_set_att_const(), and GS_unset_att().
Set attribute type.
| gs | pointer to geosurf struct |
| desc | attribute id |
| type | attribute type |
Definition at line 802 of file gs.c.
References G_debug(), and LEGAL_TYPE.
Referenced by GS_load_att_map(), and gs_malloc_att_buff().
Set client data.
| id | surface id |
| clientd | pointer to client data struct |
Definition at line 1478 of file gs2.c.
References gs_get_surf().
Set cplace.
| num | cplane id |
Definition at line 3214 of file gs2.c.
References gsd_cplane_on().
Referenced by Nviz_on_cplane().
Set cplace rotation.
| num | cplace id |
| dx,dy,dz | rotation values |
Definition at line 3122 of file gs2.c.
References gsd_cplane_setrot().
Referenced by Nviz_set_cplane_rotation().
Set cplace trans.
| num | cplace id |
| dx,dy,dz | rotation values |
Definition at line 3135 of file gs2.c.
References gsd_cplane_settrans().
Referenced by Nviz_set_cplane_translation().
Set default attribute values.
| gs | pointer to geosurf struct |
| defs | array of default values (dim MAX_ATTRS) |
| null_defs | array of null default values (dim MAX_ATTRS) |
Definition at line 441 of file gs.c.
References G_debug(), MAX_ATTS, NOTSET_ATT, and NULL.
Referenced by GS_new_surface().
Sets which buffer to draw to.
| where | GSD_BOTH, GSD_FRONT, GSD_BACK |
Definition at line 2462 of file gs2.c.
References GSD_BACK, gsd_backbuffer(), GSD_BOTH, gsd_bothbuffers(), GSD_FRONT, and gsd_frontbuffer().
Referenced by gk_follow_frames(), GK_set_tension(), GK_show_path(), GK_show_site(), GK_show_vect(), GK_show_vol(), gsd_bgn_legend_viewport(), gsd_end_legend_viewport(), gsd_fringe_horiz_line(), gsd_fringe_horiz_line2(), gsd_fringe_horiz_poly(), gsd_fringe_vert_line(), gsd_fringe_vert_poly(), gsd_get_los(), gsd_north_arrow(), gsd_ortho_wall(), gsd_scalebar(), gsd_scalebar_v2(), Nviz_draw_all(), Nviz_draw_all_site(), Nviz_draw_all_vect(), Nviz_draw_all_vol(), Nviz_draw_image(), Nviz_draw_model(), Nviz_draw_quick(), and Nviz_resize_window().
Set draw mode.
| id | surface id |
| mode | mode type(s) |
Definition at line 2084 of file gs2.c.
References G_debug(), and gs_get_surf().
Referenced by GS_setall_drawmode(), and Nviz_set_attr().
Set draw resolution for surface.
| id | surface id |
| xres,yres | x/y resolution value |
| xwire,ywire | x/y wire value |
Definition at line 2222 of file gs2.c.
References G_debug(), and gs_get_surf().
Referenced by GS_setall_drawres(), and Nviz_set_attr().
Set Z exag for surface.
| id | surface id |
| exag | z-exag value |
Definition at line 1954 of file gs2.c.
References G_debug(), and gs_get_surf().
Set fence color.
| mode | mode id |
Definition at line 3255 of file gs2.c.
References gsd_setfc().
Referenced by Nviz_set_fence_color().
Set focus.
| realto | real coordinates to |
Definition at line 2520 of file gs2.c.
References G_debug(), GS_v3eq(), and gsd_set_view().
Referenced by GS_init_view(), Gs_load_3dview(), GS_look_here(), GS_set_focus_center_map(), GVL_set_focus_center_map(), and Nviz_set_focus().
Set focus to map center.
| id | surface id |
Definition at line 2581 of file gs2.c.
References G_debug(), gs_get_surf(), GS_set_focus(), X, Y, and Z.
Referenced by Nviz_set_focus_map().
Set real focus.
| realto | real coordinates to |
Definition at line 2538 of file gs2.c.
References G_get_set_window(), GS_v3eq(), gsd_set_view(), X, and Y.
Set field of view.
| fov | fov value |
Definition at line 2841 of file gs2.c.
Referenced by gk_follow_frames(), Gs_load_3dview(), and Nviz_set_viewpoint_persp().
Set global z-exag value.
| exag | exag value to be set up |
Definition at line 1978 of file gs2.c.
References G_debug().
Referenced by Gs_load_3dview(), and Nviz_change_exag().
Set focus.
Make sure that the center of view is set
Definition at line 2965 of file gs2.c.
References G_debug().
Referenced by Nviz_set_focus_state().
Definition at line 250 of file gs2.c.
Referenced by GS_new_light(), and Nviz_init_data().
Set geosurf mask mode.
| invert | invert mask |
Definition at line 899 of file gs.c.
Referenced by gs_update_curmask().
Set mask mode.
Mask attribute special: constant is set to indicate invert or no
| id | surface id |
| mode | id |
Definition at line 1429 of file gs2.c.
References ATT_MASK, and gs_get_surf().
Set decoration, north arrow ??
| pt | point value in true world coordinates (?) | |
| id | surface id | |
| [out] | pos2 | output coordinates |
Definition at line 564 of file gs2.c.
References GS_get_selected_point_on_surface(), gs_get_surf(), gsd_do_scale(), gsd_pushmatrix(), X, x, Y, and Z.
Referenced by Nviz_set_arrow(), and Nviz_set_scalebar().
Unset focus.
Definition at line 2951 of file gs2.c.
References G_debug().
Referenced by GS_set_viewdir(), Nviz_set_focus_map(), and Nviz_set_focus_state().
Set rotation params.
Definition at line 2885 of file gs2.c.
References x.
Referenced by Nviz_set_rotation().
Set ?
| scale | scale value |
Definition at line 1064 of file gs2.c.
References gsdiff_set_SDscale().
Set surface as Scaled Difference surface.
| id | surface id |
Definition at line 1043 of file gs2.c.
References gs_get_surf(), and gsdiff_set_SDref().
Set translation (surface position)
| id | surface id |
| xtrans,ytrans,ztrans | translation values |
Definition at line 2392 of file gs2.c.
References G_debug(), and gs_get_surf().
Set viewpoint twist value.
10ths of degrees off twelve o'clock
| t | tenths of degrees clockwise from 12:00. |
Definition at line 2875 of file gs2.c.
References t.
Referenced by gk_follow_frames(), Gs_load_3dview(), and Nviz_set_viewpoint_twist().
Set viewdir.
Automatically turns off focus
| dir | viewdir value |
Definition at line 2821 of file gs2.c.
References FROM, GS_set_nofocus(), GS_v3add(), GS_v3eq(), GS_v3norm(), gsd_set_view(), and TO.
Referenced by gk_follow_frames(), and Nviz_flythrough().
Set viewport.
| left,right,bottom,top | viewport extent values |
Definition at line 2979 of file gs2.c.
References Cell_head::bottom, G_debug(), gsd_viewport(), and Cell_head::top.
Referenced by Nviz_resize_window().
Set wire color.
| id | surface id |
| colr | color value |
Definition at line 2015 of file gs2.c.
References G_debug(), and gs_get_surf().
Set all draw-modes.
| mode | mode id |
Definition at line 2062 of file gs2.c.
References GS_set_drawmode().
Referenced by Gs_load_3dview().
Set all draw resolutions.
| xres,yres | x/y resolution value |
| xwire,ywire | x/y wire value |
Definition at line 2199 of file gs2.c.
References GS_set_drawres().
Referenced by Gs_load_3dview().
Set light ambient.
Red, green, blue from 0.0 to 1.0
| num | light id (starts at 1) |
| red,green,blue | color values |
Definition at line 400 of file gs2.c.
References gsd_deflight().
Referenced by Nviz_set_light_ambient().
Set light color.
Definition at line 356 of file gs2.c.
References gsd_deflight().
Referenced by Nviz_set_light_bright(), and Nviz_set_light_color().
Set light position.
| num | light id (starts with 1) |
| xpos,ypos,zpos | coordinates (model) |
| local | local coordinate (for viewport) |
Definition at line 309 of file gs2.c.
References gsd_deflight(), W, X, Y, and Z.
Referenced by gk_follow_frames(), Nviz_draw_all_surf(), and Nviz_set_light_position().
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.
| [out] | los |
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.
Referenced by GS_get_selected_point_on_surface().
Check if surface exists
| id | surface id |
Definition at line 194 of file gs2.c.
References G_debug(), gs_get_surf(), and NULL.
Referenced by GP_select_surf(), GS_delete_surface(), GV_select_surf(), Nviz_new_fringe(), and Nviz_set_fringe().
Switch on/off light.
| num | light id (starts at 1) |
| on | non-zero for 'on' otherwise 'off' |
Definition at line 470 of file gs2.c.
References gsd_switchlight().
Check if transparency is set.
Definition at line 489 of file gs2.c.
References ATT_TRANSP, FC_GREY, gs_att_is_set(), gsd_getfc(), and NULL.
Unset attribute.
| id | surface id |
| att | attribute id |
Definition at line 1386 of file gs2.c.
References gs_get_surf(), gs_set_att_src(), and NOTSET_ATT.
Referenced by Nviz_unset_attr().
Unset clip place (turn off)
| num | cplane id |
Definition at line 3226 of file gs2.c.
References gsd_cplane_off().
Referenced by Nviz_off_cplane().
Unset Scaled Difference surface.
Definition at line 1027 of file gs2.c.
References gsdiff_set_SDref(), and NULL.
Update no_zero ranges for attribute (actually no_null now)
| gs | pointer to geosurf struct |
| desc | attribute id (descriptor) |
Definition at line 1084 of file gs3.c.
References ATT_TOPO, CF_COLOR_PACKED, CONST_ATT, G_debug(), gs_get_att_src(), gsds_get_changed(), gsds_get_typbuff(), INIT_MINMAX, max, min, NULL, and SET_MINMAX.
Referenced by GS_load_att_map(), gs_set_att_const(), and GS_set_att_const().
Update current maps.
| surf | surface (geosurf) |
Definition at line 228 of file gs_bm.c.
References ATT_COLOR, ATT_MASK, ATT_TOPO, BM_create(), BM_destroy(), BM_set(), G_debug(), gs_get_att_typbuff(), gs_mapcolor(), gs_mask_defined(), gs_masked(), gs_set_maskmode(), gsbm_make_mask(), gsbm_or_masks(), gsbm_ornot_masks(), gsbm_zero_mask(), MAP_ATT, NULL, and NULL_COLOR.
Referenced by gpd_2dsite(), gs_calc_normals(), GS_load_att_map(), GS_update_curmask(), gsd_coarse_surf_map(), gsd_norm_arrows(), gsd_surf_const(), gsd_surf_map(), gsd_surf_map_old(), gsd_wire_arrows(), gsd_wire_surf_const(), gsd_wire_surf_map(), and gvd_vect().
Update current mask.
May be called to update total mask for a surface at convenient times instead of waiting until ready to redraw surface
| id | surface id |
Definition at line 991 of file gs2.c.
References gs_get_surf(), and gs_update_curmask().
Update normals.
| id | surface id |
Definition at line 1113 of file gs2.c.
References gs_calc_normals(), and gs_get_surf().
Change v1 so that it is a unit vector (2D)
| [in,out] | v1 | 2D vector (X,Y) |
Definition at line 271 of file gs_util.c.
Referenced by GS_draw_flowline_at_xy().
Sum vectors.
v1 += v2
| [in,out] | v1 | first 3D vector (X,Y,Z) |
| [in] | v2 | second 3D vector (X,Y,Z) |
Definition at line 195 of file gs_util.c.
Referenced by GS_moveto(), GS_set_viewdir(), gs_setlos_enterdata(), and gsd_arrow_onsurf().
Get the cross product v3 = v1 cross v2.
| [in] | v1 | first 3D vector (X,Y,Z) |
| [in] | v2 | second 3D vector (X,Y,Z) |
| [out] | v3 | output 3D vector (X,Y,Z) |
Definition at line 403 of file gs_util.c.
Referenced by gsd_arrow_onsurf(), gsd_surf_map_old(), and Gv_load_vect().
Get a normalized direction from v1 to v2, store in v3.
| [in] | v1 | first 3D vector (X,Y,Z) |
| [in] | v2 | second 3D vector (X,Y,Z) |
| [out] | v3 | output 3D vector (X,Y,Z) |
Definition at line 351 of file gs_util.c.
Referenced by GS_get_modelposition(), GS_get_viewdir(), GS_look_here(), gs_los_intersect(), gs_los_intersect1(), gs_setlos_enterdata(), gsd_arrow_onsurf(), gsd_get_zup(), and Nviz_set_cplane_here().
Copy vector values.
v1 = v2
| [out] | v1 | first 3D vector (X,Y,Z) |
| [in] | v2 | second 3D vector (X,Y,Z) |
Definition at line 178 of file gs_util.c.
Referenced by gpd_obj(), GS_draw_lighting_model(), GS_draw_lighting_model1(), GS_get_focus(), GS_get_from(), GS_get_from_real(), GS_get_selected_point_on_surface(), GS_get_to(), GS_init_view(), gs_los_intersect(), GS_moveto(), Gs_save_3dview(), GS_set_focus(), GS_set_focus_real(), GS_set_viewdir(), gsd_arrow_onsurf(), gsd_check_focus(), gsd_surf_map_old(), gsd_wall(), gsd_zup_twist(), gsdrape_get_allsegments(), and gsdrape_get_segments().
Magnitude of vector.
| [in] | v1 | 3D vector (X,Y,Z) |
| [out] | mag | magnitude value |
Definition at line 418 of file gs_util.c.
Referenced by gsd_arrow_onsurf(), and gsd_surf_map_old().
Multiple vectors.
v1 *= k
| [in,out] | v1 | 3D vector (X,Y,Z) |
| [in] | k | multiplicator |
Definition at line 229 of file gs_util.c.
Referenced by GS_look_here(), Gs_save_3dview(), gs_setlos_enterdata(), gsd_arrow_onsurf(), gsd_check_focus(), and Nviz_set_cplane_here().
Change v1 so that it is a unit vector (3D)
| [in,out] | v1 | 3D vector (X,Y,Z) |
Definition at line 246 of file gs_util.c.
Referenced by GS_set_viewdir(), gsd_3darrow(), gsd_arrow(), gsd_draw_cplane_fence(), and iso_calc_cube().
Change v2 so that v1v2 is a unit vector.
| [in] | v1 | first 3D vector (X,Y,Z) |
| [in,out] | v2 | second 3D vector (X,Y,Z) |
Definition at line 321 of file gs_util.c.
Referenced by GS_init_view(), GS_moveto(), and gsd_check_focus().
Subtract vectors.
v1 -= v2
| [in,out] | v1 | first 3D vector (X,Y,Z) |
| v2 | second 3D vector (X,Y,Z) |
Definition at line 212 of file gs_util.c.
Referenced by GS_moveto(), and gsd_surf_map_old().
Save current GL screen to ppm file.
| name | file name |
Definition at line 41 of file gsd_img_ppm.c.
References _, b, g, G_free(), G_warning(), gsd_getimage(), name, NULL, r, and x.
Write data to tif file.
| name | filename |
Definition at line 53 of file gsd_img_tif.c.
References _, config, G_free(), G_malloc, G_warning(), gsd_getimage(), name, NULL, rowsperstrip, and x.
Write zoom to file.
| name | file name |
| xsize,ysize |
Definition at line 87 of file gsd_img_ppm.c.
References _, b, free(), g, G_warning(), gsd_writeView(), name, NULL, r, and x.
Get zoom setup.
| [out] | a,b,c,d | current viewport settings |
| [out] | maxx,maxy | max viewport size |
Definition at line 2770 of file gs2.c.
References b, and gsd_getViewport().
Do combining of bitmaps, make bitmaps from other data w/maskval.
| frombuff | data buffer |
| maskval | mask type |
| rows | number of rows |
| cols | number of cols |
Definition at line 35 of file gs_bm.c.
References BM_create(), BM_get(), BM_set(), BM::cols, GET_MAPATT, and BM::rows.
Referenced by gs_update_curmask().
Mask bitmap (mask type OR)
Must be same size, ORs bitmaps & stores in bmvar
Definition at line 167 of file gs_bm.c.
References MASK_OR.
Referenced by gs_update_curmask().
Mask bitmap (mask type ORNOT)
Must be same size, ORNOTs bitmaps & stores in bmvar
Definition at line 183 of file gs_bm.c.
References MASK_ORNOT.
Referenced by gs_update_curmask().
| void gsd_3darrow | ( | float * | center, |
| unsigned long | colr, | ||
| float | siz1, | ||
| float | siz2, | ||
| float * | dir, | ||
| float | sz | ||
| ) |
Draw 3d north arrow.
| center | Pointer to a float array representing the (x, y, z) coordinates of the center point. |
| colr | Integer representing the color to use for drawing the arrow. |
| siz1 | size |
| siz2 | size |
| dir | Direction of the arrow. Pointer to a float array representing the 3D vector (X,Y,Z). |
| sz | height |
Definition at line 1111 of file gsd_objs.c.
References dir_to_slope_aspect(), G_debug(), GS_v3norm(), gsd_backface(), gsd_bgnlist(), gsd_calllist(), gsd_color_func(), gsd_endlist(), gsd_getshademodel(), gsd_makelist(), gsd_popmatrix(), gsd_pushmatrix(), gsd_rot(), gsd_scale(), gsd_shademodel(), gsd_translate(), primitive_cone(), primitive_cylinder(), X, Y, and Z.
Referenced by gsd_norm_arrows().
Draw 3d cursor.
| [in] | pt | point |
Definition at line 719 of file gsd_objs.c.
References gsd_bgnline(), gsd_endline(), gsd_vert_func(), X, Y, and Z.
| int gsd_arrow | ( | float * | center, |
| unsigned long | colr, | ||
| float | siz, | ||
| float * | dir, | ||
| float | sz, | ||
| geosurf * | onsurf | ||
| ) |
Draws an arrow.
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.
| center | Pointer to a float array representing the (x, y, z) coordinates of the center point. |
| colr | Integer representing the color to use for drawing the arrow. |
| siz | Size of the arrow. |
| dir | Direction of the arrow. Pointer to a float array representing the 3D vector (X,Y,Z). |
| sz | height, sz is global exag to correct for. |
| onsurf | surface (geosurf). |
Definition at line 948 of file gsd_objs.c.
References dir_to_slope_aspect(), GS_P2distance(), GS_v3norm(), gsd_arrow_onsurf(), gsd_bgnline(), gsd_color_func(), gsd_endline(), gsd_popmatrix(), gsd_pushmatrix(), gsd_rot(), gsd_scale(), gsd_translate(), gsd_vert_func(), NULL, ORIGIN, UP_NORM, X, Y, and Z.
Referenced by gsd_norm_arrows(), and gsd_wire_arrows().
Draw north arrow on surface.
| base | Pointer to a float array representing the base as a 2D vector (X,Y). |
| tip | Pointer to a float array representing the tip as a 2D vector (X,Y). |
| colr | Integer representing the color to use for drawing the arrow. |
| wid | Line width (see gsd_linewidth) |
| gs | surface (geosurf) |
Definition at line 1022 of file gsd_objs.c.
References DOWN_NORM, G_debug(), GS_v3add(), GS_v3cross(), GS_v3dir(), GS_v3eq(), GS_v3mag(), GS_v3mult(), gsd_color_func(), gsd_disc(), gsd_line_onsurf(), gsd_linewidth(), UP_NORM, X, Y, and Z.
Referenced by gsd_arrow().
ADD.
| n |
Definition at line 254 of file gsd_prim.c.
Referenced by GS_draw_lighting_model(), GS_draw_lighting_model1(), and gsd_3darrow().
ADD.
| 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().
Referenced by gs_put_label(), and gsd_put_legend().
Begin line.
Definition at line 397 of file gsd_prim.c.
Referenced by gk_draw_path(), gsd_3dcursor(), gsd_arrow(), gsd_diamond_lines(), gsd_draw_box(), gsd_draw_gyro(), gsd_fringe_horiz_line(), gsd_fringe_horiz_line2(), gsd_fringe_vert_line(), gsd_line_onsurf(), gsd_nline_onsurf(), gsd_plus(), gsd_put_legend(), gsd_scalebar_v2(), gsd_wire_surf_const(), gsd_wire_surf_map(), gsd_x(), gvd_draw_lineonsurf(), gvd_vect(), gvld_wind3_box(), and gvld_wire_slices().
ADD.
| listno | |
| do_draw |
Definition at line 1125 of file gsd_prim.c.
Referenced by gsd_3darrow(), and gsd_put_legend().
Delimit the vertices of a primitive or a group of like primitives.
Definition at line 372 of file gsd_prim.c.
Referenced by gsd_box(), gsd_cube(), gsd_diamond(), gsd_draw_cplane(), gsd_north_arrow(), gsd_scalebar(), gsd_surf_const(), and gvld_isosurf().
ADD.
Definition at line 277 of file gsd_prim.c.
Referenced by gsd_fringe_horiz_poly(), gsd_fringe_vert_poly(), and primitive_cylinder().
ADD.
Definition at line 337 of file gsd_prim.c.
Referenced by gsd_coarse_surf_map(), gsd_surf_map(), primitive_cone(), and primitive_cylinder().
ADD.
Definition at line 297 of file gsd_prim.c.
Referenced by gsd_diamond(), gsd_ortho_wall(), gsd_surf_const(), gsd_surf_map_old(), gsd_triangulated_wall(), and gvld_slice().
ADD.
Definition at line 317 of file gsd_prim.c.
Specify pixel arithmetic.
| yesno | turn on/off |
Definition at line 994 of file gsd_prim.c.
Referenced by gsd_coarse_surf_map(), gsd_draw_cplane(), gsd_ortho_wall(), gsd_surf_const(), gsd_surf_map(), gsd_surf_map_old(), gvld_isosurf(), gvld_slice(), and gvld_slices().
Draw to the front and back buffers.
Definition at line 446 of file gsd_prim.c.
Referenced by GS_set_draw().
Draws a box at the specified center location.
This function renders a box at the given center coordinates with the specified color and size.
| center | Pointer to a float array representing the (x, y, z) coordinates of the center point. |
| colr | Integer representing the color to use for drawing the symbol. |
| siz | Size of the symbol. |
Definition at line 1475 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().
Call display list and draw defined labels – called from gsd_prim (gsd_call_lists)
Definition at line 119 of file gsd_label.c.
References label_base, and MAX_LIST.
Referenced by gsd_calllists().
ADD.
| listno |
Definition at line 1173 of file gsd_prim.c.
Referenced by GS_draw_list(), and gsd_3darrow().
ADD.
| listno | [unused] |
Definition at line 1185 of file gsd_prim.c.
References gsd_call_label(), gsd_popmatrix(), gsd_pushmatrix(), and MAX_OBJS.
Referenced by GS_draw_all_list().
Check focus.
| gv | view (geoview) |
Definition at line 216 of file gsd_views.c.
References FROM, GS_get_zrange(), GS_v3eq(), GS_v3mult(), GS_v3normalize(), TO, and Z.
Referenced by gsd_set_view().
| int gsd_checkpoint | ( | float | pt[4], |
| int | window[4], | ||
| int | viewport[4], | ||
| double | modelMatrix[16], | ||
| double | projMatrix[16] | ||
| ) |
ADD.
| pt | |
| window | |
| viewport | |
| doubleMatrix | |
| projMatrix |
Definition at line 585 of file gsd_prim.c.
Referenced by gpd_2dsite(), gpd_3dsite(), gsd_surf_const(), gsd_surf_map(), and gsd_surf_map_old().
ADD.
| x,y | |
| rad |
Definition at line 167 of file gsd_prim.c.
References x.
Referenced by gsd_draw_gyro().
Draw coarse surface.
New (TEST) wire routine that draws low res surface Based on new Triangle Fan routine Resolution is a function of current surface resolution times wire resolution
In window optimization has been removed
| surf | surface (geosurf) |
Definition at line 572 of file gsd_wire.c.
References ATT_COLOR, ATT_EMIT, ATT_SHINE, ATT_TOPO, ATT_TRANSP, CM_DIFFUSE, CONST_ATT, FNORM, GET_MAPATT, gs_calc_normals(), gs_get_att_typbuff(), GS_get_scale(), GS_global_exag(), gs_mapcolor(), gs_update_curmask(), gsd_bgntfan(), gsd_blend(), gsd_colormode(), gsd_do_scale(), gsd_endtfan(), gsd_litvert_func(), gsd_popmatrix(), gsd_pushmatrix(), gsd_set_material(), gsd_surf_const(), gsd_translate(), gsd_zwritemask(), MAP_ATT, SCALE_ATT, VCOLS, VROWS, X, Y, and Z.
Referenced by gsd_wire_surf().
Set current color.
| col | color value |
Definition at line 698 of file gsd_prim.c.
References b, g, INT_TO_ALP, INT_TO_BLU, INT_TO_GRN, INT_TO_RED, and r.
Referenced by gk_draw_path(), gpd_obj(), GS_draw_line_onsurf(), GS_draw_nline_onsurf(), gs_put_label(), gsd_3darrow(), gsd_arrow(), gsd_arrow_onsurf(), gsd_display_fringe(), gsd_draw_asterisk(), gsd_draw_box(), gsd_draw_cplane(), gsd_draw_gyro(), gsd_drawsphere(), gsd_get_los(), gsd_litvert_func(), gsd_north_arrow(), gsd_plus(), gsd_put_legend(), gsd_scalebar(), gsd_scalebar_v2(), gsd_wire_surf_const(), gsd_wire_surf_map(), gsd_x(), gvd_draw_lineonsurf(), gvd_vect(), gvld_wind3_box(), and gvld_wire_slices().
Set color mode.
Call glColorMaterial before enabling the GL_COLOR_MATERIAL
| cm | color mode value |
Definition at line 98 of file gsd_prim.c.
References CM_AD, CM_COLOR, CM_DIFFUSE, CM_EMISSION, and CM_NULL.
Referenced by gk_draw_path(), gpd_obj(), GS_draw_lighting_model(), GS_draw_lighting_model1(), gsd_bgn_legend_viewport(), gsd_coarse_surf_map(), gsd_display_fringe(), gsd_norm_arrows(), gsd_ortho_wall(), gsd_surf_const(), gsd_surf_map(), gsd_surf_map_old(), gsd_triangulated_wall(), gsd_wire_arrows(), gsd_wire_surf_const(), gsd_wire_surf_map(), gvd_vect(), gvld_isosurf(), gvld_slices(), gvld_wind3_box(), and gvld_wire_slices().
Turn off clip plane.
| num | cplane id |
Definition at line 126 of file gsd_cplane.c.
References gsd_set_clipplane().
Referenced by GS_draw_lighting_model(), and GS_unset_cplane().
ADD.
| num |
Definition at line 104 of file gsd_cplane.c.
References gsd_def_cplane(), and gsd_set_clipplane().
Referenced by GS_draw_lighting_model(), and GS_set_cplane().
ADD.
| num | |
| rx,ry,rz |
Definition at line 211 of file gsd_cplane.c.
References gsd_def_cplane(), gsd_update_cpnorm(), X, Y, and Z.
Referenced by GS_set_cplane_rot().
ADD.
| num | |
| tx,ty,tz |
Definition at line 229 of file gsd_cplane.c.
References gsd_def_cplane(), X, Y, and Z.
Referenced by GS_set_cplane_trans().
Draws a cube symbol at the specified center location.
This function renders a cube symbol at the given center coordinates with the specified color and size.
Added by Hamish Bowman Nov 2005
| center | Pointer to a float array representing the (x, y, z) coordinates of the center point. |
| colr | Integer representing the color to use for drawing the symbol. |
| siz | Size of the symbol. |
Definition at line 422 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().
Define clip plane.
| num | |
| params |
Definition at line 1014 of file gsd_prim.c.
Referenced by gsd_def_cplane().
Define cplace.
| num | |
| pt | |
| norm |
Definition at line 55 of file gsd_cplane.c.
References GS_dv3norm(), GS_get_scale(), GS_get_zrange(), and gsd_def_clipplane().
Referenced by gsd_cplane_on(), gsd_cplane_setrot(), gsd_cplane_settrans(), and gsd_update_cplanes().
Define light.
| num | light id (starts with 1) |
| vals | position(x,y,z,w), color, ambientm, emission |
Definition at line 836 of file gsd_prim.c.
References lightdefs::ambient, lightdefs::color, MAX_LIGHTS, lightdefs::position, W, X, Y, and Z.
Referenced by GS_new_light(), GS_setlight_ambient(), GS_setlight_color(), and GS_setlight_position().
Delete list.
| listno | |
| range | [unused] |
Definition at line 1153 of file gsd_prim.c.
References MAX_OBJS.
Referenced by GS_delete_list().
Draws a diamond symbol at the specified center location.
This function renders a diamond symbol at the given center coordinates with the specified color and size.
| center | Pointer to a float array representing the (x, y, z) coordinates of the center point. |
| colr | Integer representing the color to use for drawing the symbol. |
| siz | Size of the symbol. |
Definition at line 316 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().
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().
ADD.
| x,y,z | |
| rad |
Definition at line 187 of file gsd_prim.c.
References x.
Referenced by gsd_arrow_onsurf().
Display fridge.
| surf | surface (geosurf) |
| clr | |
| elev | |
| where |
Definition at line 51 of file gsd_fringe.c.
References CM_COLOR, FRINGE_FORE, FRINGE_WIDTH, gsd_color_func(), gsd_colormode(), gsd_fringe_horiz_line(), gsd_fringe_horiz_poly(), gsd_fringe_vert_line(), gsd_fringe_vert_poly(), gsd_linewidth(), gsd_zwritemask(), Neast, Nnorth, Nsouth, Nwest, VCOLS, and VROWS.
Referenced by GS_draw_fringe().
Set current scale.
| doexag | use z-exaggeration |
Definition at line 355 of file gsd_views.c.
References GS_get_scale(), GS_get_zrange(), gsd_scale(), gsd_translate(), max, and min.
Referenced by gpd_2dsite(), gpd_3dsite(), GS_draw_lighting_model1(), GS_draw_line_onsurf(), GS_draw_nline_onsurf(), GS_draw_X(), GS_set_Narrow(), gsd_coarse_surf_map(), gsd_draw_cplane(), gsd_fringe_horiz_line(), gsd_fringe_horiz_line2(), gsd_fringe_horiz_poly(), gsd_fringe_vert_line(), gsd_fringe_vert_poly(), gsd_get_los(), gsd_getwindow(), gsd_norm_arrows(), gsd_north_arrow(), gsd_ortho_wall(), gsd_scalebar(), gsd_scalebar_v2(), gsd_surf_const(), gsd_surf_map(), gsd_surf_map_old(), gsd_triangulated_wall(), gsd_wire_arrows(), gsd_wire_surf_const(), gsd_wire_surf_map(), gvd_vect(), gvld_isosurf(), gvld_slices(), gvld_wind3_box(), and gvld_wire_slices().
Draws an asterisk symbol at the specified center location.
This function renders an asterisk symbol at the given center coordinates with the specified color and size.
| center | Pointer to a float array representing the (x, y, z) coordinates of the center point. |
| colr | Integer representing the color to use for drawing the symbol. |
| siz | Size of the symbol. |
Definition at line 608 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().
Draws a box symbol at the specified center location.
This function renders a box symbol at the given center coordinates with the specified color and size.
Added by Hamish Bowman Nov 2005
| center | Pointer to a float array representing the (x, y, z) coordinates of the center point. |
| colr | Integer representing the color to use for drawing the symbol. |
| siz | Size of the symbol. |
Definition at line 502 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().
Draw cplane.
| num |
Definition at line 296 of file gsd_cplane.c.
References GS_default_draw_color(), GS_get_longdim(), GS_global_exag(), gsd_bgnpolygon(), gsd_blend(), gsd_color_func(), gsd_do_scale(), gsd_endpolygon(), gsd_popmatrix(), gsd_pushmatrix(), gsd_rot(), gsd_scale(), gsd_set_clipplane(), gsd_translate(), gsd_vert_func(), gsd_zwritemask(), MAX_CPLANES, X, Y, and Z.
Referenced by GS_draw_cplane().
ADD.
| surf1 | first surface (geosurf) |
| surf2 | second surface (geosurf) [unused] |
| cpnum |
Definition at line 247 of file gsd_cplane.c.
References GS_P2distance(), GS_v3norm(), gsd_set_clipplane(), gsd_wall(), VROW2Y, X, Y, and Z.
Referenced by GS_draw_cplane(), and GS_draw_cplane_fence().
Draws a gyro symbol at the specified center location.
This function renders a gyro symbol at the given center coordinates with the specified color and size.
| center | Pointer to a float array representing the (x, y, z) coordinates of the center point. |
| colr | Integer representing the color to use for drawing the symbol. |
| siz | Size of the symbol. |
Definition at line 667 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().
Draws a sphere at the specified center location.
This function renders a sphere at the given center coordinates with the specified color and size.
| center | Pointer to a float array representing the (x, y, z) coordinates of the center point. |
| colr | Integer representing the color to use for drawing the sphere. |
| siz | Size of the sphere. |
Definition at line 565 of file gsd_objs.c.
References gsd_color_func(), and gsd_sphere().
Referenced by GS_draw_lighting_model(), and GS_draw_lighting_model1().
ADD.
Definition at line 91 of file gsd_legend.c.
References GS_done_draw(), GS_set_draw(), GSD_BACK, and gsd_popmatrix().
Referenced by gs_put_label(), and gsd_put_legend().
End line.
Definition at line 407 of file gsd_prim.c.
Referenced by gk_draw_path(), gsd_3dcursor(), gsd_arrow(), gsd_diamond_lines(), gsd_draw_box(), gsd_draw_gyro(), gsd_fringe_horiz_line(), gsd_fringe_horiz_line2(), gsd_fringe_vert_line(), gsd_line_onsurf(), gsd_nline_onsurf(), gsd_plus(), gsd_put_legend(), gsd_scalebar_v2(), gsd_wire_surf_const(), gsd_wire_surf_map(), gsd_x(), gvd_draw_lineonsurf(), gvd_vect(), gvld_wind3_box(), and gvld_wire_slices().
End list.
Definition at line 1140 of file gsd_prim.c.
Referenced by gsd_3darrow(), and gsd_put_legend().
Delimit the vertices of a primitive or a group of like primitives.
Definition at line 387 of file gsd_prim.c.
Referenced by gsd_box(), gsd_cube(), gsd_diamond(), gsd_draw_cplane(), gsd_north_arrow(), gsd_scalebar(), gsd_surf_const(), and gvld_isosurf().
ADD.
Definition at line 287 of file gsd_prim.c.
Referenced by gsd_fringe_horiz_poly(), gsd_fringe_vert_poly(), and primitive_cylinder().
ADD.
Definition at line 347 of file gsd_prim.c.
Referenced by gsd_coarse_surf_map(), gsd_surf_map(), primitive_cone(), and primitive_cylinder().
ADD.
Definition at line 307 of file gsd_prim.c.
Referenced by gsd_diamond(), gsd_ortho_wall(), gsd_surf_const(), gsd_surf_map_old(), gsd_triangulated_wall(), and gvld_slice().
ADD.
Definition at line 327 of file gsd_prim.c.
Finish.
Does nothing, only called from src.contrib/GMSL/NVIZ2.2/src/glwrappers.c
Definition at line 1059 of file gsd_prim.c.
Mostly for flushing drawing commands across a network.
glFlush doesn't block, so if blocking is desired use glFinish.
Definition at line 84 of file gsd_prim.c.
Referenced by GS_clear(), GS_done_draw(), GS_draw_lighting_model(), GS_draw_line_onsurf(), GS_draw_nline_onsurf(), 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().
Draw fringe outline in x direction.
| bot | coordinate of fringe bottom |
| surf | surface (geosurf) |
| row | row along which is fringe drawn |
| side |
Definition at line 227 of file gsd_fringe.c.
References ATT_TOPO, 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(), VCOLS, X, Y, and Z.
Referenced by gsd_display_fringe().
Draw fringe polygon in x direction.
| bot | coordinate of fringe bottom |
| surf | surface (geosurf) |
| row | row along which is fringe drawn |
| side |
Definition at line 141 of file gsd_fringe.c.
References ATT_TOPO, 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(), VCOLS, X, Y, and Z.
Referenced by gsd_display_fringe().
Draw fringe outline in y direction.
| bot | coordinate of fringe bottom |
| surf | surface (geosurf) |
| col | column along which is fringe drawn |
| side |
Definition at line 407 of file gsd_fringe.c.
References ATT_TOPO, 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(), VROWS, X, Y, and Z.
Referenced by gsd_display_fringe().
Draw fringe outline in y direction.
| bot | coordinate of fringe bottom |
| surf | surface (geosurf) |
| col | column along which is fringe drawn |
| side |
Definition at line 322 of file gsd_fringe.c.
References ATT_TOPO, 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(), VROWS, X, Y, and Z.
Referenced by gsd_display_fringe().
Get cplaces.
Planes MUST be big enough to hold MAX_CPLANES Point4s
| planes | surface coordinates, normal pointing away from visible side |
Definition at line 162 of file gsd_cplane.c.
References DOT3, MAX_CPLANES, W, X, Y, and Z.
Referenced by gs_setlos_enterdata().
Get cplane state.
onstate MUST be big enough to hold MAX_CPLANES ints
| onstate |
Definition at line 142 of file gsd_cplane.c.
References MAX_CPLANES.
Referenced by GS_alldraw_cplane_fences(), and GS_draw_lighting_model().
ADD.
| vect | |
| sx,sy | screen coordinates |
Definition at line 40 of file gsd_views.c.
References FROM, GS_ready_draw(), GS_set_draw(), GSD_BACK, gsd_color_func(), gsd_do_scale(), GSD_FRONT, gsd_linewidth(), TO, X, Y, and Z.
Referenced by GS_get_selected_point_on_surface(), GS_look_here(), and Nviz_set_cplane_here().
Get text height.
| size | size |
Definition at line 53 of file gsd_fonts.c.
Referenced by gsd_north_arrow(), gsd_put_legend(), and gsd_scalebar().
Get text width.
| s | text string |
| size | size |
Definition at line 36 of file gsd_fonts.c.
Referenced by gs_put_label(), gsd_north_arrow(), gsd_put_legend(), and gsd_scalebar().
Get z-up vector (z-direction)
| gv | view (geoview) |
| up | up vector |
Definition at line 240 of file gsd_views.c.
References FROM, GS_v3dir(), TO, X, Y, and Z.
Referenced by gsd_set_view().
ADD.
Definition at line 1217 of file gsd_surf.c.
Referenced by GS_get_fencecolor(), and GS_transp_is_set().
Get image of current GL screen.
| pixbuf | data buffer | |
| [out] | xsize,ysize | picture dimension |
Definition at line 902 of file gsd_prim.c.
References b, G_malloc, l, r, and t.
Referenced by GS_write_ppm(), and GS_write_tif().
Get shaded model.
Definition at line 438 of file gsd_prim.c.
Referenced by gsd_3darrow(), gsd_box(), gsd_cube(), and gsd_diamond().
Get viewport.
| [out] | window | |
| viewport | ||
| modelMatrix | model matrix | |
| projMatrix | projection matrix |
Definition at line 554 of file gsd_prim.c.
References border, gsd_do_scale(), gsd_popmatrix(), and gsd_pushmatrix().
Referenced by gpd_2dsite(), gpd_3dsite(), gsd_surf_const(), gsd_surf_map(), gsd_surf_map_old(), gvld_isosurf(), and gvld_slices().
Line on surface, fix z-values.
| gs | surface (geosurf) |
| v1 | first point (X,Y) |
| v2 | second point (X,Y) |
Definition at line 171 of file gsd_objs.c.
References FUDGE, gsd_bgnline(), gsd_endline(), gsd_vert_func(), gsdrape_get_segments(), and Z.
Referenced by GS_draw_line_onsurf(), gsd_arrow_onsurf(), and gsd_x().
Set width of rasterized lines.
| n | line width |
Definition at line 267 of file gsd_prim.c.
Referenced by gk_draw_path(), gpd_2dsite(), gpd_3dsite(), GS_draw_line_onsurf(), GS_draw_nline_onsurf(), GS_draw_X(), gsd_arrow_onsurf(), gsd_bgn_legend_viewport(), gsd_display_fringe(), gsd_get_los(), gsd_scalebar_v2(), gvd_vect(), gvld_wind3_box(), and gvld_wire_slices().
Set the current normal vector & specify vertex.
| norm | normal vector |
| col | color value |
| pt | point (model coordinates) |
Definition at line 657 of file gsd_prim.c.
References gsd_color_func().
Referenced by gsd_box(), gsd_coarse_surf_map(), gsd_cube(), gsd_diamond(), gsd_ortho_wall(), gsd_surf_const(), gsd_surf_map(), gsd_surf_map_old(), gsd_triangulated_wall(), gvld_isosurf(), and gvld_slice().
ADD.
| norm | |
| col | [unused] |
| pt |
Definition at line 673 of file gsd_prim.c.
Referenced by primitive_cone(), and primitive_cylinder().
ADD.
| num |
Definition at line 153 of file gsd_legend.c.
Referenced by gsd_get_nice_range().
ADD.
First time called, gets a bunch of objects, then hands them back when needed
Definition at line 1094 of file gsd_prim.c.
References MAX_OBJS.
Referenced by gsd_3darrow(), and gsd_put_legend().
Convert model to real coordinates.
| [in,out] | point | 3d point (x,y,z) |
Definition at line 393 of file gsd_views.c.
References GS_get_region(), GS_get_scale(), GS_get_zrange(), max, min, X, Y, and Z.
Referenced by GS_get_from_real(), and Gs_save_3dview().
Convert model to surface coordinates.
| gs | surface (geosurf) |
| point | 3d point (Point3) |
Definition at line 414 of file gsd_views.c.
References GS_get_scale(), GS_get_zrange(), max, min, X, Y, and Z.
Multiline on surface, fix z-values.
Like above, except only draws first n points of line, or np, whichever is less. Returns number of points used. Fills pt with last pt drawn.
| gs | surface (geosurf) | |
| v1 | Pointer to a float array representing the first point as a vector. | |
| v2 | Pointer to a float array representing the second point as a vector. | |
| [out] | pt | |
| [in] | n | number of segments |
Definition at line 216 of file gsd_objs.c.
References FUDGE, gsd_bgnline(), gsd_endline(), gsd_vert_func(), gsdrape_get_segments(), X, Y, and Z.
Referenced by GS_draw_nline_onsurf().
ADD.
Need to do Zexag scale of normal for arrow direction, drawing routine unexags z for arrow
| surf | surface (geosurf) |
Definition at line 1805 of file gsd_surf.c.
References ATT_COLOR, ATT_TOPO, BM_get(), CM_COLOR, CM_DIFFUSE, CONST_ATT, DEBUG_ARROW, FNORM, G_debug(), GET_MAPATT, GS_check_cancel(), gs_get_att_typbuff(), GS_get_scale(), GS_global_exag(), gs_mapcolor(), gs_update_curmask(), gsd_3darrow(), gsd_arrow(), gsd_colormode(), gsd_do_scale(), gsd_popmatrix(), gsd_pushmatrix(), gsd_translate(), MAP_ATT, VCOLS, VROWS, X, Y, and Z.
Referenced by gsd_surf().
| int gsd_north_arrow | ( | float * | pos2, |
| float | len, | ||
| GLuint | fontbase, | ||
| unsigned long | arw_clr, | ||
| unsigned long | text_clr | ||
| ) |
Draw North Arrow.
Takes OpenGL coords and size
| pos2 | Pointer to a float array representing the position as a 3D vector (X,Y,Z). |
| len | |
| fontbase | |
| arw_clr | north arrow color |
| text_clr | text color |
Store arrow somewhere to enable it's removal/change.
Add option to specify north text and font.
Definition at line 851 of file gsd_objs.c.
References GS_done_draw(), GS_set_draw(), gsd_bgnpolygon(), gsd_color_func(), gsd_do_scale(), gsd_endpolygon(), gsd_flush(), GSD_FRONT, gsd_get_txtheight(), gsd_get_txtwidth(), gsd_popmatrix(), gsd_pushmatrix(), Ntop, X, Y, and Z.
Referenced by Nviz_draw_all(), and Nviz_draw_arrow().
ADD.
| np | |
| ns | |
| gsurfs | |
| points | |
| norm |
Definition at line 1323 of file gsd_surf.c.
References ATT_COLOR, CM_COLOR, CM_DIFFUSE, CONST_ATT, FC_ABOVE, FC_BELOW, FC_GREY, G_debug(), GS_check_cancel(), gs_get_att_typbuff(), GS_set_draw(), gsd_bgntmesh(), gsd_blend(), GSD_BOTH, gsd_colormode(), gsd_do_scale(), gsd_endtmesh(), gsd_litvert_func(), gsd_popmatrix(), gsd_pushmatrix(), gsd_zwritemask(), MAP_ATT, MAX_SURFS, segs_intersect(), SET_SCOLOR, X, Y, and Z.
Referenced by gsd_wall().
Draws a plus sign symbol at the specified center location.
This function renders a plus sign ('+') symbol at the given center coordinates with the specified color and size.
| center | Pointer to a float array representing the (x, y, z) coordinates of the center point. |
| colr | Integer representing the color to use for drawing the symbol. |
| siz | Size of the symbol. |
Definition at line 134 of file gsd_objs.c.
References gsd_bgnline(), gsd_color_func(), gsd_endline(), gsd_vert_func(), X, Y, and Z.
Pop the current matrix stack.
Definition at line 501 of file gsd_prim.c.
Referenced by gpd_2dsite(), gpd_3dsite(), gpd_obj(), GS_draw_lighting_model(), GS_draw_lighting_model1(), GS_draw_line_onsurf(), GS_draw_nline_onsurf(), GS_draw_X(), gsd_3darrow(), gsd_arrow(), gsd_bgn_legend_viewport(), gsd_box(), gsd_calllists(), gsd_coarse_surf_map(), gsd_cube(), gsd_diamond(), gsd_draw_asterisk(), gsd_draw_box(), gsd_draw_cplane(), gsd_draw_gyro(), gsd_end_legend_viewport(), gsd_fringe_horiz_line(), gsd_fringe_horiz_line2(), gsd_fringe_horiz_poly(), gsd_fringe_vert_line(), gsd_fringe_vert_poly(), gsd_getwindow(), gsd_norm_arrows(), gsd_north_arrow(), gsd_ortho_wall(), gsd_scalebar(), gsd_scalebar_v2(), gsd_surf_const(), gsd_surf_map(), gsd_surf_map_old(), gsd_triangulated_wall(), gsd_wire_arrows(), gsd_wire_surf_const(), gsd_wire_surf_map(), gvd_vect(), gvld_isosurf(), gvld_slices(), gvld_wind3_box(), and gvld_wire_slices().
Push the current matrix stack.
Definition at line 511 of file gsd_prim.c.
Referenced by gpd_2dsite(), gpd_3dsite(), gpd_obj(), GS_draw_lighting_model(), GS_draw_lighting_model1(), GS_draw_line_onsurf(), GS_draw_nline_onsurf(), GS_draw_X(), GS_set_Narrow(), gsd_3darrow(), gsd_arrow(), gsd_bgn_legend_viewport(), gsd_box(), gsd_calllists(), gsd_coarse_surf_map(), gsd_cube(), gsd_diamond(), gsd_draw_asterisk(), gsd_draw_box(), gsd_draw_cplane(), gsd_draw_gyro(), gsd_fringe_horiz_line(), gsd_fringe_horiz_line2(), gsd_fringe_horiz_poly(), gsd_fringe_vert_line(), gsd_fringe_vert_poly(), gsd_getwindow(), gsd_norm_arrows(), gsd_north_arrow(), gsd_ortho_wall(), gsd_scalebar(), gsd_scalebar_v2(), gsd_surf_const(), gsd_surf_map(), gsd_surf_map_old(), gsd_triangulated_wall(), gsd_wire_arrows(), gsd_wire_surf_const(), gsd_wire_surf_map(), gvd_vect(), gvld_isosurf(), gvld_slices(), gvld_wind3_box(), and gvld_wire_slices().
| GLuint gsd_put_legend | ( | const char * | name, |
| GLuint | fontbase, | ||
| int | size, | ||
| int * | flags, | ||
| float * | rangef, | ||
| int * | pt | ||
| ) |
Put legend.
| name | |
| fontbase | font-base |
| size | |
| flags | |
| rangef | |
| pt |
???
Definition at line 201 of file gsd_legend.c.
References _, do_label_display(), G_find_raster2(), G_free(), G_malloc, G_warning(), get_txtxoffset(), gsd_bgn_legend_viewport(), gsd_bgnline(), gsd_bgnlist(), gsd_color_func(), gsd_end_legend_viewport(), gsd_endline(), gsd_endlist(), gsd_get_nice_range(), gsd_get_txtheight(), gsd_get_txtwidth(), gsd_makelist(), max, MAX_LEGEND, min, name, NULL, Rast_free_cats(), Rast_free_colors(), Rast_get_c_cat(), Rast_get_c_color(), Rast_get_d_cat(), Rast_get_d_color(), Rast_get_fp_range_min_max(), Rast_get_range_min_max(), Rast_map_is_fp(), Rast_read_cats(), Rast_read_colors(), Rast_read_fp_range(), Rast_read_range(), RGB_TO_INT, st, X, Y, and Z.
Referenced by GS_draw_legend().
Convert real to model coordinates.
| [in,out] | point | 3d point (Point3) |
Definition at line 373 of file gsd_views.c.
References GS_get_region(), GS_get_scale(), GS_get_zrange(), max, min, X, Y, and Z.
Referenced by GS_moveto_real().
Convert real to surface coordinates.
| gs | surface (geosurf) | |
| [in,out] | point | 3d point (Point3) |
Definition at line 481 of file gsd_views.c.
Referenced by GS_get_cat_at_xy(), GS_get_distance_alongsurf(), GS_get_norm_at_xy(), and GS_get_val_at_xy().
Remove all labels from display list.
Definition at line 107 of file gsd_label.c.
References label_base, label_id, and MAX_LIST.
ADD.
| angle | |
| axis |
Definition at line 605 of file gsd_prim.c.
References _, G_warning(), and x.
Referenced by gsd_3darrow(), gsd_arrow(), gsd_draw_asterisk(), gsd_draw_cplane(), and gsd_draw_gyro().
Multiply the current matrix by a general scaling matrix.
| xs | x scale value |
| ys | y scale value |
| zs | z scale value |
Definition at line 525 of file gsd_prim.c.
Referenced by gpd_obj(), GS_draw_lighting_model1(), gsd_3darrow(), gsd_arrow(), gsd_box(), gsd_cube(), gsd_diamond(), gsd_do_scale(), gsd_draw_asterisk(), gsd_draw_box(), gsd_draw_cplane(), and gsd_draw_gyro().
| int gsd_scalebar | ( | float * | pos2, |
| float | len, | ||
| GLuint | fontbase, | ||
| unsigned long | bar_clr, | ||
| unsigned long | text_clr | ||
| ) |
Draw Scalebar takes OpenGL coords and size.
Adapted from gsd_north_arrow Hamish Bowman Dec 2006
| pos2 | Pointer to a float array representing the scalebar position as a 3D vector (X,Y,Z). |
| len | |
| fontbase | font-base |
| bar_clr | barscale color. Integer representing the color to use for the barscale. |
| text_clr | test color. Integer representing the color to use for the text. |
Definition at line 1193 of file gsd_objs.c.
References G_database_unit_name(), GS_done_draw(), GS_set_draw(), gsd_bgnpolygon(), gsd_color_func(), gsd_do_scale(), gsd_endpolygon(), gsd_flush(), GSD_FRONT, gsd_get_txtheight(), gsd_get_txtwidth(), gsd_popmatrix(), gsd_pushmatrix(), Ntop, TRUE, X, Y, and Z.
| int gsd_scalebar_v2 | ( | float * | pos, |
| float | len, | ||
| GLuint | fontbase, | ||
| unsigned long | bar_clr, | ||
| unsigned long | text_clr | ||
| ) |
Draw Scalebar (as lines)
Adapted from gsd_scalebar A.Kratochvilova 2011
| pos | Pointer to a float array representing the scalebar position as a 3D vector (X,Y,Z). |
| len | |
| fontbase | font-base (unused) |
| bar_clr | barscale color. Integer representing the color to use for the barscale. |
| text_clr | Text color (unused). Integer representing the color to use for the text. |
Definition at line 1282 of file gsd_objs.c.
References GS_done_draw(), GS_set_draw(), gsd_bgnline(), gsd_color_func(), gsd_do_scale(), gsd_endline(), gsd_flush(), GSD_FRONT, gsd_linewidth(), gsd_popmatrix(), gsd_pushmatrix(), gsd_vert_func(), Ntop, X, Y, and Z.
Referenced by Nviz_draw_all(), and Nviz_draw_scalebar().
Set clip plane.
| num | |
| able |
Definition at line 1041 of file gsd_prim.c.
Referenced by gsd_cplane_off(), gsd_cplane_on(), gsd_draw_cplane(), and gsd_draw_cplane_fence().
Set material.
| set_shin,set_emis | flags |
| sh,em | should be 0. - 1. |
| emcolor | packed colors to use for emission |
Definition at line 803 of file gsd_prim.c.
Referenced by gsd_coarse_surf_map(), gsd_surf_map(), gsd_surf_map_old(), gvld_isosurf(), gvld_slices(), and gvld_wire_slices().
| void gsd_set_view | ( | geoview * | gv, |
| geodisplay * | gd | ||
| ) |
Set view.
Establishes viewing & projection matrices
| gv | view (geoview) |
| gd | display (geodisplay) |
Definition at line 146 of file gsd_views.c.
References FROM, GS_get_aspect(), gs_get_datacenter(), gsd_check_focus(), gsd_get_zup(), gsd_surf2model(), gsd_update_cplanes(), TO, X, Y, and Z.
Referenced by GS_ready_draw(), GS_set_focus(), GS_set_focus_real(), and GS_set_viewdir().
Set shaded model.
| shade | non-zero for GL_SMOOTH otherwise GL_FLAT |
Definition at line 419 of file gsd_prim.c.
Referenced by GS_draw_lighting_model(), GS_draw_lighting_model1(), GS_draw_surf(), gsd_3darrow(), gsd_box(), gsd_cube(), gsd_diamond(), gvld_isosurf(), gvld_slices(), gvld_wind3_box(), and gvld_wire_slices().
ADD.
| center | center-point |
| siz | size value |
Definition at line 207 of file gsd_prim.c.
Referenced by gpd_obj(), and gsd_drawsphere().
ADD.
| surf | surface (geosurf) |
Definition at line 80 of file gsd_surf.c.
References ATT_TOPO, CONST_ATT, FUNC_ATT, G_debug(), gs_calc_normals(), gs_get_att_src(), gsd_norm_arrows(), gsd_surf_const(), gsd_surf_func(), gsd_surf_map(), MAP_ATT, and NOTSET_ATT.
Referenced by GS_draw_surf().
Convert surface to model coordinates.
| point | 3d point (Point3) |
Definition at line 442 of file gsd_views.c.
References GS_get_scale(), GS_get_zrange(), max, min, X, Y, and Z.
Referenced by gsd_set_view().
Convert surface to real coordinates.
| gs | surface (geosurf) | |
| [in,out] | point | 3d point (Point3) |
Definition at line 465 of file gsd_views.c.
Referenced by GS_draw_nline_onsurf(), and GS_get_selected_point_on_surface().
Using tmesh - not confident with qstrips portability.
| surf | surface (geosurf) |
| k |
Definition at line 729 of file gsd_surf.c.
References ATT_COLOR, ATT_TRANSP, BM_get(), CM_DIFFUSE, CONST_ATT, G_debug(), GS_check_cancel(), gs_get_att_typbuff(), GS_get_scale(), gs_mapcolor(), gs_update_curmask(), gsd_bgnpolygon(), gsd_bgntmesh(), gsd_blend(), gsd_checkpoint(), gsd_colormode(), gsd_do_scale(), gsd_endpolygon(), gsd_endtmesh(), gsd_getwindow(), gsd_litvert_func(), gsd_popmatrix(), gsd_pushmatrix(), gsd_translate(), gsd_zwritemask(), gsdiff_do_SD(), gsdiff_get_SDref(), MAP_ATT, NULL, VCOLS, VROWS, X, Y, and Z.
Referenced by gsd_coarse_surf_map(), gsd_surf(), gsd_surf_map(), and gsd_surf_map_old().
Define user function.
Not yet supported
| gs | surface (geosurf) [unused] |
| user_func | user function [unused] |
Definition at line 1090 of file gsd_surf.c.
Referenced by gsd_surf().
Draw surface using triangle fan instead of strip.
Optimized by getting rid of BM_get mask check - GET_MAPPATT does same and returns zero if masked
Only do in window check on Fan center(v0) to further optimize – this runs the risk of trimming points in view !!
| surf | surface (geosurf) |
Definition at line 2061 of file gsd_surf.c.
References ATT_COLOR, ATT_EMIT, ATT_SHINE, ATT_TOPO, ATT_TRANSP, CM_DIFFUSE, CONST_ATT, FNORM, GET_MAPATT, GS_check_cancel(), gs_get_att_typbuff(), GS_get_scale(), GS_global_exag(), gs_mapcolor(), gs_update_curmask(), gsd_bgntfan(), gsd_blend(), gsd_checkpoint(), gsd_colormode(), gsd_do_scale(), gsd_endtfan(), gsd_getwindow(), gsd_litvert_func(), gsd_popmatrix(), gsd_pushmatrix(), gsd_set_material(), gsd_surf_const(), gsd_translate(), gsd_zwritemask(), MAP_ATT, SCALE_ATT, VCOLS, VROWS, X, Y, and Z.
Referenced by gsd_surf().
Switch light on/off.
| num | |
| on | 1 for 'on', 0 turns them off |
Definition at line 877 of file gsd_prim.c.
Referenced by GS_lights_off(), GS_lights_on(), GS_new_light(), and GS_switchlight().
Multiply the current matrix by a translation matrix.
| dx | x translation value |
| dy | y translation value |
| dz | z translation value |
Definition at line 539 of file gsd_prim.c.
Referenced by gpd_2dsite(), GS_draw_line_onsurf(), GS_draw_nline_onsurf(), GS_draw_X(), gsd_3darrow(), gsd_arrow(), gsd_box(), gsd_coarse_surf_map(), gsd_cube(), gsd_diamond(), gsd_do_scale(), gsd_draw_asterisk(), gsd_draw_box(), gsd_draw_cplane(), gsd_draw_gyro(), gsd_fringe_horiz_line(), gsd_fringe_horiz_line2(), gsd_fringe_horiz_poly(), gsd_fringe_vert_line(), gsd_fringe_vert_poly(), gsd_norm_arrows(), gsd_surf_const(), gsd_surf_map(), gsd_surf_map_old(), gsd_wire_arrows(), gsd_wire_surf_const(), gsd_wire_surf_map(), gvd_vect(), gvld_isosurf(), gvld_slices(), gvld_wind3_box(), and gvld_wire_slices().
| int gsd_triangulated_wall | ( | int | npts1, |
| int | npts2, | ||
| geosurf * | surf1, | ||
| geosurf * | surf2, | ||
| Point3 * | points1, | ||
| Point3 * | points2, | ||
| float * | norm | ||
| ) |
ADD.
| npts1 | |
| npts2 | |
| surf1 | first surface (geosurf) |
| surf2 | second surface (geosurf) |
| points1 | |
| points2 | |
| norm |
Definition at line 1109 of file gsd_surf.c.
References ATT_COLOR, CM_DIFFUSE, CONST_ATT, gs_get_att_typbuff(), gs_mapcolor(), gsd_bgntmesh(), gsd_colormode(), gsd_do_scale(), gsd_endtmesh(), gsd_litvert_func(), gsd_popmatrix(), gsd_pushmatrix(), MAP_ATT, X, XY2OFF, Y, and Z.
Update cplaces.
Called when viewing matrix changes
Definition at line 86 of file gsd_cplane.c.
References gsd_def_cplane(), and MAX_CPLANES.
Referenced by gsd_set_view().
ADD.
| num |
Definition at line 188 of file gsd_cplane.c.
References P_popmatrix(), P_pushmatrix(), P_rot(), P_transform(), W, X, Y, and Z.
Referenced by gsd_cplane_setrot().
ADD.
| pt |
Definition at line 686 of file gsd_prim.c.
Referenced by gk_draw_path(), gsd_3dcursor(), gsd_arrow(), gsd_diamond_lines(), gsd_draw_box(), gsd_draw_cplane(), gsd_draw_gyro(), gsd_fringe_horiz_line(), gsd_fringe_horiz_line2(), gsd_fringe_horiz_poly(), gsd_fringe_vert_line(), gsd_fringe_vert_poly(), gsd_line_onsurf(), gsd_nline_onsurf(), gsd_plus(), gsd_scalebar_v2(), gsd_wire_surf_const(), gsd_wire_surf_map(), gsd_x(), gvd_draw_lineonsurf(), gvd_vect(), gvld_wind3_box(), and gvld_wire_slices().
Set the viewport.
l, b specify the lower left corner of the viewport rectangle, in pixels.
r, t specify the width and height of the viewport.
| l | left |
| r | right |
| b | bottom |
| t | top |
Definition at line 1077 of file gsd_prim.c.
Referenced by GS_set_viewport().
ADD.
bgn,end should already be in world modeling coords, but have to be reverse-translated to apply to each surface
| bgn,end | 2d line for cutting plane |
| norm | indicates which way wall faces |
Definition at line 1710 of file gsd_surf.c.
References _, err(), FC_OFF, G_calloc, G_free(), G_warning(), gs_getall_surfaces(), GS_v3eq(), gsd_ortho_wall(), gsdrape_get_allsegments(), MAX_SURFS, X, Y, and Z.
Referenced by gsd_draw_cplane_fence().
ADD.
Need to do Zexag scale of normal for arrow direction, drawing routine unexags z for arrow
| surf | surface (geosurf) |
Definition at line 457 of file gsd_wire.c.
References ATT_COLOR, ATT_TOPO, BM_get(), CM_COLOR, CM_DIFFUSE, CONST_ATT, FNORM, G_debug(), GET_MAPATT, gs_get_att_typbuff(), GS_get_scale(), GS_global_exag(), gs_mapcolor(), gs_update_curmask(), gsd_arrow(), gsd_colormode(), gsd_do_scale(), gsd_popmatrix(), gsd_pushmatrix(), gsd_translate(), MAP_ATT, X, Y, and Z.
Draw surface wire.
| surf | surface (geosurf) |
Definition at line 46 of file gsd_wire.c.
References ATT_TOPO, CONST_ATT, DM_GRID_WIRE, FUNC_ATT, G_debug(), gs_get_att_src(), gsd_coarse_surf_map(), gsd_wire_surf_const(), gsd_wire_surf_func(), gsd_wire_surf_map(), MAP_ATT, and NOTSET_ATT.
Referenced by GS_alldraw_wire(), GS_draw_surf(), and GS_draw_wire().
ADD.
| surf | surface (geosurf) |
| k |
Definition at line 276 of file gsd_wire.c.
References ATT_COLOR, BM_get(), CM_COLOR, CM_DIFFUSE, CONST_ATT, G_debug(), gs_get_att_typbuff(), gs_mapcolor(), gs_update_curmask(), gsd_bgnline(), gsd_color_func(), gsd_colormode(), gsd_do_scale(), gsd_endline(), gsd_popmatrix(), gsd_pushmatrix(), gsd_translate(), gsd_vert_func(), gsdiff_do_SD(), gsdiff_get_SDref(), MAP_ATT, NULL, WC_COLOR_ATT, X, Y, and Z.
Referenced by gsd_wire_surf().
ADD.
Not yet implemented.
| gs | surface (geosurf) [unused] |
| user_func | user defined function [unused] |
Definition at line 442 of file gsd_wire.c.
Referenced by gsd_wire_surf().
ADD.
| surf | surface (geosurf) |
Definition at line 99 of file gsd_wire.c.
References ATT_COLOR, ATT_TOPO, BM_get(), CM_COLOR, CM_DIFFUSE, CONST_ATT, G_debug(), GET_MAPATT, gs_get_att_typbuff(), gs_mapcolor(), gs_update_curmask(), gsd_bgnline(), gsd_color_func(), gsd_colormode(), gsd_do_scale(), gsd_endline(), gsd_popmatrix(), gsd_pushmatrix(), gsd_translate(), gsd_vert_func(), MAP_ATT, WC_COLOR_ATT, X, Y, and Z.
Referenced by gsd_wire_surf().
Write view.
| pixbuf | data buffer |
| xsize,ysize | picture dimension |
Definition at line 969 of file gsd_prim.c.
References G_malloc.
Referenced by GS_write_zoom().
Draws a X symbol at the specified center location.
This function renders a x ('X') symbol at the given center coordinates with the specified color and size.
Note gs: NULL if flat
| gs | surface (geosurf) |
| center | Pointer to a float array representing the (x, y, z) coordinates of the center point. |
| colr | Integer representing the color to use for drawing the symbol. |
| siz | Size of the symbol. |
Definition at line 263 of file gsd_objs.c.
References gsd_bgnline(), gsd_color_func(), gsd_endline(), gsd_line_onsurf(), gsd_vert_func(), X, Y, and Z.
Referenced by gk_draw_path(), and gpd_obj().
Write out z-mask.
Enable or disable writing into the depth buffer
| n | Specifies whether the depth buffer is enabled for writing |
Definition at line 241 of file gsd_prim.c.
Referenced by gk_draw_path(), GS_draw_lighting_model(), GS_draw_lighting_model1(), gsd_coarse_surf_map(), gsd_display_fringe(), gsd_draw_cplane(), gsd_ortho_wall(), gsd_surf_const(), gsd_surf_map(), gsd_surf_map_old(), gvld_isosurf(), gvld_slice(), and gvld_slices().
ADD.
| val | |
| offset |
Definition at line 94 of file gsdiff.c.
References GET_MAPATT.
Referenced by gs_get_att_typbuff(), gsd_surf_const(), and gsd_wire_surf_const().
ADD.
Definition at line 77 of file gsdiff.c.
References NULL.
Referenced by gs_get_att_typbuff(), GS_get_SDsurf(), gsd_surf_const(), and gsd_wire_surf_const().
Get scale.
Definition at line 54 of file gsdiff.c.
Referenced by GS_get_SDscale().
ADD.
| gsref |
Definition at line 64 of file gsdiff.c.
References ATT_TOPO, and gs_get_att_typbuff().
Referenced by GS_set_SDsurf(), and GS_unset_SDsurf().
Set scale.
| scale | value |
Definition at line 42 of file gsdiff.c.
Referenced by GS_set_SDscale().
Get all segments.
| gs | surface (geosurf) | |
| [in,out] | bgn | begin point |
| [in,out] | end | end point |
| [out] | num |
Definition at line 400 of file gsdrape.c.
References ATT_TOPO, CONST_ATT, gs_get_att_src(), GS_v3eq(), gsdrape_set_surface(), interp_first_last(), l, NULL, seg_intersect_vregion(), X, and Y.
Referenced by gs_los_intersect(), and gsd_wall().
ADD.
| gs | surface (geosurf) | |
| [in,out] | bgn | begin point (x,y) |
| [in,out] | end | end point (x,y) |
| [out] | num |
Definition at line 350 of file gsdrape.c.
References ATT_TOPO, CONST_ATT, gs_get_att_src(), GS_v3eq(), gsdrape_set_surface(), interp_first_last(), l, NULL, seg_intersect_vregion(), X, Y, and Z.
Referenced by gs_distance_onsurf(), gsd_line_onsurf(), gsd_nline_onsurf(), gvd_draw_lineonsurf(), and gvd_vect().
ADD.
| gs | surface (geosurf) |
Definition at line 198 of file gsdrape.c.
References _, ATT_TOPO, G_warning(), gs_get_att_typbuff(), and NULL.
Referenced by gsdrape_get_allsegments(), and gsdrape_get_segments().
Allocates correct buffer according to type, keeps track of total mem.
| id | dataset id |
| dims | array of dimensions |
| ndims | number of dimensions |
| type | data type |
Definition at line 480 of file gsds.c.
References ATTY_CHAR, ATTY_FLOAT, ATTY_INT, ATTY_MASK, ATTY_NULL, ATTY_SHORT, typbuff::bm, BM_create(), BM_get_map_size(), typbuff::cb, dataset::changed, dataset::databuff, dataset::dims, typbuff::fb, G_debug(), G_malloc, typbuff::ib, dataset::ndims, dataset::need_reload, typbuff::nm, NULL, dataset::numbytes, and typbuff::sb.
Referenced by gs_malloc_att_buff().
Free allocated buffer.
| id | dataset id |
| typ | data type |
Definition at line 369 of file gsds.c.
References free_data_buffs().
Referenced by GS_load_att_map().
Free allocated dataset.
| id |
Definition at line 329 of file gsds.c.
References ATTY_ANY, free_data_buffs(), G_debug(), G_free(), and NULL.
Referenced by gs_free_unshared_buffs(), and gs_set_att_src().
ADD.
| id |
Definition at line 613 of file gsds.c.
References dataset::changed.
Referenced by Gs_update_attrange().
Get name.
| id |
Definition at line 303 of file gsds.c.
References GPATH_MAX, NULL, and strcpy.
Referenced by GS_get_att(), and GS_get_cat_at_xy().
Referenced by gs_get_att_typbuff(), and Gs_update_attrange().
Referenced by GS_load_att_map().
Draw all loaded vector sets (fast mode)
Definition at line 548 of file gv2.c.
References GV_draw_fastvect().
Draw all loaded vector sets.
Definition at line 506 of file gv2.c.
References GV_draw_vect().
Referenced by gk_follow_frames(), GK_show_vect(), Nviz_draw_all_vect(), and Nviz_draw_quick().
Decimate line.
strategy here: if line has more than average number of points, decimate by eliminating points, otherwise decimate by eliminating shorter lines
| gv | vector (geovect) |
Definition at line 231 of file gv_quick.c.
References G_debug(), gln_num_points(), gv_line_length(), gv_num_points(), MFAST_LNS, g_line::next, NULL, and TFAST_PTS.
Referenced by gvd_vect().
Delete vector set (unload)
| id | vector set id |
Definition at line 242 of file gv.c.
References G_debug(), gv_free_vect(), and gv_get_vect().
Referenced by GV_delete_vector().
Delete vector set from list.
| id | vector set id |
Definition at line 129 of file gv2.c.
References G_debug(), gv_delete_vect(), and GV_vect_exists().
Referenced by Nviz_new_map_obj().
Draw vector set (fast mode)
| vid | vector set id |
Definition at line 524 of file gv2.c.
References gs_get_surf(), gv_get_vect(), and gvd_vect().
Referenced by GV_alldraw_fastvect().
Draw vector set.
| vid | vector set id |
Definition at line 482 of file gv2.c.
References gs_get_surf(), gv_get_vect(), and gvd_vect().
Referenced by GV_alldraw_vect().
Free allocated memory for geovect struct.
| fv | pointer to geovect struct |
Definition at line 265 of file gv.c.
References G_debug(), G_free(), gv_free_vectmem(), and NULL.
Referenced by gv_delete_vect().
Free allocated memory.
| fv | pointer to geovect struct |
Definition at line 313 of file gv.c.
References G_free(), NULL, and sub_Vectmem().
Referenced by gv_free_vect(), and GV_load_vector().
Get client data.
| id | vector set id |
Definition at line 590 of file gv2.c.
References gv_get_vect(), and NULL.
Get last loaded vector set.
Definition at line 96 of file gv.c.
References G_debug(), and NULL.
Referenced by gv_get_new_vect().
Allocate memory for new vector set.
Definition at line 118 of file gv.c.
References FIRST_VECT_ID, G_debug(), G_malloc, G_zero(), gv_get_last_vect(), and NULL.
Referenced by GV_new_vector().
Get previous vector set.
| id | vector set id |
Definition at line 57 of file gv.c.
References G_debug(), g_vect::gvect_id, g_vect::next, and NULL.
Get vector style.
| id | vector set id | |
| [out] | mem | non-zero for use memory |
| [out] | color | color value |
| [out] | width | line width |
| [out] | use_z | non-zero for 3d mode |
Definition at line 257 of file gv2.c.
References gv_get_vect(), and NULL.
Get trans ?
| id | vector set id | |
| [out] | xtrans,ytrans,ztrans | x/y/z trans values |
Definition at line 366 of file gv2.c.
References gv_get_vect().
Get vector set.
| id | vector set id |
Definition at line 34 of file gv.c.
References G_debug(), and NULL.
Referenced by gv_delete_vect(), GV_draw_fastvect(), GV_draw_vect(), GV_Get_ClientData(), GV_get_style(), GV_get_trans(), GV_get_vectname(), GV_load_vector(), GV_select_surf(), GV_Set_ClientData(), GV_set_style(), GV_set_style_thematic(), GV_set_trans(), GV_surf_is_selected(), GV_unselect_surf(), GV_unset_style_thematic(), and GV_vect_exists().
Get line width.
| gln | line (geoline) |
Definition at line 173 of file gv_quick.c.
References GS_distance(), and GS_P2distance().
Referenced by gv_decimate_lines().
Load vector map to memory.
The other alternative may be to load to a tmp file
| grassname | vector map name | |
| [out] | nlines | number of loaded features |
Definition at line 47 of file gv3.c.
References _, Cell_head::east, G_calloc, G_debug(), G_find_vector2(), G_free(), G_fully_qualified_name(), G_get_set_window(), G_malloc, G_message(), G_warning(), GS_v3cross(), GV_FACE, GV_LINES, line_pnts::n_points, g_line::next, Cell_head::north, NULL, OGSF_LINE, OGSF_POLYGON, PORT_DOUBLE_MAX, Cell_head::south, Cell_head::top, Vect_close(), Vect_get_area_points(), Vect_get_num_areas(), Vect_is_3d(), Vect_new_cats_struct(), Vect_new_line_struct(), Vect_open_old(), Vect_read_next_line(), Vect_reset_cats(), Vect_set_constraint_region(), Vect_set_open_level(), Cell_head::west, X, line_pnts::x, Y, line_pnts::y, Z, and line_pnts::z.
Referenced by GV_load_vector().
Load styles for geolines based on thematic mapping.
| gv | pointer to geovect structure |
| colors | pointer to Colors structure or NULL |
Definition at line 319 of file gv3.c.
References _, BLU_MASK, db_get_value_int(), db_get_value_string(), db_select_value(), db_start_driver_open_database(), field_info::driver, G_fatal_error(), G_find_vector2(), G_fully_qualified_name(), G_malloc, G_message(), G_str_to_color(), G_warning(), G_zero(), GRN_MASK, Rast_get_c_color(), RED_MASK, Vect_cat_get(), Vect_get_field(), Vect_open_old(), and Vect_set_open_level().
Referenced by GV_set_style_thematic().
Load vector set.
Check to see if handle already loaded, if so - free before loading new for now, always load to memory
| id | vector set id |
| filename | filename |
Definition at line 172 of file gv2.c.
References G_store(), gv_free_vectmem(), gv_get_vect(), Gv_load_vect(), and NULL.
Referenced by Nviz_new_map_obj().
Register new vector set.
Definition at line 61 of file gv2.c.
References G_debug(), gv_get_new_vect(), gv_set_defaults(), and MAX_VECTS.
Referenced by Nviz_new_map_obj().
Get number of points in vector.
| gv | vector (geovect) |
Definition at line 216 of file gv_quick.c.
References gln_num_points().
Referenced by gv_decimate_lines().
Get number of available vector sets.
Definition at line 84 of file gv2.c.
References gv_num_vects().
Referenced by Nviz_new_map_obj().
Get number of loaded vector sets.
Definition at line 77 of file gv.c.
References G_debug().
Referenced by GV_num_vects().
Select surface identified by hs to have vector identified by hv draped over it.
| hv | vector set id |
| hs | surface id |
Definition at line 393 of file gv2.c.
References GS_surf_exists(), gv_get_vect(), and GV_surf_is_selected().
Referenced by Nviz_new_map_obj().
Set client data.
| id | vector set id |
| clientd | pointer to client data |
Definition at line 568 of file gv2.c.
References gv_get_vect().
Set vector style.
| id | vector set id |
| mem | non-zero for use memory |
| color | color value |
| width | line width |
| use_z | non-zero for 3d mode |
Definition at line 229 of file gv2.c.
References gv_get_vect(), and NULL.
Referenced by Nviz_new_map_obj().
| int GV_set_style_thematic | ( | int | id, |
| int | layer, | ||
| const char * | color, | ||
| const char * | width, | ||
| struct Colors * | color_rules | ||
| ) |
Set vector set style for thematic mapping.
Updates also style for each geoline.
| id | vector set id |
| layer | layer number for thematic mapping |
| color | color column name |
| width | width column name |
| color_rules | pointer to Colors structure or NULL |
Definition at line 287 of file gv2.c.
References G_malloc, G_store(), G_zero(), gv_get_vect(), Gv_load_vect_thematic(), and NULL.
Set trans ?
| id | vector set id |
| xtrans,ytrans,ztrans | x/y/z trans values |
Definition at line 343 of file gv2.c.
References G_debug(), and gv_get_vect().
Check if surface is selected.
| hv | vector set id |
| hs | surface id |
Definition at line 459 of file gv2.c.
References gv_get_vect().
Referenced by GV_select_surf(), and GV_unselect_surf().
Unselect surface.
| hv | vector set id |
| hs | surface id |
Definition at line 422 of file gv2.c.
References gv_get_vect(), and GV_surf_is_selected().
Make style for thematic mapping inactive.
| id | vector set id |
Definition at line 320 of file gv2.c.
References G_debug(), gv_get_vect(), and NULL.
Update drape surfaces.
Call after surface is deleted
Definition at line 157 of file gv.c.
References gs_get_surf(), and NULL.
Referenced by GS_delete_surface().
Check if vector set exists.
| id | vector set id |
Definition at line 36 of file gv2.c.
References G_debug(), gv_get_vect(), and NULL.
Referenced by GV_delete_vector().
Draw line on surface.
| gs | surface |
| bgn | first line point |
| end | end line point |
| color | color value |
Definition at line 299 of file gvd.c.
References gs_point_is_masked(), gsd_bgnline(), gsd_color_func(), gsd_endline(), gsd_vert_func(), and gsdrape_get_segments().
Draw vector set.
Need to think about translations - If user translates surface, vector should automatically go with it, but translating vector should translate it relative to surface on which it's displayed?
Handling mask checking here, but may be more appropriate to handle in get_drape_segments?
| gv | vector set |
| gs | surface |
| do_fast | non-zero for fast mode |
Definition at line 79 of file gvd.c.
References ATT_TOPO, CHK_FREQ, CM_COLOR, CONST_ATT, G_debug(), G_free(), G_malloc, GS_check_cancel(), gs_clip_segment(), gs_get_att_src(), GS_get_scale(), gs_get_zrange(), gs_point_is_masked(), gs_update_curmask(), gsd_bgnline(), gsd_color_func(), gsd_colormode(), gsd_do_scale(), gsd_endline(), gsd_linewidth(), gsd_popmatrix(), gsd_pushmatrix(), gsd_translate(), gsd_vert_func(), gsdrape_get_segments(), gv_decimate_lines(), MAP_ATT, NULL, OGSF_LINE, OGSF_POLYGON, X, Y, and Z.
Referenced by GV_draw_fastvect(), and GV_draw_vect().
Append data to buffer.
| pos | position index |
| data | data buffer |
Definition at line 777 of file gvl_calc.c.
References G_debug(), G_free(), G_realloc, and NULL.
Referenced by gvl_isosurf_calc(), and slice_calc().
Draw all volume sets.
Definition at line 447 of file gvl2.c.
References GVL_draw_vol().
Referenced by gk_follow_frames(), and GK_show_vol().
Draw all volume sets in wire mode.
Definition at line 461 of file gvl2.c.
References GVL_draw_wire().
Referenced by Nviz_draw_quick().
Delete volume set from list.
| id | volume set id |
Definition at line 210 of file gvl2.c.
References G_debug(), gvl_delete_vol(), GVL_isosurf_del(), GVL_isosurf_num_isosurfs(), GVL_slice_del(), GVL_slice_num_slices(), and GVL_vol_exists().
Referenced by Nviz_new_map_obj().
Remove volume set from list.
| id | volume set id |
Definition at line 244 of file gvl.c.
References G_debug(), gvl_free_vol(), and gvl_get_vol().
Referenced by GVL_delete_vol().
Draw volume set.
| vid | volume set id |
Definition at line 408 of file gvl2.c.
References gvl_get_vol(), gvld_vol(), and gvld_wind3_box().
Referenced by GVL_alldraw_vol(), and Nviz_draw_all_vol().
Draw volume in wire mode.
| id | volume set id |
Definition at line 429 of file gvl2.c.
References G_debug(), gvl_get_vol(), and gvld_wire_vol().
Referenced by GVL_alldraw_wire().
| int gvl_file_end_read | ( | geovol_file * | vf | ) |
End read - free buffer memory.
| vf | pointer to geovol_file struct |
Definition at line 1016 of file gvl_file.c.
References free_slice_buff(), free_vol_buff(), MODE_FULL, MODE_SLICE, and STATUS_READY.
Referenced by gvl_isosurf_calc(), and slice_calc().
Free geovol_file structure for given handle.
| id |
Definition at line 364 of file gvl_file.c.
References close_volfile(), free_volfile_buffs(), G_debug(), G_free(), and NULL.
Referenced by gvl_free_volmem(), and gvl_isosurf_set_att_src().
| int gvl_file_get_data_type | ( | geovol_file * | vf | ) |
Get data type for given handle.
| vf | pointer to geovol_file struct |
Definition at line 202 of file gvl_file.c.
Referenced by iso_get_cube_value(), and slice_get_value().
| int gvl_file_get_file_type | ( | geovol_file * | vf | ) |
Get file type for given handle.
| vf | pointer to geovol_file struct |
Definition at line 190 of file gvl_file.c.
| void gvl_file_get_min_max | ( | geovol_file * | vf, |
| double * | min, | ||
| double * | max | ||
| ) |
Get minimum and maximum value in volume file.
| vf | pointer to geovol_file struct | |
| [out] | min | min value |
| [out] | max | max value |
Definition at line 214 of file gvl_file.c.
Referenced by iso_get_range().
Get file name for given handle.
| id | handle id |
Definition at line 165 of file gvl_file.c.
References GPATH_MAX, NULL, and strcpy.
Referenced by GVL_get_volname(), GVL_isosurf_get_att(), gvl_slices_calc(), and gvld_isosurf().
Get value for volume file at x, y, z.
| vf | pointer to geovol_file struct | |
| x,y,z | ||
| [out] | value |
Definition at line 1050 of file gvl_file.c.
References get_direct_value(), get_slice_value(), get_vol_value(), MODE_DIRECT, MODE_FULL, MODE_PRELOAD, MODE_SLICE, STATUS_BUSY, and x.
Referenced by iso_get_cube_value(), and slice_get_value().
| geovol_file * gvl_file_get_volfile | ( | int | id | ) |
Get geovol_file structure for given handle.
| id |
Definition at line 117 of file gvl_file.c.
References NULL.
Referenced by gvl_isosurf_calc(), iso_get_cube_value(), iso_get_range(), slice_calc(), and slice_get_value().
| int gvl_file_is_null_value | ( | geovol_file * | vf, |
| void * | value | ||
| ) |
Check for null value.
| vf | pointer to geovol_file struct |
| value | data value |
Definition at line 1087 of file gvl_file.c.
References is_null_g3d_value(), and VOL_FTYPE_RASTER3D.
Referenced by iso_get_cube_value().
Referenced by gvl_isosurf_set_att_map(), and GVL_load_vol().
| int gvl_file_set_mode | ( | geovol_file * | , |
| IFLAG | |||
| ) |
Referenced by gvl_isosurf_calc(), and slice_calc().
| int gvl_file_set_slices_param | ( | geovol_file * | vf, |
| int | n, | ||
| int | b | ||
| ) |
Set parameters for slice reading.
| vf | pointer to geovol_file struct |
| n | |
| b |
Definition at line 1166 of file gvl_file.c.
References b, MODE_SLICE, and STATUS_BUSY.
| int gvl_file_start_read | ( | geovol_file * | vf | ) |
Start read - allocate memory buffer a read first data into buffer.
| vf | pointer to geovol_file struct |
Definition at line 965 of file gvl_file.c.
References alloc_slice_buff(), alloc_vol_buff(), MODE_FULL, MODE_SLICE, read_slice(), read_vol(), and STATUS_BUSY.
Referenced by gvl_isosurf_calc(), and slice_calc().
Free geovol struct.
| fvl | pointer to geovol struct |
Definition at line 267 of file gvl.c.
References G_debug(), G_free(), gvl_free_volmem(), and NULL.
Referenced by gvl_delete_vol().
Free geovol struct memory.
| fvl | pointer to geovol struct |
Definition at line 316 of file gvl.c.
References gvl_file_free_datah().
Referenced by gvl_free_vol().
Get client data.
| id | volume set id |
Definition at line 504 of file gvl2.c.
References gvl_get_vol(), and NULL.
Get color for value.
| color_data | color data value |
| value | data value |
Definition at line 82 of file gvl3.c.
References b, g, r, and Rast_get_f_color().
Referenced by iso_calc_cube(), and slice_calc().
Get volume dimensions.
| id | volume set id | |
| [out] | rows,cols,depths | number of rows, cols, depths |
Definition at line 309 of file gvl2.c.
References G_debug(), and gvl_get_vol().
Referenced by Nviz_set_volume_attr_default().
Get last volume set from the list.
Definition at line 124 of file gvl.c.
References G_debug(), and NULL.
Referenced by gvl_get_new_vol().
Allocate new volume set and add it to the list.
Definition at line 148 of file gvl.c.
References FIRST_VOL_ID, G_debug(), G_malloc, gvl_get_last_vol(), and NULL.
Referenced by GVL_new_vol().
Get previous volume.
| id | current volume set id |
Definition at line 64 of file gvl.c.
References G_debug(), g_vol::gvol_id, g_vol::next, and NULL.
Get trans ?
| id | volume set id | |
| [out] | xtrans,ytrans,ztrans | x/y/z trans values |
Definition at line 365 of file gvl2.c.
References gvl_get_vol().
Get volume set structure.
| id | volume set id |
Definition at line 40 of file gvl.c.
References G_debug(), and NULL.
Referenced by gvl_delete_vol(), GVL_draw_vol(), GVL_draw_wire(), GVL_Get_ClientData(), GVL_get_dims(), GVL_get_trans(), GVL_get_volname(), GVL_isosurf_add(), GVL_isosurf_del(), GVL_isosurf_get_drawmode(), GVL_isosurf_get_drawres(), gvl_isosurf_get_isosurf(), GVL_isosurf_move_down(), GVL_isosurf_move_up(), GVL_isosurf_num_isosurfs(), GVL_isosurf_set_drawmode(), GVL_isosurf_set_drawres(), GVL_load_vol(), GVL_Set_ClientData(), GVL_set_draw_wire(), GVL_set_focus_center_map(), GVL_set_trans(), GVL_slice_add(), GVL_slice_del(), GVL_slice_get_drawmode(), GVL_slice_get_drawres(), GVL_slice_get_pos(), gvl_slice_get_slice(), GVL_slice_move_down(), GVL_slice_move_up(), GVL_slice_num_slices(), GVL_slice_set_drawmode(), GVL_slice_set_drawres(), GVL_slice_set_pos(), and GVL_vol_exists().
Get list of loaded volume sets.
Must be freed if not needed!
| [out] | numvols | number of volume sets |
Definition at line 181 of file gvl2.c.
References G_malloc, and NULL.
Referenced by Nviz_draw_all_vol(), and Nviz_set_focus_map().
Get volume set name.
| id | volume set id | |
| [out] | filename | name (must be allocated) |
Definition at line 286 of file gvl2.c.
References gvl_file_get_name(), gvl_get_vol(), NULL, and strcpy.
Get volume x-extent value.
| gvl | pointer to geovol struct | |
| [out] | min | x-min value |
| [out] | max | y-max value |
Definition at line 354 of file gvl.c.
Referenced by gvl_get_xrange().
Get volume x-range value.
| [out] | min | x-min value |
| [out] | max | x-max value |
Definition at line 404 of file gvl.c.
References gvl_get_xextents(), max, and min.
Get volume y-extent value.
| gvl | pointer to geovol struct | |
| [out] | min | y-min value |
| [out] | max | y-max value |
Definition at line 371 of file gvl.c.
Referenced by gvl_get_yrange().
Get volume y-range value.
| [out] | min | y-min value |
| [out] | max | y-max value |
Definition at line 441 of file gvl.c.
References gvl_get_yextents(), max, and min.
Get volume z-extent value.
| gvl | pointer to geovol struct | |
| [out] | min | z-min value |
| [out] | max | z-max value |
Definition at line 388 of file gvl.c.
Referenced by gvl_get_zrange().
Get volume z-range value.
| [out] | min | z-min value |
| [out] | max | z-max value |
Definition at line 478 of file gvl.c.
References gvl_get_zextents(), max, and min.
Referenced by GS_get_zrange().
Initialize 3D region.
Set region extent (N,S,W,E,T,B)
Definition at line 57 of file gvl2.c.
References NULL, and Rast3d_read_window().
| int gvl_init_vol | ( | geovol * | gvl, |
| double | ox, | ||
| double | oy, | ||
| double | oz, | ||
| int | rows, | ||
| int | cols, | ||
| int | depths, | ||
| double | xres, | ||
| double | yres, | ||
| double | zres | ||
| ) |
Initialize geovol structure.
| gvl | pointer to geovol struct |
| ox,oy,oz | |
| rows | number of rows |
| cols | number of cols |
| xres,yres,zres | x/y/z resolution value |
Definition at line 187 of file gvl.c.
References DM_GOURAUD, G_debug(), G_zero(), MAX_ISOSURFS, MAX_SLICES, and NULL.
Referenced by GVL_new_vol().
Add isosurface.
| id | volume set id |
Definition at line 667 of file gvl2.c.
References G_debug(), G_malloc, gvl_get_vol(), gvl_isosurf_init(), and MAX_ISOSURFS.
Fill data structure with computed isosurfaces polygons.
| gvol | pointer to geovol struct |
Definition at line 585 of file gvl_calc.c.
References geovol_isosurf::att, geovol_isosurf_att::att_src, ATT_TOPO, geovol_isosurf_att::changed, Cols, geovol_isosurf::data, geovol_isosurf::data_desc, Depths, G_free(), G_malloc, gvl_align_data(), gvl_file_end_read(), gvl_file_get_volfile(), gvl_file_set_mode(), gvl_file_start_read(), gvl_write_char(), geovol_isosurf_att::hfile, IS_IN_DATA, iso_calc_cube(), MAP_ATT, MAX_ATTS, NULL, read, ResX, ResY, ResZ, Rows, SET_IN_DATA, and x.
Referenced by gvld_vol().
Delete isosurface.
| id | volume set id |
| isosurf_id | isosurface id |
Definition at line 704 of file gvl2.c.
References G_debug(), G_free(), gvl_get_vol(), gvl_isosurf_freemem(), and gvl_isosurf_get_isosurf().
Referenced by GVL_delete_vol().
| int gvl_isosurf_freemem | ( | geovol_isosurf * | isosurf | ) |
Free geovol_isosurf struct.
| isosurf | pointer to geovol_isosurf struct |
Definition at line 553 of file gvl.c.
References geovol_isosurf::data, G_debug(), G_free(), gvl_isosurf_set_att_src(), MAX_ATTS, and NOTSET_ATT.
Referenced by GVL_isosurf_del().
| int GVL_isosurf_get_att | ( | int | id, |
| int | isosurf_id, | ||
| int | att, | ||
| int * | set, | ||
| float * | constant, | ||
| char * | mapname | ||
| ) |
Get isosurface attributes.
| id | volume set id | |
| isosurf_id | surface id | |
| att | attribute id | |
| [out] | set | |
| [out] | constant | |
| [out] | mapname |
Definition at line 815 of file gvl2.c.
References geovol_isosurf::att, CONST_ATT, geovol_isosurf_att::constant, G_debug(), gvl_file_get_name(), gvl_isosurf_get_att_src(), gvl_isosurf_get_isosurf(), geovol_isosurf_att::hfile, MAP_ATT, and strcpy.
| int gvl_isosurf_get_att_src | ( | geovol_isosurf * | isosurf, |
| int | desc | ||
| ) |
Get attribute source.
| isosurf | pointer to geovol_isosurf struct |
| desc | attribute id |
Definition at line 607 of file gvl.c.
References geovol_isosurf::att, geovol_isosurf_att::att_src, G_debug(), and LEGAL_ATT.
Referenced by GVL_isosurf_get_att(), and gvl_isosurf_set_att_src().
Get isosurface draw mode.
| id | volume set id | |
| [out] | mode | draw-mode |
Definition at line 618 of file gvl2.c.
References gvl_get_vol().
Get draw resolution for isosurface.
| id | volume set id | |
| [out] | xres,yres,zres | x/y/z resolution value |
Definition at line 555 of file gvl2.c.
References G_debug(), and gvl_get_vol().
Get isosurface flags.
| id | volume set id | |
| isosurf_id | isosurface id | |
| [out] | inout | map name |
Definition at line 957 of file gvl2.c.
References G_debug(), gvl_isosurf_get_isosurf(), and geovol_isosurf::inout_mode.
| geovol_isosurf * gvl_isosurf_get_isosurf | ( | int | id, |
| int | isosurf_id | ||
| ) |
Get isosurface of given volume set.
| id | volume set id |
| isosurf_id | isosurface id (0 - MAX_ISOSURFS) |
Definition at line 580 of file gvl.c.
References G_debug(), gvl_get_vol(), and NULL.
Referenced by GVL_isosurf_del(), GVL_isosurf_get_att(), GVL_isosurf_get_flags(), GVL_isosurf_get_maskmode(), GVL_isosurf_set_att_const(), GVL_isosurf_set_att_map(), GVL_isosurf_set_flags(), GVL_isosurf_set_maskmode(), and GVL_isosurf_unset_att().
Get isosurface mask mode.
| id | volume set id |
| isosurf_id | isosurface id |
| mode | attribute mode |
Definition at line 1062 of file gvl2.c.
References geovol_isosurf::att, ATT_MASK, geovol_isosurf_att::constant, and gvl_isosurf_get_isosurf().
| int gvl_isosurf_init | ( | geovol_isosurf * | isosurf | ) |
Initialize geovol_isosurf struct.
| isosurf | pointer to geovol_isosurf struct |
Definition at line 520 of file gvl.c.
References geovol_isosurf::att, geovol_isosurf_att::att_data, geovol_isosurf_att::att_src, geovol_isosurf_att::changed, geovol_isosurf_att::constant, geovol_isosurf::data, geovol_isosurf::data_desc, G_debug(), geovol_isosurf_att::hfile, geovol_isosurf::inout_mode, MAX_ATTS, NOTSET_ATT, NULL, and geovol_isosurf_att::user_func.
Referenced by GVL_isosurf_add().
Move down isosurface in list.
| id | volume set id |
| isosurf_id | isosurface id |
Definition at line 777 of file gvl2.c.
References G_debug(), and gvl_get_vol().
Move up isosurface in list.
| id | volume set id |
| isosurf_id | isosurface id |
Definition at line 743 of file gvl2.c.
References G_debug(), and gvl_get_vol().
Get number of available isosurfaces.
| id | volume set id |
Definition at line 1008 of file gvl2.c.
References G_debug(), and gvl_get_vol().
Referenced by GVL_delete_vol().
| int gvl_isosurf_set_att_changed | ( | geovol_isosurf * | isosurf, |
| int | desc | ||
| ) |
Set attribute changed.
| isosurf | pointer to geovol_isosurf struct |
| desc | attribute id |
Definition at line 723 of file gvl.c.
References geovol_isosurf::att, ATT_MASK, ATT_TOPO, geovol_isosurf_att::changed, G_debug(), LEGAL_ATT, and MAX_ATTS.
Referenced by gvl_isosurf_set_att_src(), and GVL_isosurf_set_drawres().
| int gvl_isosurf_set_att_const | ( | geovol_isosurf * | isosurf, |
| int | desc, | ||
| float | constant | ||
| ) |
Set isosurface attribute constant.
| isosurf | pointer to geovol_isosurf struct |
| desc | attribute descriptor |
| constant | attribute value |
Definition at line 665 of file gvl.c.
References geovol_isosurf::att, CONST_ATT, geovol_isosurf_att::constant, G_debug(), and gvl_isosurf_set_att_src().
Referenced by GVL_isosurf_set_att_const().
Set constant isosurface attribute.
Attributes:
| id | volume set id |
| isosurf_id | isosurface id (0 - MAX_ISOSURFS) |
| att | attribute descriptor |
| constant | constant value |
Definition at line 890 of file gvl2.c.
References G_debug(), gvl_isosurf_get_isosurf(), and gvl_isosurf_set_att_const().
| int gvl_isosurf_set_att_map | ( | geovol_isosurf * | isosurf, |
| int | desc, | ||
| const char * | filename | ||
| ) |
Set attribute map.
| isosurf | pointer to geovol_isosurf struct |
| desc | attribute id |
| filename | filename |
Definition at line 690 of file gvl.c.
References geovol_isosurf::att, ATT_COLOR, geovol_isosurf_att::att_data, G_debug(), gvl_file_newh(), gvl_isosurf_set_att_src(), Gvl_load_colors_data(), geovol_isosurf_att::hfile, MAP_ATT, and VOL_FTYPE_RASTER3D.
Referenced by GVL_isosurf_set_att_map().
Set isosurface map attribute.
Attributes:
| id | volume set id |
| isosurf_id | isosurface id (0 - MAX_ISOSURFS) |
| att | attribute descriptor |
| filename | map name |
Definition at line 928 of file gvl2.c.
References G_debug(), gvl_isosurf_get_isosurf(), and gvl_isosurf_set_att_map().
| int gvl_isosurf_set_att_src | ( | geovol_isosurf * | isosurf, |
| int | desc, | ||
| int | src | ||
| ) |
Set attribute source.
| isosurf | pointer to geovol_isosurf struct |
| desc | attribute id |
| src | attribute value |
Definition at line 632 of file gvl.c.
References geovol_isosurf::att, ATT_COLOR, geovol_isosurf_att::att_data, geovol_isosurf_att::att_src, G_debug(), gvl_file_free_datah(), gvl_isosurf_get_att_src(), gvl_isosurf_set_att_changed(), Gvl_unload_colors_data(), geovol_isosurf_att::hfile, LEGAL_SRC, and MAP_ATT.
Referenced by gvl_isosurf_freemem(), gvl_isosurf_set_att_const(), gvl_isosurf_set_att_map(), and GVL_isosurf_unset_att().
Set isosurface draw mode.
| id | volume set id |
| mode | draw mode |
Definition at line 642 of file gvl2.c.
References G_debug(), and gvl_get_vol().
Referenced by Nviz_set_volume_attr_default().
Set isosurface draw resolution.
| id | volume set id |
| xres,yres,zres | x/y/z resolution value |
Definition at line 581 of file gvl2.c.
References ATT_TOPO, G_debug(), gvl_get_vol(), and gvl_isosurf_set_att_changed().
Referenced by Nviz_set_volume_attr_default().
Set isosurface flags.
| id | volume set id |
| isosurf_id | isosurface id |
| inout | map name |
Definition at line 983 of file gvl2.c.
References G_debug(), gvl_isosurf_get_isosurf(), and geovol_isosurf::inout_mode.
Set mask attribute mode.
Mask attribute special: constant is set to indicate invert or no
| id | volume set id |
| isosurf_id | isosurface id |
| mode | attribute mode |
Definition at line 1035 of file gvl2.c.
References geovol_isosurf::att, ATT_MASK, geovol_isosurf_att::constant, G_debug(), and gvl_isosurf_get_isosurf().
Unset isosurface attributes.
| id | volume set id |
| isosurf_id | isosurface id |
| att | attribute id |
Definition at line 855 of file gvl2.c.
References G_debug(), gvl_isosurf_get_isosurf(), gvl_isosurf_set_att_src(), and NOTSET_ATT.
Library initialization for volumes.
Set region extent (N,S,W,E,T,B)
Definition at line 37 of file gvl2.c.
References Rast3d_get_window(), and Rast3d_init_defaults().
Load color table.
| [out] | color_data | color data buffer |
| name | 3D raster map name |
Definition at line 34 of file gvl3.c.
References _, G_find_raster3d(), G_free(), G_malloc, G_warning(), name, NULL, and Rast3d_read_colors().
Referenced by gvl_isosurf_set_att_map(), and gvl_slices_calc().
Load 3d raster map to volume set.
| id | volume set id |
| filename | 3d raster map name |
Definition at line 256 of file gvl2.c.
References _, G_debug(), G_message(), gvl_file_newh(), gvl_get_vol(), NULL, and VOL_FTYPE_RASTER3D.
Referenced by Nviz_new_map_obj().
Create new volume set.
Definition at line 136 of file gvl2.c.
References G_debug(), gvl_get_new_vol(), gvl_init_vol(), and MAX_VOLS.
Referenced by Nviz_new_map_obj().
Get number of loaded volume sets.
Definition at line 166 of file gvl2.c.
References gvl_num_vols().
Referenced by Nviz_new_map_obj(), and Nviz_set_focus_map().
Get number of loaded volume sets.
Definition at line 105 of file gvl.c.
References G_debug().
Referenced by GVL_num_vols().
Read char.
| pos | position index |
| data | data buffer |
Definition at line 763 of file gvl_calc.c.
Set client data for volume set.
| id | volume set id |
| clientd | pointer to client data |
Definition at line 481 of file gvl2.c.
References gvl_get_vol().
Set drawing wire box.
| id | volume set id |
| draw_wire | 1 for drawing wire, 0 otherwise |
Definition at line 388 of file gvl2.c.
References G_debug(), and gvl_get_vol().
Set focus on map center.
| id | volume set id |
Definition at line 522 of file gvl2.c.
References G_debug(), GS_set_focus(), gvl_get_vol(), X, Y, and Z.
Referenced by Nviz_set_focus_map().
Set trans ?
| id | volume set id |
| xtrans,ytrans,ztrans | x/y/z trans values |
Definition at line 339 of file gvl2.c.
References G_debug(), and gvl_get_vol().
Add slice.
| id | volume set id |
Definition at line 1200 of file gvl2.c.
References G_debug(), G_malloc, gvl_get_vol(), gvl_slice_init(), MAX_SLICES, and NULL.
Delete slice.
| id | volume set id |
| slice_id | slice id |
Definition at line 1236 of file gvl2.c.
References G_debug(), G_free(), gvl_get_vol(), gvl_slice_freemem(), and gvl_slice_get_slice().
Referenced by GVL_delete_vol().
| int gvl_slice_freemem | ( | geovol_slice * | slice | ) |
Free geovol_slice struct.
| slice | pointer to geovol_slice struct |
Definition at line 782 of file gvl.c.
References geovol_slice::data, G_debug(), and G_free().
Referenced by GVL_slice_del().
Get slice draw mode.
| id | volume set id | |
| [out] | mode | draw mode |
Definition at line 1151 of file gvl2.c.
References gvl_get_vol().
Get draw resolution of slice.
| id | volume set id | |
| [out] | xres,yres,zres | x/y/z resolution value |
Definition at line 1088 of file gvl2.c.
References G_debug(), and gvl_get_vol().
| int GVL_slice_get_pos | ( | int | id, |
| int | slice_id, | ||
| float * | x1, | ||
| float * | x2, | ||
| float * | y1, | ||
| float * | y2, | ||
| float * | z1, | ||
| float * | z2, | ||
| int * | dir | ||
| ) |
Get slice position.
| id | volume set id | |
| slice_id | slice id | |
| [out] | x1,y1,z1 | coordinates ? |
| [out] | x2,y2,z2 | coordinates ? |
| [out] | dir | direction |
Definition at line 1369 of file gvl2.c.
References geovol_slice::dir, gvl_get_vol(), gvl_slice_get_slice(), X, geovol_slice::x1, geovol_slice::x2, Y, geovol_slice::y1, geovol_slice::y2, Z, geovol_slice::z1, and geovol_slice::z2.
| geovol_slice * gvl_slice_get_slice | ( | int | id, |
| int | slice_id | ||
| ) |
Get geovol_slice struct.
| id | volume set id |
| slice_id | slice id |
Definition at line 803 of file gvl.c.
References gvl_get_vol(), and NULL.
Referenced by GVL_slice_del(), GVL_slice_get_pos(), GVL_slice_get_transp(), GVL_slice_set_pos(), and GVL_slice_set_transp().
Get slice trans ?
| id | volume set id | |
| slice_id | slice id | |
| [out] | transp | transp value |
Definition at line 1489 of file gvl2.c.
References G_debug(), gvl_slice_get_slice(), and geovol_slice::transp.
| int gvl_slice_init | ( | geovol_slice * | slice | ) |
Initialize geovol_slice struct.
| slice | pointer to geovol_slice struct |
Definition at line 756 of file gvl.c.
References geovol_slice::changed, geovol_slice::data, G_debug(), geovol_slice::mode, NULL, geovol_slice::transp, geovol_slice::z1, and geovol_slice::z2.
Referenced by GVL_slice_add().
Move down slice.
| id | volume set id |
| slice_id | slice id |
Definition at line 1309 of file gvl2.c.
References G_debug(), and gvl_get_vol().
Move up slice.
| id | volume set id |
| slice_id | slice id |
Definition at line 1275 of file gvl2.c.
References G_debug(), and gvl_get_vol().
Get number or slices.
| id | volume set id |
Definition at line 1342 of file gvl2.c.
References G_debug(), and gvl_get_vol().
Referenced by GVL_delete_vol().
Set slice draw mode.
| id | volume set id |
| mode | draw mode |
Definition at line 1175 of file gvl2.c.
References G_debug(), and gvl_get_vol().
Referenced by Nviz_set_volume_attr_default().
Set slice draw resolution.
| id | volume set id |
| xres,yres,zres | x/y/z resolution value |
Definition at line 1114 of file gvl2.c.
References G_debug(), and gvl_get_vol().
Referenced by Nviz_set_volume_attr_default().
| int GVL_slice_set_pos | ( | int | id, |
| int | slice_id, | ||
| float | x1, | ||
| float | x2, | ||
| float | y1, | ||
| float | y2, | ||
| float | z1, | ||
| float | z2, | ||
| int | dir | ||
| ) |
Get slice position.
| id | volume set id |
| slice_id | slice id |
| x1,y1,z1 | coordinates ? |
| x2,y2,z2 | coordinates ? |
| dir | direction |
Definition at line 1429 of file gvl2.c.
References geovol_slice::changed, geovol_slice::dir, gvl_get_vol(), gvl_slice_get_slice(), X, geovol_slice::x1, geovol_slice::x2, Y, geovol_slice::y1, geovol_slice::y2, Z, geovol_slice::z1, and geovol_slice::z2.
Set slice trans ?
| id | volume set id |
| slice_id | slice id |
| transp | transp value |
Definition at line 1515 of file gvl2.c.
References G_debug(), gvl_slice_get_slice(), and geovol_slice::transp.
Calculate slices for given volume set.
| gvol | pointer to geovol struct |
Definition at line 1038 of file gvl_calc.c.
References Cols, Depths, G_debug(), gvl_file_get_name(), Gvl_load_colors_data(), Gvl_unload_colors_data(), ResX, ResY, ResZ, Rows, and slice_calc().
Referenced by gvld_vol().
Unload color table.
| color_data | color data buffer |
Definition at line 65 of file gvl3.c.
References G_free(), and Rast_free_colors().
Referenced by gvl_isosurf_set_att_src(), and gvl_slices_calc().
Check if volume set exists.
| id | volume set id |
Definition at line 111 of file gvl2.c.
References G_debug(), gvl_get_vol(), and NULL.
Referenced by GVL_delete_vol().
ADD.
| pos | |
| data | |
| c |
Definition at line 736 of file gvl_calc.c.
References BUFFER_SIZE, G_debug(), and G_realloc.
Referenced by gvl_isosurf_calc(), and slice_calc().
Draw volume isosurfaces.
| gvl | pointer to geovol struct |
Definition at line 92 of file gvld.c.
References geovol_isosurf::att, ATT_COLOR, ATT_EMIT, ATT_SHINE, geovol_isosurf_att::att_src, ATT_TRANSP, b, cell_table, CM_DIFFUSE, CONST_ATT, geovol_isosurf_att::constant, DM_GOURAUD, CELL_ENTRY::edges, g, G_debug(), G_free(), G_malloc, GS_check_cancel(), GS_get_scale(), gsd_bgnpolygon(), gsd_blend(), gsd_colormode(), gsd_do_scale(), gsd_endpolygon(), gsd_getwindow(), gsd_litvert_func(), gsd_popmatrix(), gsd_pushmatrix(), gsd_set_material(), gsd_shademodel(), gsd_translate(), gsd_zwritemask(), gvl_file_get_name(), MAP_ATT, CELL_ENTRY::nedges, CELL_ENTRY::npolys, CELL_ENTRY::polys, r, READ, X, x, Y, and Z.
Referenced by gvld_vol().
Draw slice.
| gvl | pointer to geovol struct |
| ndx |
Definition at line 500 of file gvld.c.
References geovol_slice::data, geovol_slice::dir, DISTANCE_2, gsd_bgntmesh(), gsd_blend(), gsd_endtmesh(), gsd_litvert_func(), gsd_zwritemask(), r, geovol_slice::transp, X, x, geovol_slice::x1, geovol_slice::x2, Y, geovol_slice::y1, geovol_slice::y2, Z, geovol_slice::z1, and geovol_slice::z2.
Referenced by gvld_slices().
Draw slices.
| gvl | pointer to geovol struct |
Definition at line 443 of file gvld.c.
References CM_COLOR, DM_GOURAUD, G_debug(), GS_get_scale(), gsd_blend(), gsd_colormode(), gsd_do_scale(), gsd_getwindow(), gsd_popmatrix(), gsd_pushmatrix(), gsd_set_material(), gsd_shademodel(), gsd_translate(), gsd_zwritemask(), and gvld_slice().
Referenced by gvld_vol().
Draw volume set (slices and isosurfaces)
| gvl | pointer to geovol struct |
Definition at line 38 of file gvld.c.
References G_debug(), gvl_isosurf_calc(), gvl_slices_calc(), gvld_isosurf(), and gvld_slices().
Referenced by GVL_draw_vol().
Draw volume bounding box.
| gvl | pointer to geovol struct |
Definition at line 787 of file gvld.c.
References CM_COLOR, DM_FLAT, G_debug(), gsd_bgnline(), gsd_color_func(), gsd_colormode(), gsd_do_scale(), gsd_endline(), gsd_linewidth(), gsd_popmatrix(), gsd_pushmatrix(), gsd_shademodel(), gsd_translate(), gsd_vert_func(), X, Y, and Z.
Referenced by GVL_draw_vol(), and gvld_wire_vol().
Draw volume isosurface in draw mode.
| gvl | pointer to geovol struct [unused] |
Definition at line 423 of file gvld.c.
Referenced by gvld_wire_vol().
Draw wire slices.
| gvl | pointer to geovol struct |
Definition at line 678 of file gvld.c.
References CM_COLOR, geovol_slice::dir, DM_FLAT, G_debug(), gsd_bgnline(), gsd_color_func(), gsd_colormode(), gsd_do_scale(), gsd_endline(), gsd_linewidth(), gsd_popmatrix(), gsd_pushmatrix(), gsd_set_material(), gsd_shademodel(), gsd_translate(), gsd_vert_func(), X, geovol_slice::x1, geovol_slice::x2, Y, geovol_slice::y1, geovol_slice::y2, Z, geovol_slice::z1, and geovol_slice::z2.
Referenced by gvld_wire_vol().
Draw volume in wire mode (bounding box)
| gvl | pointer to geovol struct |
Definition at line 69 of file gvld.c.
References G_debug(), gvld_wind3_box(), gvld_wire_isosurf(), and gvld_wire_slices().
Referenced by GVL_draw_wire().
ADD.
| gs | surface (geosurf) | |
| [in] | pt |
Definition at line 698 of file gsdrape.c.
References VCOL2X, VCOLS, VROW2Y, VROWS, X, and Y.
Referenced by gs_distance_onsurf(), GS_get_cat_at_xy(), GS_get_norm_at_xy(), GS_get_val_at_xy(), order_intersects(), and seg_intersect_vregion().
Init variables.
for optimization
| gs | surface (geosurf) |
Definition at line 73 of file gs_norms.c.
References ATT_TOPO, gs_get_att_typbuff(), GS_get_scale(), and GS_global_exag().
Referenced by gs_calc_normals().
ADD.
| gs | surface (geosurf) | |
| [in] | bgn | begin point |
| [in] | end | end point |
| [out] | f | first |
| [out] | l | last |
Definition at line 439 of file gsdrape.c.
References ATT_TOPO, l, viewcell_tri_interp(), X, Y, and Z.
Referenced by gsdrape_get_allsegments(), and gsdrape_get_segments().
Linear interpolation.
| dt | coefficient |
| val2 | value 2 |
| val1 | value 1 |
Definition at line 545 of file gk.c.
Referenced by gk_make_framesfromkeys(), and gk_make_linear_framesfromkeys().
ADD.
After all the intersections between the segment and triangle edges have been found, they are in three lists. (intersections with vertical, horizontal, and diagonal triangle edges)
Each list is ordered in space from first to last segment points, but now the lists need to be woven together. This routine starts with the first point of the segment and then checks the next point in each list to find the closest, eliminating duplicates along the way and storing the result in I3d.
| gs | surface (geosurf) | |
| [in] | first | first point |
| [in] | last | last point |
| [in] | vi | |
| [in] | hi | |
| [in] | di |
Definition at line 731 of file gsdrape.c.
References EPSILON, EQUAL, G_debug(), in_vregion(), X, Y, and Z.
Pop top of matrix stack, placing it into the current transformation matrix.
Definition at line 188 of file trans.c.
References _, and G_warning().
Referenced by gsd_update_cpnorm(), P_rot(), and P_scale().
Push current transformation matrix onto matrix stack.
Definition at line 167 of file trans.c.
References _, G_warning(), and MAX_STACK.
Referenced by gsd_update_cpnorm(), P_rot(), and P_scale().
Rotate matrix.
| angle | angle value |
| axis | ('x, 'y', 'z') |
Definition at line 208 of file trans.c.
References NPI, P_popmatrix(), and P_pushmatrix().
Referenced by gsd_update_cpnorm().
ADD.
| x,y,z |
Definition at line 65 of file trans.c.
References P_popmatrix(), P_pushmatrix(), and x.
Transform array of vectors using current T matrix.
Multiply 'in' matrix (homogeneous coordinate generally) by the current transformation matrix, placing the result in 'out'
[in][trans_mat] => [out]
| num_vert | |
| in | |
| out |
Definition at line 107 of file trans.c.
Referenced by gsd_update_cpnorm().
Check if point is on plane.
Plane defined by three points here; user fills in unk[X] & unk[Y]
| [in,out] | p1,p2,p3 | points defining plane |
| [in,out] | unk | point |
Definition at line 1289 of file gsdrape.c.
References P3toPlane(), and XY_intersect_plane().
Referenced by viewcell_tri_interp().
Primitives only called after transforms.
Center is actually center at base of 8 sided cone
| colr | Integer representing the color to use for drawing the cone. |
Definition at line 1345 of file gsd_objs.c.
References gsd_bgntfan(), gsd_endtfan(), gsd_litvert_func2(), ogverts, UP_NORM, X, Y, and Z.
Referenced by gsd_3darrow().
Primitives only called after transforms.
Center is actually center at base of 8 sided cylinder
| colr | Integer representing the color to use for drawing the cylinder. |
| caps | If non zero, draw caps at the bottom and top of the cylinder. |
Definition at line 1382 of file gsd_objs.c.
References DOWN_NORM, gsd_bgnqstrip(), gsd_bgntfan(), gsd_endqstrip(), gsd_endtfan(), gsd_litvert_func2(), ogverts, ogvertsplus, ORIGIN, and UP_NORM.
Referenced by gsd_3darrow().
Debugging, print geosurf fields to stderr.
| s | pointer to geosurf struct |
Definition at line 393 of file gs.c.
References g_surf::cols, g_surf::draw_mode, g_surf::gsurf_id, g_surf::ox, g_surf::oy, g_surf::rows, g_surf::wire_color, g_surf::x_mod, g_surf::x_modw, g_surf::x_trans, g_surf::xmax, g_surf::xmin, g_surf::xres, g_surf::y_mod, g_surf::y_modw, g_surf::y_trans, g_surf::ymax, g_surf::ymin, g_surf::yres, g_surf::z_exag, g_surf::z_trans, g_surf::zmax, and g_surf::zmin.
| int RayCvxPolyhedronInt | ( | Point3 | org, |
| Point3 | dir, | ||
| double | tmax, | ||
| Point4 * | phdrn, | ||
| int | ph_num, | ||
| double * | tresult, | ||
| int * | pn | ||
| ) |
Ray-Convex Polyhedron Intersection Test.
Originally by Eric Haines, erich.nosp@m.@eye.nosp@m..com
This test checks the ray against each face of a polyhedron, checking whether the set of intersection points found for each ray-plane intersection overlaps the previous intersection results. If there is no overlap (i.e. no line segment along the ray that is inside the polyhedron), then the ray misses and returns 0; else 1 is returned if the ray is entering the polyhedron, -1 if the ray originates inside the polyhedron. If there is an intersection, the distance and the number of the face hit is returned.
| org,dir | origin and direction of ray | |
| tmax | maximum useful distance along ray | |
| phdrn | list of planes in convex polyhedron | |
| ph_num | number of planes in convex polyhedron | |
| [out] | tresult | distance of intersection along ray |
| [out] | pn | number of face hit (0 to ph_num-1) |
Definition at line 384 of file gs_query.c.
References BACKFACE, DOT3, FRONTFACE, HUGE_VAL, MISSED, t, and W.
Referenced by gs_setlos_enterdata().
Check if segment intersect vector region.
Clipping performed:
| gs | surface (geosurf) | |
| [in,out] | bgn | begin point |
| [in,out] | end | end point |
Definition at line 233 of file gsdrape.c.
References GS_P2distance(), in_vregion(), segs_intersect(), VCOL2X, VCOLS, VROW2Y, VROWS, X, and Y.
Referenced by gsdrape_get_allsegments(), and gsdrape_get_segments().
| int segs_intersect | ( | float | x1, |
| float | y1, | ||
| float | x2, | ||
| float | y2, | ||
| float | x3, | ||
| float | y3, | ||
| float | x4, | ||
| float | y4, | ||
| float * | x, | ||
| float * | y | ||
| ) |
Line intersect.
Author: Mukesh Prasad Modified for floating point: Bill Brown
This function computes whether two line segments, respectively joining the input points (x1,y1) – (x2,y2) and the input points (x3,y3) – (x4,y4) intersect. If the lines intersect, the output variables x, y are set to coordinates of the point of intersection.
| [in] | x1,y1,x2,y2 | coordinates of endpoints of one segment |
| [in] | x3,y3,x4,y4 | coordinates of endpoints of other segment |
| [out] | x,y | coordinates of intersection point |
Definition at line 1209 of file gsdrape.c.
References COLLINEAR, DO_INTERSECT, DONT_INTERSECT, EQUAL, SAME_SIGNS, and x.
Referenced by get_diag_intersects(), get_horz_intersects(), get_vert_intersects(), gs_los_intersect(), gsd_ortho_wall(), and seg_intersect_vregion().
Print color mode to stderr.
Definition at line 151 of file gsd_prim.c.
References _, and G_message().
Referenced by gsd_surf_map_old().
Tracking memory.
| minus | mimus number |
Definition at line 298 of file gv3.c.
References G_debug().
Referenced by gv_free_vectmem().
ADD.
In gsd_surf, tmesh draws polys like so:
-------------- | /| | / | | / | | / | | / | | / | | / | | / | | / | | / | | / | |/ | --------------
UNLESS the top right or bottom left point is masked, in which case a single triangle with the opposite diagonal is drawn. This case is not yet handled here & should only occur on edges. pt has X & Y coordinates in it, we interpolate Z here
This could probably be much shorter, but not much faster.
| gs | ||
| buf | ||
| [in,out] | pt | |
| [in] | check_mask |
Definition at line 509 of file gsdrape.c.
References ATT_TOPO, CONST_ATT, DRC2OFF, GET_MAPATT, gs_get_att_src(), gs_point_is_masked(), LERP, MAP_ATT, Point_on_plane(), VCOL2DCOL, VCOL2X, VCOLS, VROW2DROW, VROW2Y, VROWS, VXRES, VYRES, X, X2VCOL, Y, Y2VROW, and Z.
Referenced by _viewcell_tri_interp(), gpd_2dsite(), gs_los_intersect(), gs_los_intersect1(), and interp_first_last().
Definition at line 86 of file gs2.c.
Referenced by GS_libinit().
Check for intersection (point and plane)
Ax + By + Cz + D = 0, so z = (Ax + By + D) / -C
User fills in intersect[X] & intersect[Y]
| [in,out] | intersect | intersect coordinates |
| [in] | plane | plane definition |
Definition at line 1311 of file gsdrape.c.
Referenced by Point_on_plane().