2
############################################################################
4
Date: Thu, 03 Mar 2005 12:12:01 +0100
5
From: Massimo Cuomo <m cuomo acsys it>
7
Hello Markus, Helena and Bob.
9
Here is a new version of the flythrough navigation with simplified
10
istallation: I have reduced the files that must be modified in order to
11
get the thing working.
13
I have added also the flythrough working with kanimator and a useful
14
callback mechanism to "draw things" after everything has been drawn, but
15
if you are not interested in these functions you can install only the
18
There are three types of flythrough navigation: basic, simple and orbit.
19
All the three are simply explained by an iconic help available at
20
runtime through the GUI. The "basic mode" is what we at ACS use the most
21
(Markus used it) and is taken by SGI Performer. The "simple mode" is
22
what Markus asked for. The "orbit mode" leaves the object at the center
23
and the eye orbits around looking always to the center.
25
The flythrough didn't work with kanimator, because it uses
26
get/set_focus, instead of get/set_viewdir. So I changed these functions
27
and created the Nget/set_viewdir tcl commands to solve the problem.
29
I added the "callback" mechanism because I used it to draw objects with
30
special characteristics that have to be drawn at each frame, so I had to
31
modify also the quick_draw.c file to call the cb when drawing "wire".
33
To find lines added by me, look for "ACS" in the code.
35
I have tested everything on linux machines.
37
I hope this can be useful.
42
This is the procedure:
44
*** "BASIC" installation **************************************
48
visualization/nviz/scripts/flythrough.tcl
49
tcl part for togl_flythrough.c
51
visualization/nviz/src/togl_flythrough.c
52
all flythrough navigation
53
Nset/Nget_viewdir commands
54
override of command Ndraw_all (function draw_all
55
in file draw.c) by function draw_all_together for drawing
56
surf/vector/site in "fine" resolution
57
all together with no flickering (no CLR
59
added semaphore "is_drawing" to avoid "clogging"
60
between ordinary drawing and flythrough that
61
try to draw continuously (there is a "multiprocess
62
behavior" on my computer, probably due to the nvidia
65
visualization/nviz/bitmaps/flythrough/*.gif
66
a_lr.gif b_c.gif b_lc.gif b_lr.gif vuota.gif
67
a_ud.gif b_cr.gif b_l.gif b_r.gif
68
icons for flythrough help
71
=== Modified files ===
73
visualization/nviz/scripts/panel_main.tcl
74
"source" for flythrough.tcl and set UI for flythrough
76
visualization/nviz/src/nviz_init.c
77
creates tcl commands and variables by calling
78
togl_flythrough_init_tcl(interp, &data);
79
that also adds timer function by calling
80
Togl_TimerFunc(togl_flythrough_timer_cb);
82
togl_flythrough_init(togl);
84
This is the only line added to nviz_init.c
85
int Ninit(Tcl_Interp * interp, Tk_Window w)
88
init_commands(interp, &data);
89
Ninitdata(interp, &data);
91
/*** ACS_MODIFY flythrough ONE LINE ***/
92
togl_flythrough_init_tcl(interp, &data);
94
/* compile in the home directory */
95
Tcl_SetVar(interp, "src_boot", getenv("GISBASE"), TCL_GLOBAL_ONLY);
101
*** "KANIMATOR" installation **************************************
103
=== Modified files ===
105
visualization/nviz/scripts/panel_kanimator.tcl
106
replaced get_focus with get_viewdir to work with flythrough
109
changed get/set_focus with get/set_viewdir for kanimator
110
to work with flythrough
111
corrected bug when adding point with disabled channels
114
changed get/set_focus with get/set_viewdir for kanimator
115
to work with flythrough
118
*** "CALLBACK" installation **************************************
120
=== Modified files ===
122
visualization/nviz/src/quick_draw.c
123
calls "flythrough_draw_cb()" after drawing, before returning
124
in order to execute callbacks at the right moment
125
functions that call "GS_alldraw_wire" do not execute
126
"flythrough_draw_cb()"
129
This is the only line added to
131
int Nquick_draw_cmd(Nv_data * dc, Tcl_Interp * interp)
136
GS_set_draw(GSD_BACK);
137
GS_clear(dc->BGcolor);
139
surf_list = GS_get_surf_list(&max);
141
max = GS_num_surfs();
142
for (i = 0; i < max; i++) {
143
if (check_blank(interp, surf_list[i]) == 0) {
144
GS_draw_wire(surf_list[i]);
150
/*** ACS_MODIFY flythrough ONE LINE ***/
151
flythrough_postdraw_cb();
158
############################################################################
159
2002-2005: Bob Covill: significant code cleanup
160
2004: Tomas Paudits, Jaro Hofierka, Helena Mitasova: 3D Voxel visualization
162
############################################################################
164
change_view.c modified:
165
This update correctes the following problems:
166
Screen redrawn in wire mode when mouse passes over
168
Also a potential problem with colors in glwrappers.c
169
(adress of a local variable returned in color selection)
170
Modified intesection function to allow the "look here"
171
functionality and the "What's here" functionality.
174
p_de_mouveaux@hotmail.com
177
Moved ogsf-lib and libimage to src/libes/ and changed Gmakefiles
180
Modified for Linux/tlc/tk8.x Markus Neteler neteler@geog.uni-hannover.de
195
-> fixed path errors.
197
Tue Mar 19 16:31:46 1996 Mark Astley <astley@gambit.gis.uiuc.edu (Mark Astley)>
199
* map_obj.c (get_char_marker): Changed the default return value of
200
"get_char_marker" so that an empty string is returned to tcl. It
201
is up to the tcl code to figure out what to do in this case.
203
Mon Mar 11 15:37:58 1996 Mark Astley <astley@gambit.gis.uiuc.edu (Mark Astley)>
205
* Gmakefile (OBJS): The "mkdspf" panel and C support is expected
206
to be obsolete soon so I have removed these features from Nviz.
207
See the directory ../archive for details.
209
Wed Mar 6 12:29:40 1996 Mark Astley <astley@gambit.gis.uiuc.edu (Mark Astley)>
211
* Gmakefile (TK_LIB_PATH): Made this version link to the tk4.0
212
compatible version of tkGLX. Eventually we will want to move all
213
the libraries to their usual places in /usr/local.
215
Tue Mar 5 14:46:30 1996 Mark Astley <astley@gambit.gis.uiuc.edu (Mark Astley)>
217
* tkSend.c: Disabled security on tksend. Make sure that script
218
writers are aware of this option as nvwish interpreters will now
219
accept any and all scripts.
221
Mon Mar 4 17:09:18 1996 Mark Astley <astley@gambit.gis.uiuc.edu (Mark Astley)>
223
* tkScale.c: Removed this file as apparently the old tk3.6 way of
224
handling mouse events from C code has been removed and done in the
225
usual fashion via the scale.tcl file in /usr/local/include/tk.
227
* Gmakefile (TKGLX_INCLUDES): Start of upgrade to Tcl 7.4 and Tk
228
4.0. So far this has required mostly minor changes. In
229
particular, I have created updated versions of the tkBind and
230
tkSpecial_Wait files. Still need to update tkScale and tkSend.
231
Also, none of the nviz scripts have been updated and the old tkGLX
232
widget stuff is still being used with this version.
234
(nvwish): Cleaned up the Gmakefile a bit using the recent GRASS
235
4.2 distribution version as the template.