int Nquick_draw_cmd(Nv_data * dc, Tcl_Interp * interp) { int i, max; int *surf_list, *vol_list; GS_set_draw(GSD_BACK); GS_clear(dc->BGcolor); GS_ready_draw(); surf_list = GS_get_surf_list(&max); max = GS_num_surfs(); for (i = 0; i < max; i++) { if (check_blank(interp, surf_list[i]) == 0) { GS_draw_wire(surf_list[i]); } } G_free(surf_list); vol_list = GVL_get_vol_list(&max); max = GVL_num_vols(); for (i = 0; i < max; i++) { if (check_blank(interp, vol_list[i]) == 0) { GVL_draw_wire(vol_list[i]); } } GS_done_draw(); /*** ACS_MODIFY flythrough ONE LINE ***************/ flythrough_postdraw_cb(); return (TCL_OK); }
/*! \brief Set focus based on loaded map If <i>map</i> is MAP_OBJ_UNDEFINED, set focus from first surface/volume in the list. \param type map object type \param id map object id \return 0 on no focus \return id id of map object used for setting focus */ int Nviz_set_focus_map(int type, int id) { if (GS_num_surfs() < 0 && GVL_num_vols() < 0) { GS_set_nofocus(); return 0; } if (type == MAP_OBJ_UNDEFINED) { int *surf_list, num_surfs, *vol_list; if (GS_num_surfs() > 0) { surf_list = GS_get_surf_list(&num_surfs); id = surf_list[0]; G_free(surf_list); GS_set_focus_center_map(id); } if (GVL_num_vols() > 0) { vol_list = GVL_get_vol_list(&num_surfs); id = vol_list[0]; G_free(vol_list); GVL_set_focus_center_map(id); } return id; } if (type == MAP_OBJ_SURF) { GS_set_focus_center_map(id); } else if (type == MAP_OBJ_VOL) { GVL_set_focus_center_map(id); } return id; }