| 1 | //
|
|---|
| 2 | // ********************************************************************
|
|---|
| 3 | // * License and Disclaimer *
|
|---|
| 4 | // * *
|
|---|
| 5 | // * The Geant4 software is copyright of the Copyright Holders of *
|
|---|
| 6 | // * the Geant4 Collaboration. It is provided under the terms and *
|
|---|
| 7 | // * conditions of the Geant4 Software License, included in the file *
|
|---|
| 8 | // * LICENSE and available at http://cern.ch/geant4/license . These *
|
|---|
| 9 | // * include a list of copyright holders. *
|
|---|
| 10 | // * *
|
|---|
| 11 | // * Neither the authors of this software system, nor their employing *
|
|---|
| 12 | // * institutes,nor the agencies providing financial support for this *
|
|---|
| 13 | // * work make any representation or warranty, express or implied, *
|
|---|
| 14 | // * regarding this software system or assume any liability for its *
|
|---|
| 15 | // * use. Please see the license in the file LICENSE and URL above *
|
|---|
| 16 | // * for the full disclaimer and the limitation of liability. *
|
|---|
| 17 | // * *
|
|---|
| 18 | // * This code implementation is the result of the scientific and *
|
|---|
| 19 | // * technical work of the GEANT4 collaboration. *
|
|---|
| 20 | // * By using, copying, modifying or distributing the software (or *
|
|---|
| 21 | // * any work based on the software) you agree to acknowledge its *
|
|---|
| 22 | // * use in resulting scientific publications, and indicate your *
|
|---|
| 23 | // * acceptance of all terms of the Geant4 Software license. *
|
|---|
| 24 | // ********************************************************************
|
|---|
| 25 | //
|
|---|
| 26 | //
|
|---|
| 27 | // $Id: G4VisExecutive.icc,v 1.21 2009/03/14 11:43:42 allison Exp $
|
|---|
| 28 | // GEANT4 tag $Name: $
|
|---|
| 29 | //
|
|---|
| 30 | //
|
|---|
| 31 | // John Allison 24th January 1998.
|
|---|
| 32 |
|
|---|
| 33 | #ifndef G4VISEXECUTIVE_ICC
|
|---|
| 34 | #define G4VISEXECUTIVE_ICC
|
|---|
| 35 |
|
|---|
| 36 | // Supported drivers...
|
|---|
| 37 |
|
|---|
| 38 | // Not needing external packages or libraries...
|
|---|
| 39 | #include "G4ASCIITree.hh"
|
|---|
| 40 | #include "G4DAWNFILE.hh"
|
|---|
| 41 | #include "G4HepRep.hh"
|
|---|
| 42 | #include "G4HepRepFile.hh"
|
|---|
| 43 | #include "G4RayTracer.hh"
|
|---|
| 44 | #include "G4HitFilterFactories.hh"
|
|---|
| 45 | #include "G4TrajectoryFilterFactories.hh"
|
|---|
| 46 | #include "G4TrajectoryModelFactories.hh"
|
|---|
| 47 | #include "G4VRML1File.hh"
|
|---|
| 48 | #include "G4VRML2File.hh"
|
|---|
| 49 |
|
|---|
| 50 | // Needing external packages or libraries...
|
|---|
| 51 |
|
|---|
| 52 | #ifdef G4VIS_USE_DAWN
|
|---|
| 53 | #include "G4FukuiRenderer.hh"
|
|---|
| 54 | #endif
|
|---|
| 55 |
|
|---|
| 56 | #ifdef G4VIS_USE_OPENGLX
|
|---|
| 57 | #include "G4OpenGLImmediateX.hh"
|
|---|
| 58 | #include "G4OpenGLStoredX.hh"
|
|---|
| 59 | #endif
|
|---|
| 60 |
|
|---|
| 61 | #ifdef G4VIS_USE_OPENGLWIN32
|
|---|
| 62 | #include "G4OpenGLImmediateWin32.hh"
|
|---|
| 63 | #include "G4OpenGLStoredWin32.hh"
|
|---|
| 64 | #endif
|
|---|
| 65 |
|
|---|
| 66 | #ifdef G4VIS_USE_OPENGLXM
|
|---|
| 67 | #include "G4OpenGLImmediateXm.hh"
|
|---|
| 68 | #include "G4OpenGLStoredXm.hh"
|
|---|
| 69 | #endif
|
|---|
| 70 |
|
|---|
| 71 | #ifdef G4VIS_USE_OPENGLQT
|
|---|
| 72 | #include "G4OpenGLImmediateQt.hh"
|
|---|
| 73 | #include "G4OpenGLStoredQt.hh"
|
|---|
| 74 | #endif
|
|---|
| 75 |
|
|---|
| 76 | #ifdef G4VIS_USE_OIX
|
|---|
| 77 | #include "G4OpenInventorX.hh"
|
|---|
| 78 | #endif
|
|---|
| 79 |
|
|---|
| 80 | #ifdef G4VIS_USE_OIWIN32
|
|---|
| 81 | #include "G4OpenInventorWin32.hh"
|
|---|
| 82 | #endif
|
|---|
| 83 |
|
|---|
| 84 | #ifdef G4VIS_USE_RAYTRACERX
|
|---|
| 85 | #include "G4RayTracerX.hh"
|
|---|
| 86 | #endif
|
|---|
| 87 |
|
|---|
| 88 | #ifdef G4VIS_USE_VRML
|
|---|
| 89 | #include "G4VRML1.hh"
|
|---|
| 90 | #include "G4VRML2.hh"
|
|---|
| 91 | #endif
|
|---|
| 92 |
|
|---|
| 93 | // The inline keyword prevents the compiler making an external
|
|---|
| 94 | // reference even though they cannot actually be inlined since they
|
|---|
| 95 | // are virtual functions. This prevents a "multiple definition" error
|
|---|
| 96 | // if it is included in more than one file. However, as explained in
|
|---|
| 97 | // the class description in G4VisExecutive.hh, it should never be
|
|---|
| 98 | // necessary to #include "G4VisExecutive.hh" in more than one file
|
|---|
| 99 | // since after instantiation the object can be treated as a
|
|---|
| 100 | // G4VisManager.
|
|---|
| 101 | inline void
|
|---|
| 102 | G4VisExecutive::RegisterGraphicsSystems () {
|
|---|
| 103 |
|
|---|
| 104 | // Graphics Systems not needing external packages or libraries...
|
|---|
| 105 | RegisterGraphicsSystem (new G4ASCIITree);
|
|---|
| 106 | RegisterGraphicsSystem (new G4DAWNFILE);
|
|---|
| 107 | RegisterGraphicsSystem (new G4HepRep);
|
|---|
| 108 | RegisterGraphicsSystem (new G4HepRepFile);
|
|---|
| 109 | RegisterGraphicsSystem (new G4RayTracer);
|
|---|
| 110 | RegisterGraphicsSystem (new G4VRML1File);
|
|---|
| 111 | RegisterGraphicsSystem (new G4VRML2File);
|
|---|
| 112 | // Graphics systems needing external packages or libraries...
|
|---|
| 113 |
|
|---|
| 114 | #ifdef G4VIS_USE_DAWN
|
|---|
| 115 | RegisterGraphicsSystem (new G4FukuiRenderer);
|
|---|
| 116 | #endif
|
|---|
| 117 |
|
|---|
| 118 | #ifdef G4VIS_USE_OPENGLX
|
|---|
| 119 | RegisterGraphicsSystem (new G4OpenGLImmediateX);
|
|---|
| 120 | RegisterGraphicsSystem (new G4OpenGLStoredX);
|
|---|
| 121 | #endif
|
|---|
| 122 |
|
|---|
| 123 | #ifdef G4VIS_USE_OPENGLWIN32
|
|---|
| 124 | RegisterGraphicsSystem (new G4OpenGLImmediateWin32);
|
|---|
| 125 | RegisterGraphicsSystem (new G4OpenGLStoredWin32);
|
|---|
| 126 | #endif
|
|---|
| 127 |
|
|---|
| 128 | #ifdef G4VIS_USE_OPENGLXM
|
|---|
| 129 | RegisterGraphicsSystem (new G4OpenGLImmediateXm);
|
|---|
| 130 | RegisterGraphicsSystem (new G4OpenGLStoredXm);
|
|---|
| 131 | #endif
|
|---|
| 132 |
|
|---|
| 133 | #ifdef G4VIS_USE_OPENGLQT
|
|---|
| 134 | RegisterGraphicsSystem (new G4OpenGLImmediateQt);
|
|---|
| 135 | RegisterGraphicsSystem (new G4OpenGLStoredQt);
|
|---|
| 136 | #endif
|
|---|
| 137 |
|
|---|
| 138 | #ifdef G4VIS_USE_OIX
|
|---|
| 139 | RegisterGraphicsSystem (new G4OpenInventorX);
|
|---|
| 140 | #endif
|
|---|
| 141 |
|
|---|
| 142 | #ifdef G4VIS_USE_OIWIN32
|
|---|
| 143 | RegisterGraphicsSystem (new G4OpenInventorWin32);
|
|---|
| 144 | #endif
|
|---|
| 145 |
|
|---|
| 146 | #ifdef G4VIS_USE_RAYTRACERX
|
|---|
| 147 | RegisterGraphicsSystem (new G4RayTracerX);
|
|---|
| 148 | #endif
|
|---|
| 149 |
|
|---|
| 150 | #ifdef G4VIS_USE_VRML
|
|---|
| 151 | RegisterGraphicsSystem (new G4VRML1);
|
|---|
| 152 | RegisterGraphicsSystem (new G4VRML2);
|
|---|
| 153 | #endif
|
|---|
| 154 |
|
|---|
| 155 | }
|
|---|
| 156 |
|
|---|
| 157 | // See comments about inlining above.
|
|---|
| 158 | inline void
|
|---|
| 159 | G4VisExecutive::RegisterModelFactories()
|
|---|
| 160 | {
|
|---|
| 161 | // Trajectory draw models
|
|---|
| 162 | RegisterModelFactory(new G4TrajectoryGenericDrawerFactory());
|
|---|
| 163 | RegisterModelFactory(new G4TrajectoryDrawByChargeFactory());
|
|---|
| 164 | RegisterModelFactory(new G4TrajectoryDrawByParticleIDFactory());
|
|---|
| 165 | RegisterModelFactory(new G4TrajectoryDrawByOriginVolumeFactory());
|
|---|
| 166 | RegisterModelFactory(new G4TrajectoryDrawByAttributeFactory());
|
|---|
| 167 |
|
|---|
| 168 | // Trajectory filter models
|
|---|
| 169 | RegisterModelFactory(new G4TrajectoryChargeFilterFactory());
|
|---|
| 170 | RegisterModelFactory(new G4TrajectoryParticleFilterFactory());
|
|---|
| 171 | RegisterModelFactory(new G4TrajectoryOriginVolumeFilterFactory());
|
|---|
| 172 | RegisterModelFactory(new G4TrajectoryAttributeFilterFactory());
|
|---|
| 173 |
|
|---|
| 174 | // Hit filter models
|
|---|
| 175 | RegisterModelFactory(new G4HitAttributeFilterFactory());
|
|---|
| 176 | }
|
|---|
| 177 |
|
|---|
| 178 | #endif
|
|---|