source: trunk/Documentation/geant4/UserDocumentation/UsersGuides/ForApplicationDeveloper/html/ch08s03.html @ 902

Last change on this file since 902 was 902, checked in by garnier, 16 years ago

debut de modif de la doc

File size: 46.8 KB
Line 
1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>8.3.  The Visualization Drivers</title><link rel="stylesheet" href="../xml/XSLCustomizationLayer/G4HTMLStylesheet.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.71.1"><link rel="start" href="index.html" title="Geant4 User's Guide for Application Developers"><link rel="up" href="ch08.html" title="Chapter 8.  Visualization"><link rel="prev" href="ch08s02.html" title="8.2.  Adding Visualization to Your Executable"><link rel="next" href="ch08s04.html" title="8.4.  Controlling Visualization from Commands"><script language="JavaScript">
2function remote_win(fName)
3{
4   var url = "AllResources/Detector/geometry.src/" + fName;
5   RemoteWin=window.open(url,"","resizable=no,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,copyhistory=0,width=520,height=520")
6   RemoteWin.creator=self
7}
8</script></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">8.3. 
9The Visualization Drivers
10</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch08s02.html"><img src="AllResources/IconsGIF/prev.gif" alt="Prev"></a> </td><th width="60%" align="center">Chapter 8. 
11Visualization
12</th><td width="20%" align="right"> <a accesskey="n" href="ch08s04.html"><img src="AllResources/IconsGIF/next.gif" alt="Next"></a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="sect.VisDrv"></a>8.3. 
13The Visualization Drivers
14</h2></div></div></div><p>
15As explained in the
16
17Introduction to Visualization
18
19, Geant4 provides many different choices of
20visualization systems. Features and notes on each driver are
21briefly described here along with links to detailed web pages for
22the various drivers.
23</p><p>
24Details are given below for:
25
26</p><div class="itemizedlist"><ul type="disc" compact><li><p>
27    <a href="ch08s03.html#sect.VisDrv.OpenGL" title="8.3.2. 
28OpenGL
29">Section 8.3.2</a>
30    OpenGL
31  </p></li><li><p>
32    <a href="ch08s03.html#sect.VisDrv.OpenInv" title="8.3.3. 
33OpenInventor
34">Section 8.3.3</a>
35    OpenInventor
36  </p></li><li><p>
37    <a href="ch08s03.html#sect.VisDrv.HepRep" title="8.3.4. 
38HepRepFile
39">Section 8.3.4</a>
40    HepRepFile
41  </p></li><li><p>
42    <a href="ch08s03.html#sect.VisDrv.HepRepXML" title="8.3.5. 
43HepRepXML
44">Section 8.3.5</a>
45    HepRepXML
46  </p></li><li><p>
47    <a href="ch08s03.html#sect.VisDrv.DAWN" title="8.3.6. 
48DAWN
49">Section 8.3.6</a>
50    DAWN
51  </p></li><li><p>
52    <a href="ch08s03.html#sect.VisDrv.VRML" title="8.3.8. 
53VRML
54">Section 8.3.8</a>
55    VRML
56  </p></li><li><p>
57    <a href="ch08s03.html#sect.VisDrv.RayTrc" title="8.3.9. 
58RayTracer
59">Section 8.3.9</a>
60    RayTracer
61  </p></li><li><p>
62    <a href="ch08s03.html#sect.VisDrv.DetTree" title="8.3.10. 
63Visualization of detector geometry tree
64">Section 8.3.10</a>
65    ASCIITree
66  </p></li><li><p>
67    <a href="ch08s03.html#sect.VisDrv.GAGTree" title="8.3.11. 
68GAG Tree
69">Section 8.3.11</a>
70    GAGTree
71  </p></li><li><p>
72    <a href="ch08s03.html#sect.VisDrv.XMLTree" title="8.3.12. 
73XML Tree
74">Section 8.3.12</a>
75    XMLTree
76  </p></li><li><p>
77    <a href="ch08s03.html#sect.VisDrv.Qt" title="8.3.13. 
78XML Tree
79">Section 8.3.13</a>
80    Qt
81  </p></li></ul></div><p>
82</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.VisDrv.Avail"></a>8.3.1. 
83Availability of drivers on the supported systems
84</h3></div></div></div><p>
85<a href="ch08s03.html#table.VisDrv_1" title="Table 8.1. 
86Required graphics systems and supported platforms for the various
87visualization drivers.
88">Table 8.1</a> lists required graphics systems
89and supported platforms for the various visualization drivers
90
91</p><div class="table"><a name="table.VisDrv_1"></a><div class="table-contents"><table summary="
92Required graphics systems and supported platforms for the various
93visualization drivers.
94" border="1"><colgroup><col><col><col></colgroup><tbody><tr><td>
95      <span class="bold"><strong>Driver</strong></span>
96    </td><td>
97      <span class="bold"><strong>Required Graphics System</strong></span>
98    </td><td>
99      <span class="bold"><strong>Platform</strong></span>
100    </td></tr><tr><td>
101      OpenGL-Xlib
102    </td><td>
103      OpenGL
104    </td><td>
105      Linux, Unix, Mac with Xlib
106    </td></tr><tr><td>
107      OpenGL-Motif
108    </td><td>
109      OpenGL
110    </td><td>
111      Linux, UNIX, Mac with Motif
112    </td></tr><tr><td>
113      OpenGL-Win32
114    </td><td>
115      OpenGL
116    </td><td>
117      Windows
118    </td></tr><tr><td>
119      Qt
120    </td><td>
121      OpenGL, Qt
122    </td><td>
123      Linux, UNIX, Mac, Windows with Qt
124    </td></tr><tr><td>
125      OpenInventor-X
126    </td><td>
127      OpenInventor, OpenGL
128    </td><td>
129      Linux, UNIX, Mac with Xlib or Motif
130    </td></tr><tr><td>
131      OpenInventor-Win32
132    </td><td>
133      OpenInventor, OpenGL
134    </td><td>
135      Windows
136    </td></tr><tr><td>
137      HepRep
138    </td><td>
139      WIRED or FRED HepRep Browser
140    </td><td>
141      Linux, UNIX, Mac, Windows
142    </td></tr><tr><td>
143      DAWNFILE
144    </td><td>
145      Fukui Renderer DAWN
146    </td><td>
147      Linux, Unix, Mac, Windows
148    </td></tr><tr><td>
149      DAWN-Network
150    </td><td>
151      Fukui Renderer DAWN
152    </td><td>
153      Linux, UNIX
154    </td></tr><tr><td>
155      VRMLFILE
156    </td><td>
157      any VRML viewer
158    </td><td>
159      Linux, UNIX, Mac, Windows
160    </td></tr><tr><td>
161      VRML-Network
162    </td><td>
163      any network-enabled VRML viewer
164    </td><td>
165      Linux, UNIX
166    </td></tr><tr><td>
167      RayTracer
168    </td><td>
169      any JPEG viewer
170    </td><td>
171      Linux, UNIX, Mac, Windows
172    </td></tr><tr><td>
173      ASCIITree
174    </td><td>
175      none
176    </td><td>
177      Linux, UNIX, Mac, Windows
178    </td></tr><tr><td>
179      GAGTree
180    </td><td>
181      GAG
182    </td><td>
183      Linux, UNIX, Mac, Windows
184    </td></tr><tr><td>
185      XMLTree
186    </td><td>
187      any XML viewer
188    </td><td>
189      Linux, UNIX, Mac, Windows
190    </td></tr></tbody></table></div><p class="title"><b>Table 8.1. 
191Required graphics systems and supported platforms for the various
192visualization drivers.
193</b></p></div><p><br class="table-break">
194</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.VisDrv.OpenGL"></a>8.3.2. 
195OpenGL
196</h3></div></div></div><p>
197These drivers have been developed by John Allison and Andrew
198Walkden (University of Manchester). It is an interface to the de
199facto standard 3D graphics library, OpenGL. It is well suited for
200real-time fast visualization and demonstration. Fast visualization
201is realized with hardware acceleration, reuse of shapes stored in a
202display list, etc. NURBS visualization is also supported.
203</p><p>
204Several versions of the OpenGL drivers are prepared. Versions
205for Xlib, Motif and Win32 platforms are available by default. For
206each version, there are two modes: immediate mode and stored mode.
207The former has no limitation on data size, and the latter is fast
208for visualizing large data repetitively, and so is suitable for
209animation.
210</p><p>
211If you don't have Motif, all control is done from Geant4
212commands:
213
214
215</p><div class="informalexample"><pre class="programlisting">
216     /vis/open OGLIX
217     /vis/viewer/set/viewpointThetaPhi 70 20
218     /vis/viewer/zoom 2
219     etc.
220</pre></div><p>
221</p><p>
222But if you have Motif libraries, you can control Geant4 from Motif
223widgets:
224
225</p><div class="informalexample"><pre class="programlisting">
226     /vis/open OGLIXm
227</pre></div><p>
228</p><p>
229The OpenGL driver added Smooth shading and Transparency since
230Geant4 release 8.0.
231</p><p>
232<span class="bold"><strong>Further information (OpenGL and Mesa):</strong></span>
233
234</p><div class="itemizedlist"><ul type="disc" compact><li><p>
235    <a href="http://www.opengl.org/" target="_top">
236    http://www.opengl.org/
237    </a>
238  </p></li><li><p>
239    <a href="http://www.mesa3d.org" target="_top">
240    http://www.mesa3d.org
241    </a>
242  </p></li><li><p>
243    <a href="http://geant4.slac.stanford.edu/Presentations/vis/G4OpenGLTutorial/G4OpenGLTutorial.html" target="_top">
244    Geant4 Visualization Tutorial
245    </a>
246    using the OpenGL Graphics System
247  </p></li></ul></div><p>
248</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.VisDrv.OpenInv"></a>8.3.3. 
249OpenInventor
250</h3></div></div></div><p>
251These drivers were developed by Jeff Kallenbach (FNAL) and Guy
252Barrand (IN2P3) based on the
253<a href="http://www-pat.fnal.gov/graphics/HEPVis/www" target="_top">
254Hepvis class library
255</a>
256 originated by Joe Boudreau (Pittsburgh University). The
257OpenInventor drivers and the Hepvis class library are based on the
258well-established OpenInventor technology for scientific
259visualization. They have high extendibility. They support high
260interactivity, e.g., attribute e diting of picked objects. Some
261OpenInventor viewers support "stereoscopic" effects.
262</p><p>
263It is also possible to save a visualized 3D scene as an
264OpenInventor-formatted file, and re-visualize the scene
265afterwards.
266</p><p>
267Because it is connected directly to the Geant4 kernel, using
268same language as that kernel (C++), OpenInventor systems can have
269direct access to Geant4 data (geometry, trajectories, etc.).
270</p><p>
271Because OpenInventor uses OpenGL for rendering, it supports
272lighting and transparency.
273</p><p>
274OpenInventor provides thumbwheel control to rotate and zoom.
275</p><p>
276OpenInventor supports picking to ask about data. [Control
277Clicking] on a volume turns on rendering of that volume's
278daughters. [Shift Clicking] a daughter turns that rendering off: If
279modeling opaque solid, effect is like opening a box to look
280inside.
281</p><p>
282<span class="bold"><strong>Further information (HEPVis and OpenScientist):</strong></span>
283
284</p><div class="itemizedlist"><ul type="disc" compact><li><p>
285    Geant4 Inventor Visualization with OpenScientist
286    <a href="http://openscientist.lal.in2p3.fr/v15r0/html/osc_g4_vis_ui.html" target="_top">
287    http://openscientist.lal.in2p3.fr/v15r0/html/osc_g4_vis_ui.html
288    </a>
289  </p></li><li><p>
290    Overall OpenScientist Home
291    <a href="http://openscientist.lal.in2p3.fr/v15r0/html/osc_g4_vis_ui.html" target="_top">
292    http://openscientist.lal.in2p3.fr/v15r0/html/osc_g4_vis_ui.html
293    </a>
294  </p></li><li><p>
295    HEPVis
296    <a href="http://www-pat.fnal.gov/graphics/HEPVis/www" target="_top">
297    http://www-pat.fnal.gov/graphics/HEPVis/www
298    </a>
299  </p></li></ul></div><p>
300</p><p>
301<span class="bold"><strong>Further information (OpenInventor):</strong></span>
302
303</p><div class="itemizedlist"><ul type="disc" compact><li><p>
304    <a href="http://oss.sgi.com/projects/inventor" target="_top">
305      http://oss.sgi.com/projects/inventor
306    </a>
307  </p></li><li><p>
308    Josie Wernecke, "The Inventor Mentor", Addison Wesley
309    (ISBN 0-201-62495-8)
310  </p></li><li><p>
311    Josie Wernecke, "The Inventor Toolmaker", Addison Wesley
312    (ISBN 0-201-62493-1)
313  </p></li><li><p>
314    "The Open Inventor C++ Reference Manual", Addison Wesley
315    (ISBN 0-201-62491-5)
316  </p></li></ul></div><p>
317</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.VisDrv.HepRep"></a>8.3.4. 
318HepRepFile
319</h3></div></div></div><p>
320The HepRepFile driver creates a HepRep XML file in the HepRep1
321format suitable for viewing with the
322<a href="http://www.slac.stanford.edu/BFROOT/www/Computing/Graphics/Wired/" target="_top">
323WIRED3</a> HepRep Browser.
324</p><p>
325The HepRep graphics format is further described at
326<a href="http://www.slac.stanford.edu/~perl/heprep" target="_top">
327http://www.slac.stanford.edu/~perl/heprep
328</a>
329.
330</p><p>
331To write just the detector geometry to this file, use the
332command:
333
334</p><div class="informalexample"><pre class="programlisting">
335     /vis/viewer/flush
336</pre></div><p>
337</p><p>
338Or, to also include trajectories and hits (after the appropriate
339/vis/viewer/add/trajectories or /vis/viewer/add/hits commands),
340just issue:
341
342</p><div class="informalexample"><pre class="programlisting">
343     /run/beamOn 1
344</pre></div><p>
345</p><p>
346HepRepFile will write a file called G4Data0.heprep to the
347current directory. Each subsequent file will have a file name like
348G4Data1.heprep, G4Data2.heprep, etc.
349</p><p>
350View the file using the WIRED3 HepRep Browser, available from:
351</p><p>
352<a href="http://www.slac.stanford.edu/BFROOT/www/Computing/Graphics/Wired/" target="_top">
353http://www.slac.stanford.edu/BFROOT/www/Computing/Graphics/Wired/
354</a>
355.
356</p><p>
357WIRED3 allows you to pick on volumes, trajectories and hits to
358find out their associated HepRep Attributes, such as volume name,
359particle ID, momentum, etc. These same attributes can be displayed
360as labels on the relevant objects, and you can make visibility cuts
361based on these attributes ("show me only the photons", or "omit any
362volumes made of iron").
363</p><p>
364WIRED3 can read heprep files in zipped format as well as
365unzipped, so you can save space by applying gzip to the heprep
366file. This will reduce the file to about five percent of its
367original size.
368</p><p>
369Several environment variables are available to override some of
370HepRepFile's defaults
371
372</p><div class="itemizedlist"><ul type="disc" compact><li><p>
373    You can specify a different directory for the heprep output
374    files by setting the environment variable G4HEPREPFILE_DIR, as in:
375
376    </p><div class="informalexample"><pre class="programlisting">
377     export G4HEPREPFILE_DIR=someOtherDir/someOtherSubDir
378    </pre></div><p>
379  </p></li><li><p>
380    You can specify a different file name (the part before the
381    number) by setting the environment variable G4HEPREPFILE_NAME, as in:
382
383    </p><div class="informalexample"><pre class="programlisting">
384     export G4HEPREPFILE_NAME=myFileName
385    </pre></div><p>
386
387    which will produce files named myFileName0.heprep,
388    myFileName1.heprep, etc.
389  </p></li><li><p>
390    You can specify that each file should overwrite the previous
391    file (always rewriting to the same file name) by setting the
392    environment variable G4HEPREPFILE_OVERWRITE, as in:
393
394    </p><div class="informalexample"><pre class="programlisting">
395     export G4HEPREPFILE_OVERWRITE=1
396    </pre></div><p>
397
398    This may be useful in some automated applications where you always
399    want to see the latest output file in the same location.
400  </p></li></ul></div><p>
401
402
403</p><div class="itemizedlist"><ul type="disc"><li><p>
404    Geant4 visualization supports a concept called "culling", by
405    which certain parts of the detector can be made invisible. Since
406    you may want to control visibility from the HepRep browser, turning
407    on visibility of detector parts that had defaulted to be invisible,
408    the HepRepFile driver does not omit these invisible detector parts
409    from the HepRep file. But for very large files, if you know that
410    you will never want to make these parts visible, you can choose to
411    have them left entirely out of the file. Set the environment
412    variable G4HEPREPFILE_CULL, as in:
413
414    </p><div class="informalexample"><pre class="programlisting">
415     export G4HEPREPFILE_CULL=1
416    </pre></div><p>
417  </p></li></ul></div><p>
418</p><p>
419<span class="bold"><strong>Further information:</strong></span>
420
421</p><div class="itemizedlist"><ul type="disc" compact><li><p>
422    WIRED3 Users Home Page:
423    </p><p>
424    <a href="http://www.slac.stanford.edu/BFROOT/www/Computing/Graphics/Wired/" target="_top">
425    http://www.slac.stanford.edu/BFROOT/www/Computing/Graphics/Wired/
426    </a>
427    .
428    </p><p>
429  </p></li><li><p>
430    HepRep graphics format:
431    </p><p>
432    <a href="http://www.slac.stanford.edu/~perl/heprep" target="_top">
433    http://www.slac.stanford.edu/~perl/heprep
434    </a>
435    </p><p>
436  </p></li><li><p>
437    Geant4 Visualization Tutorial using the WIRED3 HepRep Browser
438    </p><p>
439    <a href="http://geant4.slac.stanford.edu/Presentations/vis/G4WIREDTutorial/G4WIREDTutorial.html" target="_top">
440    http://geant4.slac.stanford.edu/Presentations/vis/G4WIREDTutorial/G4WIREDTutorial.html
441    </a>
442    </p><p>
443  </p></li></ul></div><p>
444</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.VisDrv.HepRepXML"></a>8.3.5. 
445HepRepXML
446</h3></div></div></div><p>
447The HepRepXML driver creates a HepRep file in the HepRep2 format
448suitable for viewing with the
449<a href="http://wired.freehep.org/index.html" target="_top">
450WIRED4
451</a>
452 Plugin to the JAS3 Analysis System or the
453<a href="http://www.fisica.uniud.it/~glast/FRED/" target="_top">
454FRED
455</a>
456 event display.
457</p><p>
458This driver can write both Binary HepRep (.bheprep) and XML
459HepRep (.heprep) files. Binary HepRep files are a one-to-one
460translation of XML HepRep files, but they are considerably shorter
461and faster to parse by a HepRepViewer such as WIRED 4.
462</p><p>
463Both Binary HepRep and XML HepRep can be compressed using the
464standard zlib library if linked into Geant4 using G4LIB_USE_ZLIB.
465If a standard zlib is not available (WIN32-VC for instance) you
466should also set G4LIB_BUILD_ZLIB to build G4zlib included with
467Geant4.
468</p><p>
469HepRep files (Binary and XML) can contain multiple HepRep
470events/geometries. If the file contains more than one HepRep it is
471not strictly XML anymore. Files can be written in .heprep.zip,
472.heprep.gz or .heprep format and their binary versions
473.bheprep.zip, .bheprep.gz or .bheprep.
474</p><p>
475The .heprep.zip is the default for file output, the .heprep is
476the default for stdout and stderr.
477</p><p>
478(Optional) To set the filename with a particular extension such
479as: .heprep.zip, .heprep.gz, .heprep, .bheprep.zip, .bheprep.gz or
480.bheprep use for instance:
481
482</p><div class="informalexample"><pre class="programlisting">
483     /vis/scene/create filename.bheprep.zip
484</pre></div><p>
485</p><p>
486(Optional) To create separate files for each event, you can set
487a suffix such as "-0001" to start writing files from
488filename-0001.bheprep.zip to filename-9999.bheprep.zip (or up),
489while "-55-sub" will start write files filename-55-sub.bheprep.zip
490to filename-99-sub.bheprep.zip (or up).
491
492</p><div class="informalexample"><pre class="programlisting">
493     /vis/heprep/setEventNumberSuffix -0001
494</pre></div><p>
495</p><p>
496(Note: suffix has to contain at least one digit)
497</p><p>
498(Optional) To route the HepRep XML output to stdout (or stderr),
499by default uncompressed, use:
500
501</p><div class="informalexample"><pre class="programlisting">
502     /vis/scene/create stdout
503</pre></div><p>
504</p><p>
505(Optional) To add attributes to each point on a trajectory, use:
506
507</p><div class="informalexample"><pre class="programlisting">
508     /vis/heprep/addPointAttributes 1
509</pre></div><p>
510</p><p>
511Be aware that this may increase the size of the output
512dramatically.
513</p><p>
514(Optional) You may use the commands:
515
516</p><div class="informalexample"><pre class="programlisting">
517     /vis/viewer/zoom                            to set an initial zoom factor
518
519     /vis/viewer/set/viewpointThetaPhi           to set an initial view point
520
521     /vis/heprep/setCoordinateSystem uvw         to change the coordinate system, where uvw
522                                                 can be "xyz", "zxy", ...
523</pre></div><p>
524</p><p>
525(Optional) You may decide to write .zip files with events and
526geometry separated (but linked). This results in a smaller zip
527file, as the geometry is only written once. Use the command:
528
529</p><div class="informalexample"><pre class="programlisting">
530     /vis/heprep/appendGeometry false
531</pre></div><p>
532</p><p>
533(Optional) To close the file, remove the SceneHandler, use:
534
535</p><div class="informalexample"><pre class="programlisting">
536     /vis/sceneHandler/remove scene-handler-0
537</pre></div><p>
538</p><p>
539Limitations: Only one SceneHandler can exist at any time,
540connected to a single Viewer. Since the HepRep format is a model
541rather than a view this is not a real limitation. In WIRED 4 you
542can create as many views (SceneHandlers) as you like.
543</p><p>
544<span class="bold"><strong>Further information:</strong></span>
545
546</p><div class="itemizedlist"><ul type="disc" compact><li><p>
547    <a href="http://wired.freehep.org/index.html" target="_top">
548    WIRED4</a> Plugin to the JAS3 Analysis System
549  </p></li><li><p>
550    <a href="http://www.fisica.uniud.it/~glast/FRED/" target="_top">
551    FRED</a> event display
552  </p></li><li><p>
553    HepRep graphics format:
554    </p><p>
555    <a href="http://www.slac.stanford.edu/~perl/heprep" target="_top">
556    http://www.slac.stanford.edu/~perl/heprep
557    </a>
558    </p><p>
559  </p></li></ul></div><p>
560</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.VisDrv.DAWN"></a>8.3.6. 
561DAWN
562</h3></div></div></div><p>
563The DAWN drivers are interfaces to
564<a href="http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAWN.html" target="_top">
565Fukui Renderer DAWN</a>, which has been developed by Satoshi Tanaka,
566Minato Kawaguti et al (Fukui University). It is a vectorized 3D
567PostScript processor, and so well suited to prepare technical high
568quality outputs for presentation and/or documentation. It is also
569useful for precise debugging of detector geometry. Remote
570visualization, off-line re-visualization, cut view, and many other
571useful functions of detector simulation are supported. A DAWN
572process is automatically invoked as a co-process of Geant4 when
573visualization is performed, and 3D data are passed with
574inter-process communication, via a file, or the TCP/IP socket.
575</p><p>
576When Geant4 Visualization is performed with the DAWN driver, the
577visualized view is automatically saved to a file named
578<code class="literal">g4.eps</code> in the current directory, which describes a
579vectorized (Encapsulated) PostScript data of the view.
580</p><p>
581There are two kinds of DAWN drivers, the DAWNFILE driver and the
582DAWN-Network driver. The DAWNFILE driver is usually recommended,
583since it is faster and safer in the sense that it is not affected
584by network conditions.
585</p><p>
586The DAWNFILE driver sends 3D data to DAWN via an intermediate
587file, named <code class="literal">g4.prim</code> in the current directory. The file
588<code class="literal">g4.prim</code> can be re-visualized later without the help of
589Geant4. This is done by invoking DAWN by hand:
590
591</p><div class="informalexample"><pre class="programlisting">
592     % dawn g4.prim
593</pre></div><p>
594</p><p>
595DAWN files can also serve as input to two additional programs:
596
597</p><div class="itemizedlist"><ul type="disc" compact><li><p>
598    A standalone program, DAWNCUT, can perform a planar cut on a
599    DAWN image. DAWNCUT takes as input a .prim file and some cut
600    parameters. Its output is a new .prim file to which the cut has
601    been applied.
602  </p></li><li><p>
603    Another standalone program, DAVID, can show you any volume
604    overlap errors in your geometry. DAVID takes as input a .prim file
605    and outputs a new .prim file in which overlapping volumes have been
606    highlighted. The use of DAVID is described in section
607    <a href="ch04.html#sect.Geom.Overlap" title="4.1.11. 
608Detecting Overlapping Volumes
609">Section 4.1.11</a> of this manual.
610  </p></li></ul></div><p>
611</p><p>
612The DAWN-Network driver is almost the same as the DAWNFILE
613driver except that
614
615</p><div class="itemizedlist"><ul type="disc" compact><li><p>
616    3D data are passed to DAWN via the TCP/IP the socket (default)
617    or the named pipe, and that,
618  </p></li></ul></div><p>
619</p><p>
620If you have not set up network configurations of your host machine,
621set the environment variable <code class="literal">G4DAWN_NAMED_PIPE</code> to "1",
622e.g., <code class="literal">% setenv G4DAWN_NAMED_PIPE 1</code>. This setting switches
623the default socket connection to the named-pipe connection within
624the same host machine. The DAWN-Network driver also saves the 3D
625data to the file <code class="literal">g4.prim</code> in the current directory.
626</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.VisDrv.RemDAWN"></a>8.3.7. 
627Remote Visualization with the DAWN-Network Driver
628</h3></div></div></div><p>
629Visualization in Geant4 is considered to be "remote" when it is
630performed on a machine other than the Geant4 host. Some of the
631visualization drivers support this feature.
632</p><p>
633Usually, the visualization host is your local host, while the
634Geant4 host is a remote host where you log in, for example, with
635the <code class="literal">telnet</code> command. This enables distributed
636processing of Geant4 visualization, avoiding the transfer of large
637amounts of visualization data to your terminal display via the
638network. This section describes how to perform remote Geant4
639visualization with the DAWN-Network driver. In order to do it,
640you must install the Fukui Renderer DAWN on your local host
641beforehand.
642</p><p>
643The following steps realize remote Geant4 visualization viewed
644by DAWN.
645
646</p><div class="orderedlist"><ol type="1" compact><li><p>
647    Invoke DAWN with "-G" option on your local host:
648
649    </p><div class="informalexample"><pre class="programlisting">
650       Local_Host&gt; dawn -G
651    </pre></div><p>
652
653    This invokes DAWN with the network connection mode.
654  </p></li><li><p>
655    Login to the remote host where a Geant4 executable is placed.
656  </p></li><li><p>
657    Set an environment variable on the remote host as follows:
658
659    </p><div class="informalexample"><pre class="programlisting">
660       Remote_Host&gt; setenv G4DAWN_HOST_NAME local_host_name
661    </pre></div><p>
662
663    For example, if you are working in the local host named
664    "arkoop.kek.jp", set this environment variable as follows:
665
666    </p><div class="informalexample"><pre class="programlisting">
667       Remote_Host&gt; setenv G4DAWN_HOST_NAME arkoop.kek.jp
668    </pre></div><p>
669
670    This tells a Geant4 process running on the remote host where Geant4
671    Visualization should be performed, i.e., where the visualized views
672    should be displayed.
673  </p></li><li><p>
674    Invoke a Geant4 process and perform visualization with the
675    DAWN-Network driver. For example:
676
677    </p><div class="informalexample"><pre class="programlisting">
678       Idle&gt; /vis/open DAWN
679       Idle&gt; /vis/drawVolume
680       Idle&gt; /vis/viewer/flush
681    </pre></div><p>     
682  </p></li></ol></div><p>
683</p><p>
684In step 4, 3D scene data are sent from the remote host to the
685local host as
686<a href="http://geant4.kek.jp/GEANT4/vis/DAWN/G4PRIM_FORMAT_24/" target="_top">
687DAWN-formatted data</a>, and the local DAWN will visualize the data. The
688transferred data are saved as a file named <code class="literal">g4.prim</code> in the
689current directory of the local host.
690</p><p>
691<span class="bold"><strong>Further information:</strong></span>
692
693</p><div class="itemizedlist"><ul type="disc" compact><li><p>
694    <a href="http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAWN.html" target="_top">
695    http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAWN.html
696    </a>
697  </p></li><li><p>
698    <a href="http://geant4.kek.jp/GEANT4/vis/DAWN/G4PRIM_FORMAT_24/" target="_top">
699    http://geant4.kek.jp/GEANT4/vis/DAWN/G4PRIM_FORMAT_24/
700    </a>
701  </p></li></ul></div><p>
702</p><p>
703<span class="bold"><strong>Further information:</strong></span>
704
705</p><div class="itemizedlist"><ul type="disc" compact><li><p>
706    Fukui Renderer DAWN:
707    </p><p>
708    <a href="http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAWN.html" target="_top">
709    http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAWN.html
710    </a>
711    </p><p>
712  </p></li><li><p>
713    The DAWNFILE driver:
714    </p><p>
715    <a href="http://geant4.kek.jp/GEANT4/vis/GEANT4/DAWNFILE_driver.html" target="_top">
716    http://geant4.kek.jp/GEANT4/vis/GEANT4/DAWNFILE_driver.html
717    </a>
718    </p><p>
719  </p></li><li><p>
720    The DAWN-Network driver:
721    </p><p>
722    <a href="http://geant4.kek.jp/GEANT4/vis/GEANT4/DAWNNET_driver.html" target="_top">
723    http://geant4.kek.jp/GEANT4/vis/GEANT4/DAWNNET_driver.html
724    </a>
725    </p><p>
726  </p></li><li><p>
727    Environmental variables to customize DAWN and DAWN drivers:
728    </p><p>
729    <a href="http://geant4.kek.jp/GEANT4/vis/DAWN/DAWN_ENV.html" target="_top">
730    http://geant4.kek.jp/GEANT4/vis/DAWN/DAWN_ENV.html
731    </a>
732    </p><p>
733    </p><p>
734    <a href="http://geant4.kek.jp/GEANT4/vis/GEANT4/g4vis_on_linux.html" target="_top">
735    http://geant4.kek.jp/GEANT4/vis/GEANT4/g4vis_on_linux.html
736    </a>
737    </p><p>
738  </p></li><li><p>
739    DAWN format (g4.prim format) manual:
740    </p><p>
741    <a href="http://geant4.kek.jp/GEANT4/vis/DAWN/G4PRIM_FORMAT_24/" target="_top">
742    http://geant4.kek.jp/GEANT4/vis/DAWN/G4PRIM_FORMAT_24/
743    </a>
744    </p><p>
745  </p></li><li><p>
746    Geant4 Fukui University Group Home Page:
747    </p><p>
748    <a href="http://geant4.kek.jp/GEANT4/vis/" target="_top">
749    http://geant4.kek.jp/GEANT4/vis/
750    </a>
751    </p><p>
752  </p></li><li><p>
753    DAWNCUT:
754    </p><p>
755    <a href="http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAWNCUT.html" target="_top">
756    http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAWNCUT.html
757    </a>
758    </p><p>
759  </p></li><li><p>
760   DAVID:
761   </p><p>
762   <a href="http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAVID.html" target="_top">
763   http://geant4.kek.jp/GEANT4/vis/DAWN/About_DAVID.html
764   </a>
765   </p><p> 
766  </p></li><li><p>
767    Geant4 Visualization Tutorial using the DAWN Renderer:
768    </p><p>
769    <a href="http://geant4.slac.stanford.edu/Presentations/vis/GDAWNTutorial/G4DAWNTutorial.html" target="_top">
770    http://geant4.slac.stanford.edu/Presentations/vis/GDAWNTutorial/G4DAWNTutorial.html
771    </a>
772    </p><p>
773  </p></li></ul></div><p>
774</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.VisDrv.VRML"></a>8.3.8. 
775VRML
776</h3></div></div></div><p>
777These drivers were developed by Satoshi Tanaka and Yasuhide Sawada
778(Fukui University). They generate VRML files, which describe 3D
779scenes to be visualized with a proper VRML viewer, at either a
780local or a remote host. It realizes virtual-reality visualization
781with your WWW browser. There are many excellent VRML viewers, which
782enable one to perform interactive spinning of detectors, walking
783and/or flying inside detectors or particle showers, interactive
784investigation of detailed detector geometry etc.
785</p><p>
786There are two kinds of VRML drivers: the VRMLFILE driver, and
787the VRML-Network driver. The VRMLFILE driver is usually
788recommended, since it is faster and safer in the sense that it is
789not affected by network conditions.
790</p><p>
791The VRMLFILE driver sends 3D data to your VRML viewer, which is
792running on the same host machine as Geant4, via an intermediate
793file named <code class="literal">g4.wrl</code> created in the current directory. This
794file can be re-visualization afterwards. In visualization, the name
795of the VRML viewer should be specified by setting the environment
796variable <code class="literal">G4VRML_VIEWER</code> beforehand. For example,
797
798</p><div class="informalexample"><pre class="programlisting">
799     % setenv G4VRML_VIEWER  "netscape"
800</pre></div><p>
801</p><p>
802Its default value is <code class="literal">NONE</code>, which means that no viewer
803is invoked and only the file <code class="literal">g4.wrl</code> is generated.
804</p><h5><a name="id505679"></a>
805Remote Visualization with the VRML-Network Driver
806</h5><p>
807Visualization in Geant4 is considered to be "remote" when it is
808performed on a machine other than the Geant4 host. Some of the
809visualization drivers support this feature.
810</p><p>
811Usually, the visualization host is your local host, while the
812Geant4 host is a remote host where you log in, for example, with
813the <code class="literal">telnet</code> command. This enables distributed processing of
814Geant4 visualization, avoiding the transfer of large amounts of
815visualization data to your terminal display via the network.
816</p><p>
817In order to perform remote visualization with the VRML-Network
818driver, the following must be installed on your local host
819beforehand:
820
821</p><div class="orderedlist"><ol type="1" compact><li><p>
822    a VRML viewer
823  </p></li><li><p>
824    the Java application <code class="literal">g4vrmlview</code>.
825  </p></li></ol></div><p>
826</p><p>
827The Java application <code class="literal">g4vrmlview</code> is included as part of the
828Geant4 package and is located at:
829
830</p><div class="informalexample"><pre class="programlisting">
831     source/visualization/VRML/g4vrmlview/
832</pre></div><p>
833</p><p>
834Installation instructions for <code class="literal">g4vrmlview</code> can be found in
835the <code class="literal">README</code> file there, or on the WWW page below.
836</p><p>
837The following steps realize remote Geant4 visualization
838displayed with your local VRML browser:
839
840</p><div class="orderedlist"><ol type="1" compact><li><p>
841    Invoke the <code class="literal">g4vrmlview</code> on your local host, giving a
842    VRML viewer name as its argument:
843
844    </p><div class="informalexample"><pre class="programlisting">
845       Local_Host&gt; java g4vrmlview  VRML_viewer_name
846    </pre></div><p>
847
848    For example, if you want to use the Netscape browser as your VRML
849    viewer, execute <code class="literal">g4vrmlview</code> as follows:
850
851    </p><div class="informalexample"><pre class="programlisting">
852       Local_Host&gt; java g4vrmlview  netscape
853    </pre></div><p>
854
855    Of course, the command path to the VRML viewer should be properly set.
856  </p></li><li><p>
857    Log in to the remote host where a Geant4 executable is placed.
858  </p></li><li><p>
859    Set an environment variable on the remote host as follows:
860
861    </p><div class="informalexample"><pre class="programlisting">
862       Remote_Host&gt; setenv G4VRML_HOST_NAME local_host_name
863    </pre></div><p>
864
865    For example, if you are working on the local host named
866    "arkoop.kek.jp", set this environment variable as follows:
867
868    </p><div class="informalexample"><pre class="programlisting">
869       Remote_Host&gt; setenv G4VRML_HOST_NAME arkoop.kek.jp
870    </pre></div><p>
871
872    This tells a Geant4 process running on the remote host where Geant4
873    Visualization should be performed, i.e., where the visualized views
874    should be displayed.
875  </p></li><li><p>
876    Invoke a Geant4 process and perform visualization with the
877    VRML-Network driver. For example:
878
879    </p><div class="informalexample"><pre class="programlisting">
880       Idle&gt; /vis/open VRML2
881       Idle&gt; /vis/drawVolume
882       Idle&gt; /vis/viewer/update
883    </pre></div><p>       
884  </p></li></ol></div><p>
885</p><p>
886In step 4, 3D scene data are sent from the remote host to the
887local host as VRML-formatted data, and the VRML viewer specified in
888step 3 is invoked by the <code class="literal">g4vrmlview</code> process to visualize
889the VRML data. The transferred VRML data are saved as a file named
890<code class="literal">g4.wrl</code> in the current directory of the local host.
891</p><p>
892<span class="bold"><strong>Further information:</strong></span>
893
894
895</p><div class="itemizedlist"><ul type="disc" compact><li><p>
896    <a href="http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML_net_driver.html" target="_top">
897    http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML_net_driver.html
898    </a>
899  </p></li></ul></div><p>
900</p><p>
901<span class="bold"><strong>Further information (VRML drivers):</strong></span>
902
903
904</p><div class="itemizedlist"><ul type="disc" compact><li><p>
905    <a href="http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML_file_driver.html" target="_top">
906    http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML_file_driver.html
907    </a>
908  </p></li><li><p>
909    <a href="http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML_net_driver.html" target="_top">
910    http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML_net_driver.html
911    </a>
912  </p></li></ul></div><p>
913</p><p>
914<span class="bold"><strong>Sample VRML files:</strong></span>
915
916
917</p><div class="itemizedlist"><ul type="disc" compact><li><p>
918    <a href="http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML2_FIG/" target="_top">
919    http://geant4.kek.jp/GEANT4/vis/GEANT4/VRML2_FIG/
920    </a>
921  </p></li></ul></div><p>
922</p><p>
923<span class="bold"><strong>Further information (VRML language and browsers):</strong></span>
924
925</p><div class="itemizedlist"><ul type="disc" compact><li><p>
926    <a href="http://www.vrmlsite.com/" target="_top">http://www.vrmlsite.com/
927    </a>
928  </p></li></ul></div><p>
929</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.VisDrv.RayTrc"></a>8.3.9. 
930RayTracer
931</h3></div></div></div><p>
932This driver was developed by Makoto Asai and Minamimoto (Hirosihma
933Instutute of Technology). It performs ray-tracing visualization
934using the tracking routines of Geant4. It is, therefore, available
935for every kinds of shapes/solids which Geant4 can handle. It is
936also utilized for debugging the user's geometry for the tracking
937routines of Geant4. It is well suited for photo-realistic high
938quality output for presentation, and for intuitive debugging of
939detector geometry. It produces a JPEG file. This driver is by
940default listed in the available visualization drivers of user's
941application.
942</p><p>
943Some pieces of geometries may fail to show up in other
944visualization drivers (due to algorithms those drivers use to
945compute visualizable shapes and polygons), but RayTracer can handle
946any geometry that the Geant4 navigator can handle.
947</p><p>
948Because RayTracer in essence takes over Geant4's tracking
949routines for its own use, RayTracer cannot be used to visualize
950Trajectories or hits.
951</p><p>
952An X-Window version, called RayTracerX, can be selected by
953setting <code class="literal">G4VIS_BUILD_RATRACERX_DRIVER</code> at Geant4 library
954build time and <code class="literal">G4VIS_USE_RAYTRACERX</code> at application (user
955code) build time (assuming you use the standard visualization
956manager, <code class="literal">G4VisExecutive</code>, or an equally smart vis manager).
957RayTracerX builds the same jpeg file as RayTracer, but
958simultaneously renders to screen so you can watch as rendering
959grows progressively smoother.
960</p><p>
961RayTracer has its own built-in commands -
962<code class="literal">/vis/rayTracer/</code>.... Alternatively, you can treat it as a
963normal vis system and use <code class="literal">/vis/viewer/</code>... commands,
964e.g:
965
966</p><div class="informalexample"><pre class="programlisting">
967  /vis/open RayTracerX
968  /vis/drawVolume
969  /vis/viewer/set/viewpointThetaPhi 30 30
970  /vis/viewer/refresh
971</pre></div><p>
972</p><p>
973The view parameters are translated into the necessary RayTracer
974parameters.
975</p><p>
976RayTracer is compute intensive. If you are unsure of a good
977viewing angle or zoom factor, you might be advised to choose them
978with a faster renderer, such as OpenGL, and transfer the view
979parameters with <code class="literal">/vis/viewer/set/all</code>:
980
981</p><div class="informalexample"><pre class="programlisting">
982  /vis/open OGLSXm  # or any of the OGL options.  Opens, say, viewer-0.
983  /vis/drawVolume
984  /vis/viewer/zoom  # plus any /vis/viewer/commands that get you the view you want.
985  /vis/open RayTracerX
986  /vis/viewer/set/all viewer-0
987  /vis/viewer/refresh
988</pre></div><p>
989</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.VisDrv.DetTree"></a>8.3.10. 
990Visualization of detector geometry tree
991</h3></div></div></div><p>
992ASCIITREE is a visualization driver that is not actually graphical
993but that dumps the volume hierarchy as a simple text tree.
994</p><p>
995Each call to /vis/viewer/flush or /vis/drawTree will dump the
996tree.
997</p><p>
998ASCIITree has command to control its verbosity,
999<code class="literal">/vis/ASCIITree/verbose</code>. The verbosity value controls the
1000amount of information available, e.g., physical volume name alone,
1001or also logical volume and solid names. If the volume is
1002"sensitive" and/or has a "readout geometry", this may also be
1003indicated. Also, the mass of the physical volume tree(s) can be
1004printed (but beware - higher verbosity levels can be
1005computationally intensive).
1006</p><p>
1007At verbosity level 4, ASCIITree calculates the mass of the
1008complete geometry tree taking into account daughters up to the
1009depth specified for each physical volume. The calculation involves
1010subtracting the mass of that part of the mother that is occupied by
1011each daughter and then adding the mass of the daughter, and so on
1012down the hierarchy.
1013
1014</p><div class="informalexample"><pre class="programlisting">
1015     /vis/ASCIITree/Verbose 4
1016     /vis/viewer/flush
1017     "HadCalorimeterPhysical":0 / "HadCalorimeterLogical" / "HadCalorimeterBox"(G4Box),
1018                                  1.8 m3 , 11.35 g/cm3
1019     "HadCalColumnPhysical":-1 (10 replicas) / "HadCalColumnLogical" / "HadCalColumnBox"(G4Box),
1020                                               180000 cm3, 11.35 g/cm3
1021     "HadCalCellPhysical":-1 (2 replicas) / "HadCalCellLogical" / "HadCalCellBox"(G4Box),
1022                                            90000 cm3, 11.35 g/cm3
1023     "HadCalLayerPhysical":-1 (20 replicas) / "HadCalLayerLogical" / "HadCalLayerBox"(G4Box),
1024                                              4500 cm3, 11.35 g/cm3
1025     "HadCalScintiPhysical":0 / "HadCalScintiLogical" / "HadCalScintiBox"(G4Box),
1026                                900 cm3, 1.032 g/cm3
1027     
1028     Calculating mass(es)...
1029     Overall volume of "worldPhysical":0, is 2400 m3
1030     Mass of tree to unlimited depth is 22260.5 kg
1031</pre></div><p>
1032</p><p>
1033Some more examples of ASCIITree in action:
1034
1035</p><div class="informalexample"><pre class="programlisting">
1036     Idle&gt; /vis/ASCIITree/verbose 1
1037     Idle&gt; /vis/drawTree
1038     #  Set verbosity with "/vis/ASCIITree/verbose
1039     #    &lt;  10: - does not print daughters of repeated placements, does not repeat replicas.
1040     #    &gt;= 10: prints all physical volumes.
1041     #  The level of detail is given by verbosity%10:
1042     #  for each volume:
1043     #    &gt;=  0: physical volume name.
1044     #    &gt;=  1: logical volume name (and names of sensitive detector and readout geometry, if any).
1045     #    &gt;=  2: solid name and type.
1046     #    &gt;=  3: volume and density.
1047     #    &gt;=  5: daughter-subtracted volume and mass.
1048     #  and in the summary at the end of printing:
1049     #    &gt;=  4: daughter-included mass of top physical volume(s) in scene to depth specified.
1050     .....
1051     "Calorimeter", copy no. 0, belongs to logical volume "Calorimeter"
1052       "Layer", copy no. -1, belongs to logical volume "Layer" (10 replicas)
1053         "Absorber", copy no. 0, belongs to logical volume "Absorber"
1054           "Gap", copy no. 0, belongs to logical volume "Gap"
1055     .....
1056     Idle&gt; /vis/ASCIITree/verbose 15
1057     Idle&gt; /vis/drawTree
1058     ....
1059      "tube_phys":0 / "tube_L" / "tube"(G4Tubs), 395841 cm3, 1.782 mg/cm3,
1060                                9.6539e-08 mm3, 1.72032e-10 mg
1061        "divided_tube_phys":0 / "divided_tube_L" / "divided_tube"(G4Tubs), 65973.4 cm3,
1062                                1.782 mg/cm3, 7587.54 cm3, 13.521 g
1063          "divided_tube_inset_phys":0 / "divided_tube_inset_L" / "divided_tube_inset"(G4Tubs),
1064                                        58385.9 cm3, 1.782 mg/cm3, 6.03369e-09 mm3, 1.0752e-11 mg
1065            "sub_divided_tube_phys":0 / "sub_divided_tube_L" / "sub_divided_tube"(G4Tubs),
1066                                        14596.5 cm3, 1.782 mg/cm3, 12196.5 cm3, 21.7341 g
1067     .....
1068     Calculating mass(es)...
1069     Overall volume of "expHall_P":0, is 8000 m3  and the daughter-included mass to unlimited depth
1070                                      is 78414 kg
1071     .....
1072</pre></div><p>
1073</p><p>
1074For the complete list of commands and options, see the
1075<a href="./AllResources/Control/UIcommands/_vis_.html" target="_top">
1076Control...UICommands</a>  section of this user guide.
1077</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.VisDrv.GAGTree"></a>8.3.11. 
1078GAG Tree
1079</h3></div></div></div><p>
1080The GAGTree driver provides a listing of the detector geometry tree
1081within GAG, the Geant Adaptive GUI, (
1082<a href="http://erpc1.naruto-u.ac.jp/~geant4" target="_top">
1083http://erpc1.naruto-u.ac.jp/~geant4
1084</a>
1085). GAG allows "folding/un-folding" a part of the geometry tree, using
1086the <span class="emphasis"><em>Tree Widget</em></span> in Java:
1087
1088</p><div class="informalfigure"><a name="fig.VisDrv_1"></a><div class="mediaobject" align="center"><img src="./AllResources/Visualization/visualization.src/gagtree.jpg" align="middle"></div></div><p>
1089</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.VisDrv.XMLTree"></a>8.3.12. 
1090XML Tree
1091</h3></div></div></div><p>
1092The XML description of the geometry tree can be created in Geant4
1093by the XML Tree driver. The XML source can also be edited on the
1094fly. The created XML files are visualizable with any XML browser
1095(in Windows, a good XML viewer is <span class="emphasis"><em>XML Notepad</em></span>).
1096
1097</p><div class="itemizedlist"><ul type="disc" compact><li><p>
1098    Folding and un-folding:
1099
1100    </p><div class="informalfigure"><a name="fig.VisDrv_2"></a><div class="mediaobject" align="center"><img src="./AllResources/Visualization/visualization.src/xmlnp.gif" align="middle"></div></div><p>
1101  </p></li></ul></div><p>
1102
1103
1104</p><div class="itemizedlist"><ul type="disc"><li><p>
1105    Searching a string:
1106
1107    </p><div class="informalfigure"><a name="fig.VisDrv_3"></a><div class="mediaobject" align="center"><img src="./AllResources/Visualization/visualization.src/xmlnpfind.gif" align="middle"></div></div><p>
1108  </p></li></ul></div><p>
1109</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="sect.VisDrv.Qt"></a>8.3.13. 
1110Qt
1111</h3></div></div></div><p>
1112This driver have been developed by Laurent Garnier (IN2P3, LAL Orsay).
1113It is an interface to the powerful toolkit Qt, now free on lot of
1114platforms. This driver needs OpenGL library to be install. It is well suited for
1115real-time fast visualization and demonstration. Fast visualization
1116is realized with hardware acceleration, reuse of shapes stored in a
1117display list, etc. NURBS visualization is also supported. All OpenGL
1118features are implements in Qt driver . In addition, mouse events control
1119are used to rotation/move/zoom volume, you can save your scene in lots
1120of formats (vector or not), make movies...
1121</p><p>
1122There is only one session of Qt driver for all available platform.
1123Two display modes are available: immediate mode and stored mode.
1124The former has no limitation on data size, and the latter is fast
1125for visualizing large data repetitively, and so is suitable for
1126animation.
1127</p><p>
1128To see the visualization window :
1129</p><div class="informalexample"><pre class="programlisting">
1130     /vis/open OGLSQt
1131</pre></div><p>
1132</p><p>
1133<span class="bold"><strong>Further information (Qt):</strong></span>
1134
1135</p><div class="itemizedlist"><ul type="disc" compact><li><p>
1136    Qt toolkit
1137    <a href="http://trolltech.com/" target="_top">
1138    http://trolltech.com/
1139    </a>
1140  </p></li><li><p>
1141    <a href="http://geant4.slac.stanford.edu/Presentations/vis/G4OpenGLTutorial/G4OpenGLTutorial.html" target="_top">
1142    Geant4 Visualization Tutorial
1143    </a>
1144    using the Qt Toolkit
1145  </p></li></ul></div><p>
1146</p><p>
1147</div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch08s02.html"><img src="AllResources/IconsGIF/prev.gif" alt="Prev"></a> </td><td width="20%" align="center"><a accesskey="u" href="ch08.html"><img src="AllResources/IconsGIF/up.gif" alt="Up"></a></td><td width="40%" align="right"> <a accesskey="n" href="ch08s04.html"><img src="AllResources/IconsGIF/next.gif" alt="Next"></a></td></tr><tr><td width="40%" align="left" valign="top">8.2. 
1148Adding Visualization to Your Executable
1149 </td><td width="20%" align="center"><a accesskey="h" href="index.html"><img src="AllResources/IconsGIF/home.gif" alt="Home"></a></td><td width="40%" align="right" valign="top"> 8.4. 
1150Controlling Visualization from Commands
1151</td></tr></table></div></body></html>
Note: See TracBrowser for help on using the repository browser.