Back to home page

EIC code displayed by LXR

 
 

    


Warning, /geant4/examples/extended/visualization/standalone/README.md is written in an unsupported language. File is not indexed.

0001 \page Examplestandalone Example standalone
0002 
0003 examples/extended/visualization/standalone
0004 
0005 
0006 This example illustrates how one might use the Geant4 Visualization
0007 System as a "standalone" graphics library and viewer, i.e, without
0008 the overhead of the run manager and all the actions and physics.
0009 
0010 It makes use of the "user action" feature of the Geant4 vis manager - for
0011 a simple example see examples/extended/visualization/userVisAction.  You
0012 have to encapsulate your drawing in a vis action so that the vis manager
0013 can call it and re-call it as appropriate.
0014 
0015 1) Define a G4VUserVisAction that implements a Draw method.  Two
0016    examples are provided:
0017    - StandaloneVisAction:
0018      - a simple box;
0019      - a Boolean solid;
0020      - an alternative way of drawing a solid by obtaining the
0021        polyhedral representation (included for interest, not as a
0022        recommendation).
0023    - DrawGeometryVisAction:
0024      - Shows how to visualise your geometry alone, i.e., without the
0025        run manager and the physics stuff.
0026       
0027 2) In the main() program, the vis actions must be instantiated and
0028    registered with the visualization manager. You may (optionally)
0029    specify an extent to assist the viewers to locate the objects.
0030 
0031 3) To visualise, you need: 
0032    - `/vis/scene/add/userAction`
0033 
0034 4) Use the usual Geant4 vis commands to create a scene
0035    and view (including the above command) - see standalone.mac.
0036 
0037 Note: The system needs an "extent" in order to point the virtual
0038 camera and adjust its field of view, etc.  This defines the "standard
0039 view".  You may zoom, etc., from this standard view.  The extent may
0040 be specified as suggested above or by using `/vis/scene/add/extent`.
0041 
0042 
0043 John Allison
0044 30th December 2022