GRASS Programmer's Manual
6.4.2(2012)
|
OGSF library - loading and manipulating surfaces (higher level functions) More...
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <grass/config.h>
#include <grass/gis.h>
#include <grass/gstypes.h>
#include <grass/glocale.h>
#include "gsget.h"
#include "rowcol.h"
#include "rgbpack.h"
Go to the source code of this file.
Defines | |
#define | NVIZ_HACK 1 |
Functions | |
int | gsd_getViewport (GLint *, GLint *) |
void | void_func (void) |
void | GS_libinit (void) |
Initialize OGSF library. | |
int | GS_get_longdim (float *dim) |
Get largest dimension. | |
int | GS_get_region (float *n, float *s, float *w, float *e) |
Get 2D region extent. | |
void | GS_set_att_defaults (float *defs, float *null_defs) |
Set default attributes for map objects. | |
int | GS_surf_exists (int id) |
int | GS_new_surface (void) |
Add new surface. | |
int | GS_new_light (void) |
Add new model light. | |
void | GS_setlight_position (int num, float xpos, float ypos, float zpos, int local) |
Set light position. | |
void | GS_getlight_position (int num, float *xpos, float *ypos, float *zpos, int *local) |
Get light position. | |
void | GS_setlight_color (int num, float red, float green, float blue) |
Set light color. | |
void | GS_getlight_color (int num, float *red, float *green, float *blue) |
Get light color. | |
void | GS_setlight_ambient (int num, float red, float green, float blue) |
Set light ambient. | |
void | GS_getlight_ambient (int num, float *red, float *green, float *blue) |
Get light ambient. | |
void | GS_lights_off (void) |
Switch off all lights. | |
void | GS_lights_on (void) |
Switch on all lights. | |
void | GS_switchlight (int num, int on) |
Switch on/off light. | |
int | GS_transp_is_set (void) |
Check if transparency is set. | |
void | GS_get_modelposition1 (float pos[]) |
Retrieves coordinates for lighting model position, at center of view. | |
void | GS_get_modelposition (float *siz, float *pos) |
Retrieves coordinates for lighting model position, at center of view. | |
void | GS_set_Narrow (int *pt, int id, float *pos2) |
Set decoration, north arrow ?? | |
void | GS_draw_X (int id, float *pt) |
ADD. | |
void | GS_draw_line_onsurf (int id, float x1, float y1, float x2, float y2) |
Draw line on surface. | |
int | GS_draw_nline_onsurf (int id, float x1, float y1, float x2, float y2, float *lasp, int n) |
Draw multiline on surface. | |
void | GS_draw_flowline_at_xy (int id, float x, float y) |
Draw flow-line on surace. | |
void | GS_draw_fringe (int id, unsigned long clr, float elev, int *where) |
Draw fringe around data (surface) at selected corners. | |
int | GS_draw_legend (const char *name, GLuint fontbase, int size, int *flags, float *range, int *pt) |
Draw legend. | |
void | GS_draw_list (GLuint list_id) |
Draw pre-defined list. | |
void | GS_draw_all_list (void) |
Draw all glLists. | |
void | GS_delete_list (GLuint list_id) |
Delete pre-defined list. | |
void | GS_draw_lighting_model1 (void) |
Draw lighting model. | |
void | GS_draw_lighting_model (void) |
Draw lighting model. | |
int | GS_update_curmask (int id) |
Update current mask. | |
int | GS_is_masked (int id, float *pt) |
Check if point is masked ? | |
void | GS_unset_SDsurf (void) |
Unset Scaled Difference surface. | |
int | GS_set_SDsurf (int id) |
Set surface as Scaled Difference surface. | |
int | GS_set_SDscale (float scale) |
Set ? | |
int | GS_get_SDsurf (int *id) |
Get ? | |
int | GS_get_SDscale (float *scale) |
Get ? | |
int | GS_update_normals (int id) |
Update normals. | |
int | GS_get_att (int id, int att, int *set, float *constant, char *mapname) |
Get attributes. | |
int | GS_get_cat_at_xy (int id, int att, char *catstr, float x, float y) |
Get surface category on given position. | |
int | GS_get_norm_at_xy (int id, float x, float y, float *nv) |
Get surface normal at x,y (real coordinates) | |
int | GS_get_val_at_xy (int id, int att, char *valstr, float x, float y) |
Get RGB color at given point. | |
int | GS_unset_att (int id, int att) |
Unset attribute. | |
int | GS_set_att_const (int id, int att, float constant) |
Set attribute constant. | |
int | GS_set_maskmode (int id, int mode) |
Set mask mode. | |
int | GS_get_maskmode (int id, int *mode) |
Get mask mode. | |
int | GS_Set_ClientData (int id, void *clientd) |
Set client data. | |
void * | GS_Get_ClientData (int id) |
Get client data. | |
int | GS_num_surfs (void) |
Get number of surfaces. | |
int * | GS_get_surf_list (int *numsurfs) |
Get surface list. | |
int | GS_delete_surface (int id) |
Delete surface. | |
int | GS_load_att_map (int id, const char *filename, int att) |
Load raster map as attribute. | |
void | GS_draw_surf (int id) |
Draw surface. | |
void | GS_draw_wire (int id) |
Draw surface wire. | |
void | GS_alldraw_wire (void) |
Draw all wires. | |
void | GS_alldraw_surf (void) |
Draw all surfaces. | |
void | GS_set_exag (int id, float exag) |
Set Z exag for surface. | |
void | GS_set_global_exag (float exag) |
Set global z-exag value. | |
float | GS_global_exag (void) |
Get global z-exag value. | |
void | GS_set_wire_color (int id, int colr) |
Set wire color. | |
int | GS_get_wire_color (int id, int *colr) |
Get wire color. | |
int | GS_setall_drawmode (int mode) |
Set all draw-modes. | |
int | GS_set_drawmode (int id, int mode) |
Set draw mode. | |
int | GS_get_drawmode (int id, int *mode) |
Get draw mode. | |
void | GS_set_nozero (int id, int att, int mode) |
Set no-zero ? | |
int | GS_get_nozero (int id, int att, int *mode) |
Get no-zero ? | |
int | GS_setall_drawres (int xres, int yres, int xwire, int ywire) |
Set all draw resolutions. | |
int | GS_set_drawres (int id, int xres, int yres, int xwire, int ywire) |
Set draw resolution for surface. | |
void | GS_get_drawres (int id, int *xres, int *yres, int *xwire, int *ywire) |
Get draw resolution of surface. | |
void | GS_get_dims (int id, int *rows, int *cols) |
Get dimension of surface. | |
int | GS_get_exag_guess (int id, float *exag) |
Get exag-value guess. | |
void | GS_get_zrange_nz (float *min, float *max) |
Get Z extents for all loaded surfaces. | |
void | GS_set_trans (int id, float xtrans, float ytrans, float ztrans) |
Set trans ? | |
void | GS_get_trans (int id, float *xtrans, float *ytrans, float *ztrans) |
Get trans ? | |
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 where) |
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 *realto) |
Set focus. | |
void | GS_set_focus_real (float *realto) |
Set real focus. | |
int | GS_get_focus (float *realto) |
Get focus. | |
void | GS_set_focus_center_map (int id) |
Set focus to map center. | |
void | GS_moveto (float *pt) |
Move viewpoint. | |
void | GS_moveto_real (float *pt) |
Move position to (real) | |
int | GS_get_zextents (int id, float *min, float *max, float *mid) |
Get z-extent for a single surface. | |
int | GS_get_zrange (float *min, float *max, int doexag) |
Get z-extent for all loaded surfaces. | |
void | GS_get_from (float *fr) |
Get viewpoint 'from' position. | |
void | GS_get_from_real (float *fr) |
Get viewpoint 'from' real coordinates. | |
void | GS_get_to_real (float *to) |
Get 'to' real coordinates. | |
void | GS_zoom_setup (int *a, int *b, int *c, int *d, int *maxx, int *maxy) |
Get zoom setup. | |
void | GS_get_to (float *to) |
Get 'to' model coordinates. | |
void | GS_get_viewdir (float *dir) |
Get viewdir. | |
void | GS_set_viewdir (float *dir) |
Set viewdir. | |
void | GS_set_fov (int fov) |
Set field of view. | |
int | GS_get_fov (void) |
Get fied of view. | |
int | GS_get_twist (void) |
Get twist value. | |
void | GS_set_twist (int t) |
Set viewpoint twist value. | |
void | GS_set_nofocus (void) |
Unset focus. | |
void | GS_set_infocus (void) |
Set focus. | |
void | GS_set_viewport (int left, int right, int bottom, int top) |
Set viewport. | |
int | GS_look_here (int sx, int sy) |
Send screen coords sx and sy, lib traces through surfaces; sets new center to point of nearest intersection. | |
int | GS_get_selected_point_on_surface (int sx, int sy, int *id, float *x, float *y, float *z) |
Get selected point of surface. | |
void | GS_set_cplane_rot (int num, float dx, float dy, float dz) |
Set cplace rotation. | |
void | GS_set_cplane_trans (int num, float dx, float dy, float dz) |
Set cplace trans. | |
void | GS_draw_cplane (int num) |
Draw cplace. | |
int | GS_draw_cplane_fence (int hs1, int hs2, int num) |
Draw cplace fence ? | |
void | GS_alldraw_cplane_fences (void) |
Draw all cplace fences ? | |
void | GS_set_cplane (int num) |
Set cplace. | |
void | GS_unset_cplane (int num) |
Unset clip place (turn off) | |
void | GS_get_scale (float *sx, float *sy, float *sz, int doexag) |
Get axis scale. | |
void | GS_set_fencecolor (int mode) |
Set fence color. | |
int | GS_get_fencecolor (void) |
Get fence color. | |
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. | |
int | GS_save_3dview (const char *vname, int surfid) |
Save 3d view. | |
int | GS_load_3dview (const char *vname, int surfid) |
Load 3d view. | |
void | GS_init_view (void) |
Init viewpoint. | |
void | GS_clear (int col) |
Clear view. | |
double | GS_get_aspect (void) |
Get aspect value. | |
int | GS_has_transparency (void) |
Check for transparency. |
OGSF library - loading and manipulating surfaces (higher level functions)
GRASS OpenGL gsurf OGSF Library
Plans for handling color maps: NOW: if able to load as unsigned char, make lookup table containing palette otherwise, load directly as packed color, set lookup = NULL MAYBE LATER: if able to load as POSITIVE short, make lookup table containing palette
(C) 1999-2008 by the GRASS Development Team
This program is free software under the GNU General Public License (>=v2). Read the file COPYING that comes with GRASS for details.
Definition in file GS2.c.
void GS_alldraw_cplane_fences | ( | void | ) |
Draw all cplace fences ?
Definition at line 3111 of file GS2.c.
References GS_draw_cplane_fence(), and gsd_get_cplanes_state().
Referenced by gk_follow_frames().
void GS_alldraw_surf | ( | void | ) |
Draw all surfaces.
Definition at line 1918 of file GS2.c.
References GS_draw_surf().
Referenced by gk_follow_frames().
void GS_alldraw_wire | ( | void | ) |
Draw all wires.
Overrides draw_mode for fast display
Definition at line 1901 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().
unsigned int GS_background_color | ( | void | ) |
Get background color.
Definition at line 2431 of file GS2.c.
Referenced by gk_draw_path(), gk_follow_frames(), and GK_set_tension().
void GS_clear | ( | int | col | ) |
Clear view.
col | color value |
Definition at line 3331 of file GS2.c.
References G_debug(), and gsd_flush().
Referenced by gui_modules.wxnviz.Nviz::EraseMap(), gk_follow_frames(), GK_set_tension(), gui_modules.wxnviz.Nviz::InitView(), Nviz_draw_all(), Nviz_draw_quick(), and gui_modules.wxnviz.Nviz::SaveToFile().
unsigned int GS_default_draw_color | ( | void | ) |
Get default draw color.
Definition at line 2418 of file GS2.c.
References G_debug().
Referenced by gk_draw_path(), GS_draw_line_onsurf(), GS_draw_nline_onsurf(), and gsd_draw_cplane().
void GS_delete_list | ( | GLuint | list_id | ) |
Delete pre-defined list.
list_id | list id |
Definition at line 874 of file GS2.c.
References gsd_deletelist().
int GS_delete_surface | ( | int | id | ) |
Delete surface.
id | surface id |
Definition at line 1549 of file GS2.c.
References G_debug(), gs_delete_surf(), GS_surf_exists(), and gv_update_drapesurfs().
Referenced by gui_modules.wxnviz.Nviz::LoadSurface(), and gui_modules.wxnviz.Nviz::UnloadSurface().
void GS_done_draw | ( | void | ) |
Draw done, swap buffers.
Definition at line 2483 of file GS2.c.
References G_debug(), 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(), Nviz_draw_all(), Nviz_draw_all_site(), Nviz_draw_all_vect(), Nviz_draw_all_vol(), Nviz_draw_quick(), and Nviz_resize_window().
void GS_draw_all_list | ( | void | ) |
Draw all glLists.
Uses glFlush() to ensure all drawing is complete before returning
Definition at line 862 of file GS2.c.
References gsd_calllists().
Referenced by gk_follow_frames(), and GK_show_list().
void GS_draw_cplane | ( | int | num | ) |
Draw cplace.
num | cplace id |
Definition at line 3064 of file GS2.c.
References gs_getall_surfaces(), gs_num_surfaces(), gsd_draw_cplane(), and gsd_draw_cplane_fence().
int GS_draw_cplane_fence | ( | int | hs1, |
int | hs2, | ||
int | num | ||
) |
Draw cplace fence ?
hs1,hs2 | |
num | cplane id |
Definition at line 3091 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().
void GS_draw_flowline_at_xy | ( | int | id, |
float | x, | ||
float | y | ||
) |
Draw flow-line on surace.
This is slow - should be moved to gs_ but GS_ good for testing and useful for app programmer
id | surface id |
x,y | coordinates of flow-line |
Definition at line 739 of file GS2.c.
References G_debug(), GS_coordpair_repeats(), GS_draw_nline_onsurf(), GS_get_norm_at_xy(), gs_get_surf(), GS_v2norm(), mult(), VXRES, VYRES, X, and Y.
void GS_draw_fringe | ( | int | id, |
unsigned long | clr, | ||
float | elev, | ||
int * | where | ||
) |
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 806 of file GS2.c.
References G_debug(), gs_get_surf(), and gsd_display_fringe().
Referenced by Nviz_draw_all().
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 831 of file GS2.c.
References gsd_put_legend().
void GS_draw_lighting_model | ( | void | ) |
Draw lighting model.
Just turn off any cutting planes and draw it just outside near clipping plane, since lighting is infinite now
Definition at line 924 of file GS2.c.
References 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(), and gsd_zwritemask().
Referenced by gui_modules.wxnviz.Nviz::DrawLightingModel().
void GS_draw_lighting_model1 | ( | void | ) |
Draw lighting model.
Definition at line 884 of file GS2.c.
References GS_get_modelposition1(), GS_v3eq(), gsd_backface(), gsd_colormode(), gsd_do_scale(), gsd_drawsphere(), gsd_popmatrix(), gsd_pushmatrix(), gsd_scale(), gsd_shademodel(), and gsd_zwritemask().
void GS_draw_line_onsurf | ( | int | id, |
float | x1, | ||
float | y1, | ||
float | x2, | ||
float | y2 | ||
) |
Draw line on surface.
id | surface id |
x1,y1,x2,y2 | line nodes |
Definition at line 662 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.
void GS_draw_list | ( | GLuint | list_id | ) |
Draw pre-defined list.
Uses glFlush() to ensure all drawing is complete before returning
list_id | list id |
Definition at line 849 of file GS2.c.
References gsd_calllist().
int GS_draw_nline_onsurf | ( | int | id, |
float | x1, | ||
float | y1, | ||
float | x2, | ||
float | y2, | ||
float * | lasp, | ||
int | n | ||
) |
Draw multiline on surface.
Like above but limits points in line to n or points found in segment, whichever is smaller.
id | surface id |
x1,y1,x2,y2 | line nodes |
lasp | ? n ? |
Definition at line 701 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().
void GS_draw_surf | ( | int | id | ) |
Draw surface.
id | surface id |
Definition at line 1846 of file GS2.c.
References G_debug(), gs_get_surf(), gsd_shademodel(), gsd_surf(), and gsd_wire_surf().
Referenced by GS_alldraw_surf(), and Nviz_draw_all_surf().
void GS_draw_wire | ( | int | id | ) |
Draw surface wire.
Overrides draw_mode for fast display
id | surface id |
Definition at line 1881 of file GS2.c.
References G_debug(), gs_get_surf(), and gsd_wire_surf().
void GS_draw_X | ( | int | id, |
float * | pt | ||
) |
ADD.
id | surface id |
pt | point, X, Y value in true world coordinates |
Definition at line 623 of file GS2.c.
References _viewcell_tri_interp(), 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, X, and Y.
double GS_get_aspect | ( | void | ) |
Get aspect value.
Definition at line 3365 of file GS2.c.
References G_debug().
Referenced by GS_init_view(), and gsd_set_view().
int GS_get_att | ( | int | id, |
int | att, | ||
int * | set, | ||
float * | constant, | ||
char * | mapname | ||
) |
Get attributes.
id | surface id | |
att | ||
[out] | set | |
[out] | constant | |
[out] | mapname |
Definition at line 1123 of file GS2.c.
References gs_get_att_src(), gs_get_surf(), and gsds_get_name().
int GS_get_cat_at_xy | ( | int | id, |
int | att, | ||
char * | catstr, | ||
float | x, | ||
float | y | ||
) |
Get surface category on given position.
Prints "no data" or a description (i.e., "coniferous forest") to catstr. Usually call after GS_get_selected_point_on_surface(). Define att as MAP_ATT
id | surface id |
att | attribute id (MAP_ATT) |
catstr | cat string (must be allocated, dim?) |
x,y | real coordinates |
Definition at line 1166 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(), NULL, VCOL2DCOL, VROW2DROW, X, X2VCOL, Y, and Y2VROW.
Referenced by gui_modules.wxnviz.Nviz::QueryMap().
void* GS_Get_ClientData | ( | int | id | ) |
Get client data.
id | surface id |
Definition at line 1490 of file GS2.c.
References gs_get_surf(), and NULL.
void GS_get_dims | ( | int | id, |
int * | rows, | ||
int * | cols | ||
) |
Get dimension of surface.
id | surface id | |
[out] | rows,cols | number of rows/cols |
Definition at line 2261 of file GS2.c.
References gs_get_surf().
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 3201 of file GS2.c.
References G_debug(), gs_distance_onsurf(), gs_get_surf(), gsd_real2surf(), NULL, X, and Y.
Referenced by gui_modules.wxnviz.Nviz::GetDistanceAlongSurface().
int GS_get_drawmode | ( | int | id, |
int * | mode | ||
) |
Get draw mode.
id | surface id | |
[out] | mode | mode id |
Definition at line 2091 of file GS2.c.
References gs_get_surf().
void GS_get_drawres | ( | int | id, |
int * | xres, | ||
int * | yres, | ||
int * | xwire, | ||
int * | ywire | ||
) |
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 2237 of file GS2.c.
References G_debug(), and gs_get_surf().
int GS_get_exag_guess | ( | int | id, |
float * | exag | ||
) |
Get exag-value guess.
Use no_zero range because if zero IS data, then range won't be that much off (it's just a GUESS, after all), but if zero is NO data, could drastically affect guess
id | surface id | |
[out] | exag | exag value |
Definition at line 2288 of file GS2.c.
References G_debug(), gs_get_att_src(), and gs_get_surf().
Referenced by Nviz_get_exag(), and Nviz_get_exag_height().
int GS_get_fencecolor | ( | void | ) |
int GS_get_focus | ( | float * | realto | ) |
Get focus.
OK to call with NULL argument if just want to check state
realto | real coordinates to |
Definition at line 2545 of file GS2.c.
References G_debug(), and GS_v3eq().
Referenced by GS_get_to_real().
int GS_get_fov | ( | void | ) |
Get fied of view.
Definition at line 2837 of file GS2.c.
Referenced by GK_add_key().
void GS_get_from | ( | float * | fr | ) |
Get viewpoint 'from' position.
[out] | fr | from model coordinates |
Definition at line 2707 of file GS2.c.
References FROM, G_debug(), and GS_v3eq().
Referenced by GK_add_key(), gk_draw_path(), gk_follow_frames(), and Nviz_set_viewpoint_position().
void GS_get_from_real | ( | float * | fr | ) |
Get viewpoint 'from' real coordinates.
[out] | fr | 'from' real coordinates |
Definition at line 2721 of file GS2.c.
References FROM, GS_v3eq(), and gsd_model2real().
Referenced by Nviz_set_viewpoint_height().
int GS_get_longdim | ( | float * | dim | ) |
Get largest dimension.
[out] | dim | dimension |
Definition at line 135 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(), and Nviz_update_ranges().
int GS_get_maskmode | ( | int | id, |
int * | mode | ||
) |
Get mask mode.
id | surface id | |
[out] | mode | id |
Definition at line 1444 of file GS2.c.
References gs_get_surf().
void GS_get_modelposition | ( | float * | siz, |
float * | pos | ||
) |
Retrieves coordinates for lighting model position, at center of view.
Position at nearclip * 2: tried nearclip + siz, but since need to know position to calculate size, have two dependent variables (nearclip * 2) from eye.
siz[out] | size |
pos[out] | coordinates (X, Y, Z) |
Definition at line 517 of file GS2.c.
References FROM, GS_v3dir(), X, and Y.
Referenced by GS_draw_lighting_model().
void GS_get_modelposition1 | ( | float | pos[] | ) |
Retrieves coordinates for lighting model position, at center of view.
pos[out] | coordinates |
Definition at line 488 of file GS2.c.
References G_debug(), gs_get_data_avg_zmax(), gs_get_datacenter(), X, and Y.
Referenced by GS_draw_lighting_model1().
int GS_get_norm_at_xy | ( | int | id, |
float | x, | ||
float | y, | ||
float * | nv | ||
) |
Get surface normal at x,y (real coordinates)
Usually call after GS_get_selected_point_on_surface()
id | surface id | |
x,y | real coordinates | |
[out] | nv | surface normal |
Definition at line 1229 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, X2VCOL, Y, and Y2VROW.
Referenced by GS_draw_flowline_at_xy().
int GS_get_nozero | ( | int | id, |
int | att, | ||
int * | mode | ||
) |
Get no-zero ?
id | surface id | |
att | attribute id | |
[out] | mode | mode id |
Definition at line 2146 of file GS2.c.
References G_debug(), and gs_get_surf().
int GS_get_region | ( | float * | n, |
float * | s, | ||
float * | w, | ||
float * | e | ||
) |
Get 2D region extent.
[out] | n,s,w,e | extent values |
Definition at line 151 of file GS2.c.
Referenced by GP_draw_site(), gsd_model2real(), and gsd_real2model().
void GS_get_scale | ( | float * | sx, |
float * | sy, | ||
float * | sz, | ||
int | doexag | ||
) |
Get axis scale.
sx,sy,sz | x/y/z scale values |
doexag | use vertical exaggeration |
Definition at line 3156 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_surf_const(), gsd_surf_map(), gsd_surf_map_old(), gsd_wire_arrows(), gvd_vect(), gvld_isosurf(), gvld_slices(), and init_vars().
int GS_get_SDscale | ( | float * | scale | ) |
Get ?
[out] | scale | value |
Definition at line 1088 of file GS2.c.
References gsdiff_get_SDscale().
int GS_get_SDsurf | ( | int * | id | ) |
Get ?
[out] | id | ? |
Definition at line 1068 of file GS2.c.
References gsdiff_get_SDref().
int GS_get_selected_point_on_surface | ( | int | sx, |
int | sy, | ||
int * | id, | ||
float * | x, | ||
float * | y, | ||
float * | z | ||
) |
Get selected point of surface.
Given screen coordinates sx and sy, find closest intersection of view ray with surfaces and return coordinates of intersection in x, y, z, and identifier of surface in id.
sx,sy | screen coordinates | |
[out] | id | surface id |
[out] | x,y,z | point on surface (model coordinates?) |
Definition at line 2970 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(), X, and Y.
Referenced by gui_modules.wxnviz.Nviz::GetPointOnSurface(), GS_look_here(), and GS_set_Narrow().
int* GS_get_surf_list | ( | int * | numsurfs | ) |
Get surface list.
Must be freed when not neeed!
[out] | numsurf | number of available surfaces |
Definition at line 1522 of file GS2.c.
References NULL.
Referenced by gui_modules.wxnviz.Nviz::LoadVector(), Nviz_draw_all_surf(), Nviz_get_exag(), Nviz_get_exag_height(), Nviz_new_fringe(), Nviz_new_map_obj(), Nviz_set_focus_map(), Nviz_set_fringe(), and gui_modules.wxnviz.Nviz::SetWireColor().
void GS_get_to | ( | float * | to | ) |
void GS_get_to_real | ( | float * | to | ) |
Get 'to' real coordinates.
[out] | to | 'to' real coordinates |
Definition at line 2734 of file GS2.c.
References G_get_set_window(), GS_get_focus(), X, and Y.
void GS_get_trans | ( | int | id, |
float * | xtrans, | ||
float * | ytrans, | ||
float * | ztrans | ||
) |
Get trans ?
id | surface id | |
[out] | xtrans,ytrans,ztrans | real trans coordinates |
Definition at line 2395 of file GS2.c.
References G_debug(), and gs_get_surf().
Referenced by gui_modules.wxnviz.Nviz::GetSurfacePosition().
int GS_get_twist | ( | void | ) |
Get twist value.
10ths of degrees off twelve o'clock
Definition at line 2847 of file GS2.c.
Referenced by GK_add_key().
int GS_get_val_at_xy | ( | int | id, |
int | att, | ||
char * | valstr, | ||
float | x, | ||
float | y | ||
) |
Get RGB color at given point.
Colors are translated to rgb and returned as Rxxx Gxxx Bxxx Usually call after GS_get_selected_point_on_surface().
Prints NULL or the value (i.e., "921.5") to valstr
id | surface id | |
att | attribute id | |
[out] | valstr | value string (allocated, dim?) |
x,y | real coordinates |
Definition at line 1293 of file GS2.c.
References b, 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, NULL, r, VCOL2DCOL, VROW2DROW, X, X2VCOL, Y, and Y2VROW.
Referenced by gui_modules.wxnviz.Nviz::QueryMap().
void GS_get_viewdir | ( | float * | dir | ) |
Get viewdir.
[out] | dir | viewdir value |
Definition at line 2791 of file GS2.c.
References FROM, and GS_v3dir().
Referenced by GK_add_key(), and gk_follow_frames().
int GS_get_wire_color | ( | int | id, |
int * | colr | ||
) |
Get wire color.
id | surface id | |
[out] | colr | color value |
Definition at line 2020 of file GS2.c.
References gs_get_surf().
int GS_get_zextents | ( | int | id, |
float * | min, | ||
float * | max, | ||
float * | mid | ||
) |
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 2648 of file GS2.c.
References G_debug(), gs_get_surf(), gs_get_zextents(), and NULL.
int GS_get_zrange | ( | float * | min, |
float * | max, | ||
int | doexag | ||
) |
Get z-extent for all loaded surfaces.
[out] | min | min z-value |
[out] | max | max z-value |
doexag | use z-exaggeration |
Definition at line 2671 of file GS2.c.
References G_debug(), gs_get_zrange(), and gvl_get_zrange().
Referenced by gs_get_databounds_planes(), Gs_save_3dview(), gsd_check_focus(), gsd_def_cplane(), gsd_do_scale(), gsd_model2real(), gsd_model2surf(), and gsd_real2model().
void GS_get_zrange_nz | ( | float * | min, |
float * | max | ||
) |
Get Z extents for all loaded surfaces.
Treating zeros as "no data"
[out] | min | min value |
[out] | max | max value |
Definition at line 2338 of file GS2.c.
References first, G_debug(), and gs_get_surf().
Referenced by Nviz_get_exag_height(), and Nviz_update_ranges().
void GS_getlight_ambient | ( | int | num, |
float * | red, | ||
float * | green, | ||
float * | blue | ||
) |
void GS_getlight_color | ( | int | num, |
float * | red, | ||
float * | green, | ||
float * | blue | ||
) |
void GS_getlight_position | ( | int | num, |
float * | xpos, | ||
float * | ypos, | ||
float * | zpos, | ||
int * | local | ||
) |
Get light position.
num | light id (starts at 1) | |
[out] | xpos,ypos,zpos | coordinates |
[out] | local | ? |
Definition at line 321 of file GS2.c.
Referenced by gk_follow_frames().
float GS_global_exag | ( | void | ) |
Get global z-exag value.
Definition at line 1981 of file GS2.c.
References G_debug().
Referenced by gpd_3dsite(), gpd_obj(), gpd_obj_site_attr(), 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().
int GS_has_transparency | ( | void | ) |
void GS_init_view | ( | void | ) |
Init viewpoint.
Definition at line 3263 of file GS2.c.
References first, FROM, G_debug(), GS_get_aspect(), GS_set_focus(), GS_v3eq(), GS_v3normalize(), X, and Y.
Referenced by Nviz_init_view().
int GS_is_masked | ( | int | id, |
float * | pt | ||
) |
Check if point is masked ?
id | surface id |
pt | point |
Definition at line 998 of file GS2.c.
References gs_get_surf(), gs_point_is_masked(), X, and Y.
void GS_libinit | ( | void | ) |
Initialize OGSF library.
Get region settings - wind
Set Region (NSWE array) and compute scale
Definition at line 95 of file GS2.c.
References Cxl_func, first, G_get_set_window(), gs_init(), Swap_func, and void_func().
void GS_lights_off | ( | void | ) |
void GS_lights_on | ( | void | ) |
int GS_load_3dview | ( | const char * | vname, |
int | surfid | ||
) |
Load 3d view.
vname | view file name |
surfid | surface id |
Definition at line 3245 of file GS2.c.
References gs_get_surf(), and Gs_load_3dview().
int GS_load_att_map | ( | int | id, |
const char * | filename, | ||
int | att | ||
) |
Load raster map as attribute.
id | surface id |
filename | filename |
att | attribute descriptor |
Definition at line 1590 of file GS2.c.
References G_debug(), G_fatal_error(), G_find_cell2(), G_fully_qualified_name(), G_get_cellhd(), 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(), and NULL.
Referenced by Nviz_set_attr().
int GS_look_here | ( | int | sx, |
int | sy | ||
) |
Send screen coords sx and sy, lib traces through surfaces; sets new center to point of nearest intersection.
If no intersection, uses line of sight with length of current view ray (eye to center) to set new center.
Reset center of view to screen coordinates sx, sy.
sx,sy | screen coordinates |
Definition at line 2921 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(), X, and Y.
void GS_moveto | ( | float * | pt | ) |
Move viewpoint.
pt | 'from' model coordinates |
Definition at line 2599 of file GS2.c.
References FROM, G_debug(), GS_v3add(), GS_v3eq(), GS_v3normalize(), and GS_v3sub().
Referenced by gk_follow_frames(), GS_moveto_real(), and Nviz_set_viewpoint_position().
void GS_moveto_real | ( | float * | pt | ) |
Move position to (real)
pt | point real coordinates |
Definition at line 2629 of file GS2.c.
References GS_moveto(), and gsd_real2model().
Referenced by Gs_load_3dview(), and Nviz_set_viewpoint_height().
int GS_new_light | ( | void | ) |
Add new model light.
Definition at line 254 of file GS2.c.
References first, gsd_deflight(), gsd_init_lightmodel(), gsd_switchlight(), X, and Y.
Referenced by Nviz_new_light().
int GS_new_surface | ( | void | ) |
Add new surface.
Note that origin has 1/2 cell added to represent center of cells because library assumes that east - west = (cols - 1) * ew_res, since left and right columns are on the edges.
Definition at line 219 of file GS2.c.
References G_debug(), gs_get_new_surface(), gs_init_surf(), gs_set_att_src(), and gs_set_defaults().
Referenced by Nviz_new_map_obj().
int GS_num_surfs | ( | void | ) |
Get number of surfaces.
Definition at line 1507 of file GS2.c.
References gs_num_surfaces().
Referenced by gui_modules.wxnviz.Nviz::LoadVector(), Nviz_new_map_obj(), and Nviz_set_focus_map().
void GS_ready_draw | ( | void | ) |
Definition at line 2470 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_quick(), and Nviz_resize_window().
int GS_save_3dview | ( | const char * | vname, |
int | surfid | ||
) |
Save 3d view.
vname | view file name |
surfid | surface id |
Definition at line 3232 of file GS2.c.
References gs_get_surf(), and Gs_save_3dview().
int GS_set_att_const | ( | int | id, |
int | att, | ||
float | constant | ||
) |
Set attribute constant.
id | surface id |
att | attribute id |
constant | value |
Definition at line 1395 of file GS2.c.
References gs_get_surf(), gs_set_att_const(), and Gs_update_attrange().
Referenced by gui_modules.wxnviz.Nviz::LoadVector(), and Nviz_set_attr().
void GS_set_att_defaults | ( | float * | defs, |
float * | null_defs | ||
) |
Set default attributes for map objects.
defs | attributes array (dim MAX_ATTS) |
null_defs | null attributes array (dim MAX_ATTS) |
Definition at line 167 of file GS2.c.
References G_debug().
Referenced by Nviz_set_surface_attr_default().
int GS_Set_ClientData | ( | int | id, |
void * | clientd | ||
) |
Set client data.
id | surface id |
clientd | pointer to client data struct |
Definition at line 1468 of file GS2.c.
References gs_get_surf().
void GS_set_cplane | ( | int | num | ) |
Set cplace.
num | cplane id |
Definition at line 3131 of file GS2.c.
References gsd_cplane_on().
void GS_set_cplane_rot | ( | int | num, |
float | dx, | ||
float | dy, | ||
float | dz | ||
) |
Set cplace rotation.
num | cplace id |
dx,dy,dz | rotation values |
Definition at line 3038 of file GS2.c.
References gsd_cplane_setrot().
void GS_set_cplane_trans | ( | int | num, |
float | dx, | ||
float | dy, | ||
float | dz | ||
) |
Set cplace trans.
num | cplace id |
dx,dy,dz | rotation values |
Definition at line 3051 of file GS2.c.
References gsd_cplane_settrans().
void GS_set_draw | ( | int | where | ) |
Sets which buffer to draw to.
where | GSD_BOTH, GSD_FRONT, GSD_BACK |
Definition at line 2441 of file GS2.c.
References gsd_backbuffer(), 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_north_arrow(), gsd_ortho_wall(), gsd_scalebar(), Nviz_draw_all(), Nviz_draw_all_site(), Nviz_draw_all_vect(), Nviz_draw_all_vol(), Nviz_draw_quick(), and Nviz_resize_window().
int GS_set_drawmode | ( | int | id, |
int | mode | ||
) |
Set draw mode.
id | surface id |
mode | mode type(s) |
Definition at line 2065 of file GS2.c.
References G_debug(), and gs_get_surf().
Referenced by GS_setall_drawmode(), Nviz_set_attr(), and gui_modules.wxnviz.Nviz::SetSurfaceStyle().
int GS_set_drawres | ( | int | id, |
int | xres, | ||
int | yres, | ||
int | xwire, | ||
int | ywire | ||
) |
Set draw resolution for surface.
id | surface id |
xres,yres | x/y resolution value |
xwire,ywire | x/y wire value |
Definition at line 2203 of file GS2.c.
References G_debug(), and gs_get_surf().
Referenced by GS_setall_drawres(), Nviz_set_attr(), and gui_modules.wxnviz.Nviz::SetSurfaceRes().
void GS_set_exag | ( | int | id, |
float | exag | ||
) |
Set Z exag for surface.
id | surface id |
exag | z-exag value |
Definition at line 1935 of file GS2.c.
References G_debug(), and gs_get_surf().
void GS_set_fencecolor | ( | int | mode | ) |
Set fence color.
mode | mode id |
Definition at line 3172 of file GS2.c.
References gsd_setfc().
void GS_set_focus | ( | float * | realto | ) |
Set focus.
realto | real coordinates to |
Definition at line 2502 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(), and GVL_set_focus_center_map().
void GS_set_focus_center_map | ( | int | id | ) |
Set focus to map center.
id | surface id |
Definition at line 2564 of file GS2.c.
References G_debug(), gs_get_surf(), GS_set_focus(), X, and Y.
Referenced by Nviz_set_focus_map().
void GS_set_focus_real | ( | float * | realto | ) |
Set real focus.
realto | real coordinates to |
Definition at line 2520 of file GS2.c.
References G_get_set_window(), GS_v3eq(), gsd_set_view(), X, and Y.
void GS_set_fov | ( | int | fov | ) |
Set field of view.
fov | fov value |
Definition at line 2825 of file GS2.c.
Referenced by gk_follow_frames(), Gs_load_3dview(), and Nviz_set_viewpoint_persp().
void GS_set_global_exag | ( | float | exag | ) |
Set global z-exag value.
exag | exag value to be set up |
Definition at line 1959 of file GS2.c.
References G_debug().
Referenced by Gs_load_3dview(), and Nviz_change_exag().
void GS_set_infocus | ( | void | ) |
Set focus.
Make sure that the center of view is set
Definition at line 2883 of file GS2.c.
References G_debug().
Referenced by Nviz_set_focus_state().
int GS_set_maskmode | ( | int | id, |
int | mode | ||
) |
Set mask mode.
Mask attribute special: constant is set to indicate invert or no
id | surface id |
mode | id |
Definition at line 1419 of file GS2.c.
References gs_get_surf().
void GS_set_Narrow | ( | int * | pt, |
int | id, | ||
float * | pos2 | ||
) |
Set decoration, north arrow ??
pt | point value in true world coordinates (?) | |
id | surface id | |
[out] | pos2 | output coordinates |
Definition at line 554 of file GS2.c.
References GS_get_selected_point_on_surface(), gs_get_surf(), gsd_do_scale(), gsd_pushmatrix(), X, and Y.
void GS_set_nofocus | ( | void | ) |
Unset focus.
Definition at line 2869 of file GS2.c.
References G_debug().
Referenced by GS_set_viewdir(), Nviz_set_focus_map(), and Nviz_set_focus_state().
void GS_set_nozero | ( | int | id, |
int | att, | ||
int | mode | ||
) |
Set no-zero ?
id | surface id |
att | attribute id |
mode | mode id |
Definition at line 2113 of file GS2.c.
References G_debug(), and gs_get_surf().
int GS_set_SDscale | ( | float | scale | ) |
Set ?
scale | scale value |
Definition at line 1053 of file GS2.c.
References gsdiff_set_SDscale().
int GS_set_SDsurf | ( | int | id | ) |
Set surface as Scaled Difference surface.
id | surface id |
Definition at line 1032 of file GS2.c.
References gs_get_surf(), and gsdiff_set_SDref().
void GS_set_trans | ( | int | id, |
float | xtrans, | ||
float | ytrans, | ||
float | ztrans | ||
) |
Set trans ?
id | surface id |
xtrans,ytrans,ztrans | real trans coordinates |
Definition at line 2372 of file GS2.c.
References G_debug(), and gs_get_surf().
Referenced by gui_modules.wxnviz.Nviz::SetSurfacePosition().
void GS_set_twist | ( | int | t | ) |
Set viewpoint twist value.
10ths of degrees off twelve o'clock
t tenths of degrees clockwise from 12:00.
Definition at line 2859 of file GS2.c.
Referenced by gk_follow_frames(), Gs_load_3dview(), and Nviz_set_viewpoint_twist().
void GS_set_viewdir | ( | float * | dir | ) |
Set viewdir.
Automatically turns off focus
dir | viewdir value |
Definition at line 2805 of file GS2.c.
References FROM, GS_set_nofocus(), GS_v3add(), GS_v3eq(), GS_v3norm(), and gsd_set_view().
Referenced by gk_follow_frames().
void GS_set_viewport | ( | int | left, |
int | right, | ||
int | bottom, | ||
int | top | ||
) |
Set viewport.
left,right,bottom,top | viewport extent values |
Definition at line 2897 of file GS2.c.
References G_debug(), and gsd_viewport().
Referenced by Nviz_resize_window().
void GS_set_wire_color | ( | int | id, |
int | colr | ||
) |
Set wire color.
id | surface id |
colr | color value |
Definition at line 1996 of file GS2.c.
References G_debug(), and gs_get_surf().
Referenced by gui_modules.wxnviz.Nviz::SetWireColor().
int GS_setall_drawmode | ( | int | mode | ) |
Set all draw-modes.
mode | mode id |
Definition at line 2043 of file GS2.c.
References GS_set_drawmode().
Referenced by Gs_load_3dview(), and gui_modules.wxnviz.Nviz::SetSurfaceStyle().
int GS_setall_drawres | ( | int | xres, |
int | yres, | ||
int | xwire, | ||
int | ywire | ||
) |
Set all draw resolutions.
xres,yres | x/y resolution value |
xwire,ywire | x/y wire value |
Definition at line 2180 of file GS2.c.
References GS_set_drawres().
Referenced by Gs_load_3dview(), and gui_modules.wxnviz.Nviz::SetSurfaceRes().
void GS_setlight_ambient | ( | int | num, |
float | red, | ||
float | green, | ||
float | blue | ||
) |
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 388 of file GS2.c.
References gsd_deflight().
Referenced by Nviz_set_light_ambient().
void GS_setlight_color | ( | int | num, |
float | red, | ||
float | green, | ||
float | blue | ||
) |
Set light color.
num | light id (starts at 1) |
red,green,blue | color values (from 0.0 to 1.0) |
Definition at line 344 of file GS2.c.
References gsd_deflight().
Referenced by Nviz_set_light_bright(), and Nviz_set_light_color().
void GS_setlight_position | ( | int | num, |
float | xpos, | ||
float | ypos, | ||
float | zpos, | ||
int | local | ||
) |
Set light position.
num | light id (starts with 1) |
xpos,ypos,zpos | coordinates (model) |
local | local coordinate (for viewport) |
Definition at line 295 of file GS2.c.
References gsd_deflight(), X, and Y.
Referenced by gk_follow_frames(), Nviz_draw_all_surf(), and Nviz_set_light_position().
int GS_surf_exists | ( | int | id | ) |
Check if surface exists
id | surface id |
Definition at line 189 of file GS2.c.
References G_debug(), gs_get_surf(), and NULL.
Referenced by gui_modules.wxnviz.Nviz::GetSurfacePosition(), GP_select_surf(), GS_delete_surface(), GV_select_surf(), Nviz_new_fringe(), Nviz_set_fringe(), gui_modules.wxnviz.Nviz::SetSurfaceAttr(), gui_modules.wxnviz.Nviz::SetSurfacePosition(), gui_modules.wxnviz.Nviz::SetSurfaceRes(), gui_modules.wxnviz.Nviz::SetSurfaceStyle(), gui_modules.wxnviz.Nviz::SetVectorLineSurface(), gui_modules.wxnviz.Nviz::SetVectorPointSurface(), gui_modules.wxnviz.Nviz::SetWireColor(), gui_modules.wxnviz.Nviz::UnloadSurface(), and gui_modules.wxnviz.Nviz::UnsetSurfaceAttr().
void GS_switchlight | ( | int | num, |
int | on | ||
) |
Switch on/off light.
num | light id (starts at 1) |
on | non-zero for 'on' otherwise 'off' |
Definition at line 459 of file GS2.c.
References gsd_switchlight().
int GS_transp_is_set | ( | void | ) |
Check if transparency is set.
Definition at line 478 of file GS2.c.
References gs_att_is_set(), gsd_getfc(), and NULL.
int GS_unset_att | ( | int | id, |
int | att | ||
) |
Unset attribute.
id | surface id |
att | attribute id |
Definition at line 1376 of file GS2.c.
References gs_get_surf(), and gs_set_att_src().
Referenced by Nviz_unset_attr().
void GS_unset_cplane | ( | int | num | ) |
Unset clip place (turn off)
num | cplane id |
Definition at line 3143 of file GS2.c.
References gsd_cplane_off().
Referenced by Nviz_off_cplane().
void GS_unset_SDsurf | ( | void | ) |
Unset Scaled Difference surface.
Definition at line 1016 of file GS2.c.
References gsdiff_set_SDref(), and NULL.
int GS_update_curmask | ( | int | id | ) |
Update current mask.
May be called to update total mask for a surface at convenient times instead of waiting until ready to redraw surface
id | surface id |
Definition at line 980 of file GS2.c.
References gs_get_surf(), and gs_update_curmask().
int GS_update_normals | ( | int | id | ) |
Update normals.
id | surface id |
Definition at line 1102 of file GS2.c.
References gs_calc_normals(), and gs_get_surf().
void GS_zoom_setup | ( | int * | a, |
int * | b, | ||
int * | c, | ||
int * | d, | ||
int * | maxx, | ||
int * | maxy | ||
) |
Get zoom setup.
[out] | a,b,c,d | current viewport settings |
[out] | maxx,maxy | max viewport size |
Definition at line 2754 of file GS2.c.
References gsd_getViewport().
int gsd_getViewport | ( | GLint * | , |
GLint * | |||
) |
Referenced by GS_zoom_setup().
void void_func | ( | void | ) |
Definition at line 83 of file GS2.c.
Referenced by GS_libinit().