**************************************************************************** *** flythrough "README" **************************************************** **************************************************************************** MODULE: togl_flythrough.c 0.993 AUTHOR(S): ACS - Massimo Cuomo - m.cuomo at acsys.it PURPOSE: "Immersive" navigation by means of mouse buttons and movement In conjunction with flythrough.tcl New (new) and modified (mod) files for flythrough implementation: +++ visualization/nviz/scripts (new) visualization/nviz/scripts/flythrough.tcl tcl part for togl_flythrough.c (mod) visualization/nviz/scripts/panel_main.tcl "source" for flythrough.tcl and set UI for flythrough (mod) visualization/nviz/scripts/panel_kanimator.tcl replaced get_focus with get_viewdir to work with flythrough +++ visualization/nviz/src (new) visualization/nviz/src/togl_flythrough.c all flythrough navigation Nset/Nget_viewdir commands override of command Ndraw_all (function draw_all in file draw.c) by function draw_all_together for drawing surf/vector/site in "fine" resolution all together with no flickering (no CLR between any of them) added semaphore "is_drawing" to avoid "clogging" between ordinary drawing and flythrough that try to draw continuously (mod) visualization/nviz/src/quick_draw.c calls "flythrough_draw_cb()" after drawing, before returning in order to execute callbacks at the right moment functions that call "GS_alldraw_wire" do not execute "flythrough_draw_cb()" (mod) visualization/nviz/src/nviz_init.c creates tcl commands and variables by calling togl_flythrough_init_tcl(interp, &data); that also adds timer function by calling Togl_TimerFunc(togl_flythrough_timer_cb); that first time calls togl_flythrough_init(togl); THIS IS THE Ninit FUNCTION WITH flythrough ADDITION int Ninit(Tcl_Interp * interp, Tk_Window w) { static Nv_data data; init_commands(interp, &data); Ninitdata(interp, &data); /*** ACS_MODIFY flythrough ONE LINE ******************************************/ togl_flythrough_init_tcl(interp, &data); /* compile in the home directory */ Tcl_SetVar(interp, "src_boot", getenv("GISBASE"), TCL_GLOBAL_ONLY); return(TCL_OK); } THIS IS THE END PART OF THE NUNCTION Nquick_draw_cmd WITH flythrough_postdraw_cb() ADDITION { ... GS_done_draw(); G_free (surf_list); /*** ACS_MODIFY flythrough ONE LINE ******************************************/ flythrough_postdraw_cb(); return (TCL_OK); } WARNING: remember to add "togl_flythrough.o" into the visualization/nviz/src/Makefile +++ visualization/nviz/bitmaps (new) visualization/nviz/bitmaps/flythrough/.gif a_lr.gif b_c.gif b_lc.gif b_lr.gif vuota.gif a_ud.gif b_cr.gif b_l.gif b_r.gif icons for flythrough help +++ lib/ogsf (mod) lib/ogsf/gk.c changed get/set_focus with get/set_viewdir for kanimator to work with flythrough corrected bug when adding point with disabled channels (mod) lib/ogsf/GK2.c changed get/set_focus with get/set_viewdir for kanimator to work with flythrough ******************************************************************************** ******************************************************************************** ********************************************************************************