Changeset 1140 for trunk/source/visualization
- Timestamp:
- Nov 3, 2009, 11:17:28 AM (15 years ago)
- Location:
- trunk/source/visualization
- Files:
-
- 43 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/visualization/FukuiRenderer/GNUmakefile
r834 r1140 1 # $Id: GNUmakefile,v 1. 5 2004/06/03 11:40:12 gcosmoExp $1 # $Id: GNUmakefile,v 1.6 2009/10/21 14:59:17 allison Exp $ 2 2 3 3 name := G4FR … … 27 27 CPPFLAGS += -I$(G4BASE)/geometry/solids/specific/include 28 28 CPPFLAGS += -I$(G4BASE)/geometry/management/include 29 CPPFLAGS += -I$(G4BASE)/digits_hits/hits/include 29 30 30 31 include $(G4INSTALL)/config/common.gmk -
trunk/source/visualization/FukuiRenderer/History
r834 r1140 1 $Id: History,v 1.2 6 2006/07/10 15:32:27 allison Exp $1 $Id: History,v 1.27 2009/10/21 14:59:17 allison Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 20 20 History file for visualization/FukuiRenderer sub-category 21 21 --------------------------------------------------------- 22 23 21st October 2009 John Allison (DAWN-V09-02-00 coworks greps-V09-02-02) 24 - Added default AddCompound (const G4THitsMap<G4double>&) methods. 25 o Prevents warnings about hiding - calls G4VSceneHandler base class. 22 26 23 27 10th July 2006 John Allison (DAWN-V08-01-00) -
trunk/source/visualization/FukuiRenderer/include/G4DAWNFILESceneHandler.hh
r944 r1140 25 25 // 26 26 // 27 // $Id: G4DAWNFILESceneHandler.hh,v 1.1 6 2006/06/29 21:16:30 gunterExp $27 // $Id: G4DAWNFILESceneHandler.hh,v 1.17 2009/10/21 14:59:17 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 98 98 G4VSceneHandler::AddCompound(hit); 99 99 } 100 void AddCompound ( const G4THitsMap<G4double> & hits) { 101 G4VSceneHandler::AddCompound(hits); 102 } 100 103 101 104 void ClearTransientStore(); // Used for triggering detector re-drawing. -
trunk/source/visualization/FukuiRenderer/include/G4FukuiRendererSceneHandler.hh
r944 r1140 25 25 // 26 26 // 27 // $Id: G4FukuiRendererSceneHandler.hh,v 1.1 5 2006/06/29 21:16:46 gunterExp $27 // $Id: G4FukuiRendererSceneHandler.hh,v 1.16 2009/10/21 14:59:17 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 100 100 void AddCompound ( const G4VHit& hit) { 101 101 G4VSceneHandler::AddCompound(hit); 102 } 103 void AddCompound ( const G4THitsMap<G4double> & hits) { 104 G4VSceneHandler::AddCompound(hits); 102 105 } 103 106 -
trunk/source/visualization/GNUmakefile
r959 r1140 1 # $Id: GNUmakefile,v 1.2 3 2009/03/05 11:32:07 lgarnierExp $1 # $Id: GNUmakefile,v 1.24 2009/10/12 10:28:38 akimura Exp $ 2 2 # ----------------------------------------------------------------------- 3 3 # GNUmakefile for visualization and modeling. John Allison, 5/7/95. … … 26 26 27 27 # For Debug mode 28 CPPFLAGS += -DG4DEBUG_VIS_OGL29 CPPFLAGS += -DG4DEBUG_VIS_OI30 CPPFLAGS += -DG4DEBUG_VIS_MANAGEMENT28 # CPPFLAGS += -DG4DEBUG_VIS_OGL 29 # CPPFLAGS += -DG4DEBUG_VIS_OI 30 # CPPFLAGS += -DG4DEBUG_VIS_MANAGEMENT 31 31 32 32 # Libraries which can be used without external packages or libraries... … … 46 46 SUBDIRS += XXX 47 47 SUBLIBS += G4visXXX 48 SUBDIRS += gMocren 49 SUBLIBS += G4GMocren 48 50 49 51 ifdef G4VIS_BUILD_OPENGL_DRIVER -
trunk/source/visualization/HepRep/History
r1040 r1140 1 .$Id: History,v 1.1 29 2009/05/08 09:29:23 gcosmoExp $1 .$Id: History,v 1.131 2009/10/21 15:13:36 allison Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 20 20 History file for visualization/HepRep sub-category 21 21 -------------------------------------------------- 22 23 21st October 2009 John Allison (vis-HepRep-V09-02-02 coworks greps-V09-02-02) 24 - Added default AddCompound (const G4THitsMap<G4double>&) methods. 25 o Prevents warnings about hiding - calls G4VSceneHandler base class. 22 26 23 27 8 May 2009 Gabriele Cosmo (vis-HepRep-V09-02-00) -
trunk/source/visualization/HepRep/include/G4HepRepFileSceneHandler.hh
r944 r1140 25 25 // 26 26 // 27 // $Id: G4HepRepFileSceneHandler.hh,v 1.3 0 2008/01/04 22:11:31allison Exp $27 // $Id: G4HepRepFileSceneHandler.hh,v 1.31 2009/10/21 15:08:35 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 82 82 void AddCompound (const G4VHit&); 83 83 void InitHit(); 84 void AddCompound (const G4THitsMap<G4double>& hits) { 85 G4VSceneHandler::AddCompound(hits); 86 } 84 87 // void PreAddSolid(const G4Transform3D& objectTransformation, 85 88 // const G4VisAttributes&); -
trunk/source/visualization/HepRep/include/G4HepRepSceneHandler.hh
r944 r1140 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4HepRepSceneHandler.hh,v 1.4 2 2006/11/06 09:22:26allison Exp $26 // $Id: G4HepRepSceneHandler.hh,v 1.43 2009/10/21 15:08:35 allison Exp $ 27 27 // GEANT4 tag $Name: $ 28 28 // … … 85 85 void AddCompound (const G4VTrajectory&); 86 86 void AddCompound (const G4VHit& hit); 87 void AddCompound (const G4THitsMap<G4double>& hits) { 88 G4VSceneHandler::AddCompound(hits); 89 } 87 90 88 91 void PreAddSolid (const G4Transform3D& objectTransformation, const G4VisAttributes& visAttribs); -
trunk/source/visualization/History
r1136 r1140 1 $Id: History,v 1.4 45 2009/08/20 15:16:58 lgarnierExp $1 $Id: History,v 1.453 2009/10/25 10:43:42 allison Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 30 30 - G4OpenGLQtViewer.cc/G4OpenGLStoreQtViewer.cc : Fix problems with 31 31 mac OS X 10.6 32 33 23rd October 2009 John Allison (vis-V09-02-09, greps-V09-02-02, digits_hits-V09-02-02) 34 - visman-V09-02-05: Implemented default behaviour in 35 G4VSceneHandler::AddCompound (const G4THitsMap<G4double>&). 36 37 22nd October 2009 John Allison (vis-V09-02-08, greps-V09-02-02, digits_hits-V09-02-02) 38 - modeling-V09-02-05: Added G4PSHitsModel for gMocren driver. 39 - gMocren-V09-02-00: G4PSHitsModel moved to modelling. 40 41 21st October 2009 John Allison (vis-V09-02-07 coworks greps-V09-02-02) 42 - greps-V09-02-02 adds new pure virtual function, 43 AddCompound (const G4THitsMap<G4double>&). The following tags 44 accomodate: 45 o modeling-V09-02-04 46 o visman-V09-02-04 47 o DAWN-V09-02-00 48 o vis-HepRep-V09-02-02 49 o opengl-V09-02-08 50 o raytracer-V09-02-01 51 o VRML-V09-02-01 52 o visXXX-V09-02-00 53 54 10th October 2009 Joseph Perl (vis-V09-02-06) 55 - new global tag for vis, in preparation for addition of gMocren file driver 56 57 10th October 2009 John Allison 58 - modeling-V09-02-03: Added G4PhysicalVolumeModelTouchable. Used in 59 ComputeMaterial. Effective for nested parameterisations. 60 61 29th September 2009 John Allison (allison20090929) 62 - modeling-V09-02-02: Added warning if logical volume not defined. 63 - visman-V09-02-03: 64 o Allow refresh in GeomClosed as well as Idle state. 65 o Fixed uninitialised pointers. 66 o G4VisManager.cc: Considerable tidy up. 67 - opengl-V09-02-07: Tagged work by Laurent Garnier: 68 o G4OpenGLXmViewer : Fix a wrong initialization introduce by the 69 new way of handling window size hints (January 2009) 70 o G4OpenGLQtViewer : Ensure the GL frame size will be correct 71 by setting a 0 size margin around 72 o G4OpenGLStoredQtViewer : Remove picking to true at initialisation 73 - openinventor-V09-02-02: Tagged work by Laurent Garnier: 74 o G4OpenInventorXt/WinViewer: Fix a wrong initialization introduce by the 75 new way of handling window size hints (January 2009) 76 o Remove Geant4_gl2ps.h gl2ps.cc gl2ps.h which were copied in external/gl2ps 77 in february but forgot to remove them from OpenInventor 78 - vistest-V09-02-00: Changed main program, test19.cc, to use G4UIExecutive. 79 - VRML-V09-02-00: Tagged change of disclaimer on file headings (made long ago). 80 81 16 September 2009 John Allison 82 - raytracer-V09-02-00: Cosmetic adjustments and tagging. 32 83 33 84 19 August 2009 Laurent Garnier -
trunk/source/visualization/OpenGL/History
r1135 r1140 1 $Id: History,v 1.15 5 2009/10/21 08:14:44 lgarnierExp $1 $Id: History,v 1.156 2009/10/21 15:21:09 allison Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 20 20 21 October 2009 Laurent Garnier 21 21 - G4OpenGLQtViewer : Prepare to attach viewer In UI 22 23 21st October 2009 John Allison (opengl-V09-02-08 coworks greps-V09-02-02) 24 - Added default AddCompound (const G4THitsMap<G4double>&) methods. 25 o Prevents warnings about hiding - calls G4VSceneHandler base class. 22 26 23 27 15 October 2009 Laurent Garnier -
trunk/source/visualization/OpenGL/include/G4OpenGLSceneHandler.hh
r1022 r1140 25 25 // 26 26 // 27 // $Id: G4OpenGLSceneHandler.hh,v 1.2 6 2009/04/23 10:13:56 lgarnierExp $27 // $Id: G4OpenGLSceneHandler.hh,v 1.27 2009/10/21 15:18:14 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 83 83 void AddCompound (const G4VTrajectory&); 84 84 void AddCompound (const G4VHit&); 85 void AddCompound (const G4THitsMap<G4double>&); 85 86 86 87 protected: -
trunk/source/visualization/OpenGL/src/G4OpenGLSceneHandler.cc
r1129 r1140 25 25 // 26 26 // 27 // $Id: G4OpenGLSceneHandler.cc,v 1.5 5 2009/03/03 14:51:29 lgarnierExp $27 // $Id: G4OpenGLSceneHandler.cc,v 1.56 2009/10/21 15:18:43 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 879 879 } 880 880 881 void G4OpenGLSceneHandler::AddCompound(const G4THitsMap<G4double>& hits) { 882 G4VSceneHandler::AddCompound(hits); // For now. 883 } 884 881 885 #endif -
trunk/source/visualization/RayTracer/History
r1136 r1140 1 $Id: History,v 1.5 8 2009/09/16 16:58:26allison Exp $1 $Id: History,v 1.59 2009/10/21 15:24:53 allison Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 24 24 History file for Ray Tracer category 25 25 --------------------------------------- 26 27 21st October 2009 John Allison (raytracer-V09-02-01 coworks greps-V09-02-02) 28 - Added AddCompound (const G4THitsMap<G4double>&) methods. 29 o Prevents warnings about hiding - calls G4VSceneHandler base class. 26 30 27 31 16 September 2009 John Allison (raytracer-V09-02-00) -
trunk/source/visualization/RayTracer/include/G4RayTracerSceneHandler.hh
r954 r1140 25 25 // 26 26 // 27 // $Id: G4RayTracerSceneHandler.hh,v 1.1 1 2006/06/29 21:23:37 gunterExp $27 // $Id: G4RayTracerSceneHandler.hh,v 1.12 2009/10/21 15:24:53 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 … … 65 65 void AddCompound(const G4VTrajectory&){} 66 66 void AddCompound(const G4VHit&){} 67 void AddCompound(const G4THitsMap<G4double>&) {} 67 68 68 69 private: -
trunk/source/visualization/Tree/src/G4ASCIITreeViewer.cc
r954 r1140 34 34 G4VTreeViewer(sceneHandler, name) { 35 35 // Make changes to view parameters for ASCIITree... 36 // if (!fVP) { 37 printf("G4ASCIITreeViewer::G4ASCIITreeViewer SHOULD CRASH HERE-----------------------------------------------------------\n"); 38 // } else { 39 // printf("G4ASCIITreeViewer::G4ASCIITreeViewer SHOULD NOT CRASH HERE------------------------------------------------------------\n"); 40 // } 36 41 fVP.SetCulling(false); 42 printf("G4ASCIITreeViewer::G4ASCIITreeViewer 2\n"); 37 43 fDefaultVP.SetCulling(false); 44 printf("G4ASCIITreeViewer::G4ASCIITreeViewer 3\n"); 38 45 } 39 46 -
trunk/source/visualization/VRML/GNUmakefile
r834 r1140 1 # $Id: GNUmakefile,v 1. 7 2004/06/03 11:40:14 gcosmoExp $1 # $Id: GNUmakefile,v 1.8 2009/10/21 15:27:21 allison Exp $ 2 2 3 3 # lib name … … 29 29 CPPFLAGS += -I$(G4BASE)/geometry/management/include 30 30 CPPFLAGS += -I$(G4BASE)/visualization/VRML/include 31 CPPFLAGS += -I$(G4BASE)/digits_hits/hits/include 31 32 32 33 include $(G4INSTALL)/config/common.gmk -
trunk/source/visualization/VRML/History
r834 r1140 1 $Id: History,v 1.1 5 2006/06/12 08:32:16allison Exp $1 $Id: History,v 1.17 2009/10/21 15:27:21 allison Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 20 20 History file for visualization/VRML sub-category 21 21 ------------------------------------------------ 22 23 21st October 2009 John Allison (VRML-V09-02-01 coworks greps-V09-02-02) 24 - Added AddCompound (const G4THitsMap<G4double>&) methods. 25 o Prevents warnings about hiding - calls G4VSceneHandler base class. 26 27 29 September 2009 John Allison (VRML-V09-02-00) 28 - Tagged change of disclaimer on file headings (made long ago). 22 29 23 30 12th June 2006 John Allison (VRML-V08-00-02) -
trunk/source/visualization/VRML/include/G4VRML1FileSceneHandler.hh
r944 r1140 25 25 // 26 26 // 27 // $Id: G4VRML1FileSceneHandler.hh,v 1.1 7 2006/06/29 21:25:27 gunterExp $27 // $Id: G4VRML1FileSceneHandler.hh,v 1.18 2009/10/21 15:27:21 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 73 73 G4VSceneHandler::AddCompound(hit); 74 74 } 75 void AddCompound ( const G4THitsMap<G4double> & hits) { 76 G4VSceneHandler::AddCompound(hits); 77 } 75 78 76 79 void BeginPrimitives(const G4Transform3D& objectTransformation); -
trunk/source/visualization/VRML/include/G4VRML1SceneHandler.hh
r944 r1140 25 25 // 26 26 // 27 // $Id: G4VRML1SceneHandler.hh,v 1.1 4 2006/06/29 21:25:31 gunterExp $27 // $Id: G4VRML1SceneHandler.hh,v 1.15 2009/10/21 15:27:21 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 78 78 G4VSceneHandler::AddCompound(hit); 79 79 } 80 void AddCompound ( const G4THitsMap<G4double> & hits) { 81 G4VSceneHandler::AddCompound(hits); 82 } 80 83 81 84 void BeginPrimitives(const G4Transform3D& objectTransformation); -
trunk/source/visualization/VRML/include/G4VRML2FileSceneHandler.hh
r944 r1140 25 25 // 26 26 // 27 // $Id: G4VRML2FileSceneHandler.hh,v 1.1 6 2006/06/29 21:25:39 gunterExp $27 // $Id: G4VRML2FileSceneHandler.hh,v 1.17 2009/10/21 15:27:21 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 73 73 G4VSceneHandler::AddCompound(hit); 74 74 } 75 void AddCompound ( const G4THitsMap<G4double> & hits) { 76 G4VSceneHandler::AddCompound(hits); 77 } 75 78 76 79 void BeginPrimitives(const G4Transform3D& objectTransformation); -
trunk/source/visualization/VRML/include/G4VRML2SceneHandler.hh
r944 r1140 25 25 // 26 26 // 27 // $Id: G4VRML2SceneHandler.hh,v 1.1 3 2006/06/29 21:25:43 gunterExp $27 // $Id: G4VRML2SceneHandler.hh,v 1.14 2009/10/21 15:27:21 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 76 76 G4VSceneHandler::AddCompound(hit); 77 77 } 78 void AddCompound ( const G4THitsMap<G4double> & hits) { 79 G4VSceneHandler::AddCompound(hits); 80 } 78 81 79 82 void BeginPrimitives(const G4Transform3D& objectTransformation); -
trunk/source/visualization/XXX/GNUmakefile
r834 r1140 1 # $Id: GNUmakefile,v 1. 7 2006/03/28 17:16:41allison Exp $1 # $Id: GNUmakefile,v 1.8 2009/10/21 15:28:53 allison Exp $ 2 2 3 3 name := G4visXXX … … 28 28 CPPFLAGS += -I$(G4BASE)/geometry/solids/specific/include 29 29 CPPFLAGS += -I$(G4BASE)/tracking/include 30 CPPFLAGS += -I$(G4BASE)/digits_hits/hits/include 30 31 31 32 ifdef G4VIS_BUILD_XXXSG_DRIVER -
trunk/source/visualization/XXX/History
r834 r1140 1 $Id: History,v 1.2 7 2006/11/05 20:41:55allison Exp $1 $Id: History,v 1.28 2009/10/21 15:28:53 allison Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 20 20 History file for visualization/XXX sub-category (a template graphics system) 21 21 --------------------------------------------------------------------------- 22 23 21st October 2009 John Allison (visXXX-V09-02-00 coworks greps-V09-02-02) 24 - Added AddCompound (const G4THitsMap<G4double>&) methods. 25 o Prevents warnings about hiding - calls G4VSceneHandler base class. 22 26 23 27 5th November 2006 John Allison (visXXX-V08-01-06) -
trunk/source/visualization/XXX/include/G4XXXFileSceneHandler.hh
r944 r1140 25 25 // 26 26 // 27 // $Id: G4XXXFileSceneHandler.hh,v 1. 3 2006/06/29 21:26:42 gunterExp $27 // $Id: G4XXXFileSceneHandler.hh,v 1.4 2009/10/21 15:28:53 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 76 76 // void AddCompound(const G4VTrajectory&); 77 77 // void AddCompound(const G4VHit&); 78 // void AddCompound(const G4THitsMap<G4double>&); 78 79 // void PreAddSolid(const G4Transform3D& objectTransformation, 79 80 // const G4VisAttributes&); -
trunk/source/visualization/XXX/include/G4XXXSGSceneHandler.hh
r944 r1140 25 25 // 26 26 // 27 // $Id: G4XXXSGSceneHandler.hh,v 1. 3 2006/06/29 21:26:56 gunterExp $27 // $Id: G4XXXSGSceneHandler.hh,v 1.4 2009/10/21 15:28:53 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 80 80 // void AddCompound(const G4VTrajectory&); 81 81 // void AddCompound(const G4VHit&); 82 // void AddCompound(const G4THitsMap<G4double>&); 82 83 void PreAddSolid(const G4Transform3D& objectTransformation, 83 84 const G4VisAttributes&); -
trunk/source/visualization/XXX/include/G4XXXStoredSceneHandler.hh
r944 r1140 25 25 // 26 26 // 27 // $Id: G4XXXStoredSceneHandler.hh,v 1. 3 2006/06/29 21:27:06 gunterExp $27 // $Id: G4XXXStoredSceneHandler.hh,v 1.4 2009/10/21 15:28:53 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 78 78 // void AddCompound(const G4VTrajectory&); 79 79 // void AddCompound(const G4VHit&); 80 // void AddCompound(const G4THitsMap<G4double>&); 80 81 void PreAddSolid(const G4Transform3D& objectTransformation, 81 82 const G4VisAttributes&); -
trunk/source/visualization/externals/gl2ps/GNUmakefile
r1051 r1140 1 # $Id: GNUmakefile,v 1. 1 2009/02/18 09:54:12lgarnier Exp $1 # $Id: GNUmakefile,v 1.2 2009/11/02 14:54:31 lgarnier Exp $ 2 2 # ------------------------------------------------------------- 3 3 # GNUmakefile for gl2ps. Laurent Garnier, 6/2/09. … … 6 6 7 7 # For debug mode 8 CPPFLAGS += -DG4DEBUG_VIS_GL2PS8 # CPPFLAGS += -DG4DEBUG_VIS_GL2PS 9 9 10 10 ifndef G4INSTALL -
trunk/source/visualization/externals/gl2ps/History
r1040 r1140 1 $Id: History,v 1. 9 2009/04/29 19:23:10 allisonExp $1 $Id: History,v 1.10 2009/11/02 14:54:31 lgarnier Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 17 17 * Reverse chronological order (last date on top), please * 18 18 ---------------------------------------------------------- 19 20 2 Nov 2009, Laurent Garnier 21 - Add debug flag in GNUMakefile 19 22 20 23 29 April 2009, Laurent Garnier (visexternal-V09-02-04) -
trunk/source/visualization/management/History
r1087 r1140 1 $Id: History,v 1.12 2 2009/07/24 09:20:52 lgarnierExp $1 $Id: History,v 1.127 2009/10/30 16:05:30 allison Exp $ 2 2 3 3 ------------------------------------------------------------------- … … 26 26 History file for visualization management sub-category 27 27 ------------------------------------------------------ 28 29 30th October 2009 John Allison (visman-V09-02-06 coworks greps-V09-02-03) 30 - Added /vis/scene/add/psHits. 31 - G4VisManager.cc: As above and also: 32 o Tidied view creation. 33 o Improved message ("scene" should be "scene handler"). 34 35 23rd October 2009 John Allison (visman-V09-02-05 coworks greps-V09-02-02) 36 - Implemented default behaviour in 37 G4VSceneHandler::AddCompound (const G4THitsMap<G4double>&). 38 39 21st October 2009 John Allison (visman-V09-02-04 coworks greps-V09-02-02) 40 - G4VSceneHandler: 41 o Added default AddCompound (const G4THitsMap<G4double>&) methods. 42 (For time being just issues warning.) 43 44 29th September 2009 John Allison (visman-V09-02-03) 45 - G4VSceneHandler.cc: Allow refresh in GeomClosed as well as Idle state. 46 - G4VisCommandsSceneAdd.cc: Fixed uninitialised pointers. 47 - G4VisManager.cc: Considerable tidy up. 28 48 29 49 24th July 2009 Laurent Garnier -
trunk/source/visualization/management/include/G4VSceneHandler.hh
r954 r1140 25 25 // 26 26 // 27 // $Id: G4VSceneHandler.hh,v 1.4 0 2008/01/04 22:03:45allison Exp $27 // $Id: G4VSceneHandler.hh,v 1.41 2009/10/21 14:26:59 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 42 42 #include "globals.hh" 43 43 44 #include <stack>45 46 44 #include "G4VGraphicsScene.hh" 47 45 #include "G4ViewerList.hh" 48 46 #include "G4ViewParameters.hh" 47 #include "G4THitsMap.hh" 49 48 50 49 class G4Scene; … … 130 129 virtual void AddCompound (const G4VTrajectory&); 131 130 virtual void AddCompound (const G4VHit&); 131 virtual void AddCompound (const G4THitsMap<G4double>&); 132 132 133 133 ////////////////////////////////////////////////////////////// -
trunk/source/visualization/management/include/G4VisCommandsSceneAdd.hh
r954 r1140 25 25 // 26 26 // 27 // $Id: G4VisCommandsSceneAdd.hh,v 1.1 7 2006/11/01 10:50:28allison Exp $27 // $Id: G4VisCommandsSceneAdd.hh,v 1.18 2009/10/30 15:58:50 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 … … 133 133 }; 134 134 135 class G4VisCommandSceneAddPSHits: public G4VVisCommandScene { 136 public: 137 G4VisCommandSceneAddPSHits (); 138 virtual ~G4VisCommandSceneAddPSHits (); 139 G4String GetCurrentValue (G4UIcommand* command); 140 void SetNewValue (G4UIcommand* command, G4String newValue); 141 private: 142 G4VisCommandSceneAddPSHits (const G4VisCommandSceneAddPSHits&); 143 G4VisCommandSceneAddPSHits& operator = (const G4VisCommandSceneAddPSHits&); 144 G4UIcmdWithoutParameter* fpCommand; 145 }; 146 135 147 class G4VisCommandSceneAddScale: public G4VVisCommandScene { 136 148 public: -
trunk/source/visualization/management/include/G4VisExecutive.icc
r944 r1140 25 25 // 26 26 // 27 // $Id: G4VisExecutive.icc,v 1.2 1 2009/03/14 11:43:42 allisonExp $27 // $Id: G4VisExecutive.icc,v 1.22 2009/10/12 11:54:50 akimura Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 47 47 #include "G4VRML1File.hh" 48 48 #include "G4VRML2File.hh" 49 #include "G4GMocrenFile.hh" 49 50 50 51 // Needing external packages or libraries... … … 110 111 RegisterGraphicsSystem (new G4VRML1File); 111 112 RegisterGraphicsSystem (new G4VRML2File); 113 RegisterGraphicsSystem (new G4GMocrenFile); 112 114 // Graphics systems needing external packages or libraries... 113 115 -
trunk/source/visualization/management/src/G4VSceneHandler.cc
r1136 r1140 25 25 // 26 26 // 27 // $Id: G4VSceneHandler.cc,v 1.8 3 2008/01/04 22:03:46 allison Exp $27 // $Id: G4VSceneHandler.cc,v 1.86 2009/10/23 07:58:36 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 262 262 263 263 void G4VSceneHandler::AddCompound (const G4VHit& hit) { 264 ((G4VHit&)hit).Draw(); // Cast to non-const because Draw is non-const!!!! 264 static_cast<G4VHit>(hit).Draw(); // Cast because Draw is non-const!!!! 265 } 266 267 void G4VSceneHandler::AddCompound (const G4THitsMap<G4double>& hits) { 268 // Cast because DrawAllHits is non-const!!!! 269 static_cast<G4THitsMap<G4double> >(hits).DrawAllHits(); 265 270 } 266 271 … … 583 588 printf("G4VSceneHandler::ProcessScene : Idle ?\n"); 584 589 #endif 585 // Refresh event from end-of-event model list. Allow only in Idle state... 590 // Refresh event from end-of-event model list. 591 // Allow only in Idle or GeomClosed state... 586 592 G4StateManager* stateManager = G4StateManager::GetStateManager(); 587 593 G4ApplicationState state = stateManager->GetCurrentState(); 588 if (state == G4State_Idle ) {594 if (state == G4State_Idle || state == G4State_GeomClosed) { 589 595 #ifdef G4DEBUG_VIS_MANAGEMENT 590 596 printf("G4VSceneHandler::ProcessScene : IDLE\n"); -
trunk/source/visualization/management/src/G4VisCommandsSceneAdd.cc
r1136 r1140 25 25 // 26 26 // 27 // $Id: G4VisCommandsSceneAdd.cc,v 1.7 4 2009/07/24 09:20:52 lgarnierExp $27 // $Id: G4VisCommandsSceneAdd.cc,v 1.76 2009/10/30 15:58:50 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // /vis/scene commands - John Allison 9th August 1998 … … 37 37 #include "G4ModelingParameters.hh" 38 38 #include "G4HitsModel.hh" 39 #include "G4PSHitsModel.hh" 39 40 #include "G4TrajectoriesModel.hh" 40 41 #include "G4ScaleModel.hh" … … 229 230 const G4Run* currentRun = 0; 230 231 G4RunManager* runManager = G4RunManager::GetRunManager(); 231 if (runManager) 232 if (runManager) currentRun = runManager->GetCurrentRun(); 232 233 233 234 G4VModel* model = fpVisManager->GetCurrentSceneHandler()->GetModel(); 234 const G4ModelingParameters* mp ;235 const G4Event* currentEvent ;235 const G4ModelingParameters* mp = 0; 236 const G4Event* currentEvent = 0; 236 237 if (model) { 237 238 mp = model->GetModelingParameters(); … … 240 241 G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity(); 241 242 if (verbosity >= G4VisManager::errors) { 242 G4cout << "ERROR: No model defined for this SceneHandler : "<< fpVisManager->GetCurrentSceneHandler()->GetName() << G4endl; 243 G4cout << "ERROR: No model defined for this SceneHandler : " 244 << fpVisManager->GetCurrentSceneHandler()->GetName() 245 << G4endl; 243 246 } 244 247 } … … 890 893 sceneHandler.AddPrimitive(*fp4); 891 894 sceneHandler.EndPrimitives(); 895 } 896 897 ////////////// /vis/scene/add/psHits /////////////////////////////////////// 898 899 G4VisCommandSceneAddPSHits::G4VisCommandSceneAddPSHits () { 900 fpCommand = new G4UIcmdWithoutParameter ("/vis/scene/add/psHits", this); 901 fpCommand -> SetGuidance 902 ("Adds Primitive Scorer Hits (PSHits) to current scene."); 903 fpCommand -> SetGuidance 904 ("PSHits are drawn at end of run when the scene in which" 905 "\nthey are added is current."); 906 } 907 908 G4VisCommandSceneAddPSHits::~G4VisCommandSceneAddPSHits () { 909 delete fpCommand; 910 } 911 912 G4String G4VisCommandSceneAddPSHits::GetCurrentValue (G4UIcommand*) { 913 return ""; 914 } 915 916 void G4VisCommandSceneAddPSHits::SetNewValue (G4UIcommand*, G4String) { 917 918 G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity(); 919 G4bool warn(verbosity >= G4VisManager::warnings); 920 921 G4Scene* pScene = fpVisManager->GetCurrentScene(); 922 if (!pScene) { 923 if (verbosity >= G4VisManager::errors) { 924 G4cout << "ERROR: No current scene. Please create one." << G4endl; 925 } 926 return; 927 } 928 929 G4PSHitsModel* model = new G4PSHitsModel; 930 const G4String& currentSceneName = pScene -> GetName (); 931 G4bool successful = pScene -> AddEndOfEventModel (model, warn); 932 if (successful) { 933 if (verbosity >= G4VisManager::confirmations) { 934 G4cout << "Primitive Scorer hits will be drawn in scene \"" 935 << currentSceneName << "\"." 936 << G4endl; 937 } 938 } 939 else G4VisCommandsSceneAddUnsuccessful(verbosity); 940 UpdateVisManagerScene (currentSceneName); 892 941 } 893 942 -
trunk/source/visualization/management/src/G4VisManager.cc
r1136 r1140 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VisManager.cc,v 1.1 18 2009/03/09 12:42:00allison Exp $26 // $Id: G4VisManager.cc,v 1.121 2009/10/30 16:03:41 allison Exp $ 27 27 // GEANT4 tag $Name: $ 28 28 // … … 656 656 G4cout << "ERROR in G4VisManager::CreateSceneHandler during " 657 657 << fpGraphicsSystem -> GetName () 658 << " scene creation.\n No action taken."658 << " scene handler creation.\n No action taken." 659 659 << G4endl; 660 660 } … … 669 669 if (!fInitialised) Initialise (); 670 670 671 if (fpSceneHandler) { 672 printf("G4VisManager::CreateViewer 1-------------------- %s ----%s\n",name.c_str(),XGeometry.c_str()); 673 G4VViewer* p = fpGraphicsSystem -> CreateViewer (*fpSceneHandler, name); 674 printf("G4VisManager::CreateViewer 2-------------------- %s ----%s\n",name.c_str(),XGeometry.c_str()); 675 676 // Viewer is created, now we can set geometry parameters 677 // Before 12/2008, it was done in G4VViewer.cc but it did not have to be there! 671 if (!fpSceneHandler) { 672 PrintInvalidPointers (); 673 return; 674 } 675 676 printf("G4VisManager::CreateViewer 1-------------------- %s ----%s\n",name.c_str(),XGeometry.c_str()); 677 G4VViewer* p = fpGraphicsSystem -> CreateViewer (*fpSceneHandler, name); 678 printf("G4VisManager::CreateViewer 2-------------------- %s ----%s\n",name.c_str(),XGeometry.c_str()); 679 680 if (!p) { 681 if (fVerbosity >= errors) { 682 G4cout << "ERROR in G4VisManager::CreateViewer during " 683 << fpGraphicsSystem -> GetName () 684 << " viewer creation.\n No action taken." 685 << G4endl; 686 } 687 return; 688 } 689 690 if (p -> GetViewId() < 0) { 691 if (fVerbosity >= errors) { 692 G4cout << "ERROR in G4VisManager::CreateViewer during " 693 << fpGraphicsSystem -> GetName () 694 << " viewer initialisation.\n No action taken." 695 << G4endl; 696 } 697 return; 698 } 699 700 // Viewer is created, now we can set geometry parameters 701 // Before 12/2008, it was done in G4VViewer.cc but it did not have to be there! 678 702 679 // printf("G4VisManager::CreateViewer 3-------------------- %s ----%s\n",name.c_str(),XGeometry.c_str()); 680 G4ViewParameters vp = p->GetViewParameters(); 681 // printf("G4VisManager::CreateViewer 4-------------------- %s ----%s\n",name.c_str(),XGeometry.c_str()); 682 vp.SetXGeometryString(XGeometry); 683 p->SetViewParameters(vp); //parse string and store parameters 684 685 if (!p) { 686 if (fVerbosity >= errors) { 687 G4cout << "ERROR in G4VisManager::CreateViewer during " 688 << fpGraphicsSystem -> GetName () 689 << " viewer creation.\n No action taken." 690 << G4endl; 691 } 692 } else { 693 p -> Initialise (); 694 if (p -> GetViewId() < 0) { 695 if (fVerbosity >= errors) { 696 G4cout << "ERROR in G4VisManager::CreateViewer during " 697 << fpGraphicsSystem -> GetName () 698 << " viewer initialisation.\n No action taken." 699 << G4endl; 700 } 701 } else { 702 fpViewer = p; // Make current. 703 fpSceneHandler -> AddViewerToList (fpViewer); 704 fpSceneHandler -> SetCurrentViewer (fpViewer); 705 706 if (fVerbosity >= confirmations) { 707 G4cout << "G4VisManager::CreateViewer: new viewer created." 708 << G4endl; 709 } 710 711 const G4ViewParameters& vp = fpViewer->GetViewParameters(); 712 if (fVerbosity >= parameters) { 713 G4cout << " view parameters are:\n " << vp << G4endl; 714 } 715 716 if (vp.IsCulling () && vp.IsCullingInvisible ()) { 717 static G4bool warned = false; 718 if (fVerbosity >= confirmations) { 719 if (!warned) { 720 G4cout << 703 G4ViewParameters initialvp = p -> GetViewParameters(); 704 initialvp.SetXGeometryString(XGeometry); //parse string and store parameters 705 p -> SetViewParameters(initialvp); 706 p -> Initialise (); // (Viewer itself may change view parameters further.) 707 708 fpViewer = p; // Make current. 709 fpSceneHandler -> AddViewerToList (fpViewer); 710 fpSceneHandler -> SetCurrentViewer (fpViewer); 711 if (fVerbosity >= confirmations) { 712 G4cout << "G4VisManager::CreateViewer: new viewer created." 713 << G4endl; 714 } 715 716 const G4ViewParameters& vp = fpViewer->GetViewParameters(); 717 if (fVerbosity >= parameters) { 718 G4cout << " view parameters are:\n " << vp << G4endl; 719 } 720 721 if (vp.IsCulling () && vp.IsCullingInvisible ()) { 722 static G4bool warned = false; 723 if (fVerbosity >= confirmations) { 724 if (!warned) { 725 G4cout << 721 726 "NOTE: objects with visibility flag set to \"false\"" 722 727 " will not be drawn!" 723 728 "\n \"/vis/viewer/set/culling global false\" to Draw such objects." 724 729 "\n Also see other \"/vis/viewer/set\" commands." 725 726 727 728 729 730 731 732 733 734 730 << G4endl; 731 warned = true; 732 } 733 } 734 } 735 if (vp.IsCullingCovered ()) { 736 static G4bool warned = false; 737 if (fVerbosity >= warnings) { 738 if (!warned) { 739 G4cout << 735 740 "WARNING: covered objects in solid mode will not be rendered!" 736 741 "\n \"/vis/viewer/set/culling coveredDaughters false\" to reverse this." 737 742 "\n Also see other \"/vis/viewer/set\" commands." 738 << G4endl; 739 warned = true; 740 } 741 } 742 } 743 } 744 } 745 } 746 else PrintInvalidPointers (); 743 << G4endl; 744 warned = true; 745 } 746 } 747 } 747 748 } 748 749 … … 1088 1089 RegisterMessenger(new G4VisCommandSceneAddLogicalVolume); 1089 1090 RegisterMessenger(new G4VisCommandSceneAddLogo); 1091 RegisterMessenger(new G4VisCommandSceneAddPSHits); 1090 1092 RegisterMessenger(new G4VisCommandSceneAddScale); 1091 1093 RegisterMessenger(new G4VisCommandSceneAddText); … … 1331 1333 printf("G4VisManager::EndOfEvent 7 \n"); 1332 1334 G4cout << 1333 "WARNING: G4VisManager::EndOfEvent: Event keeping suspended." 1334 "\n The number of events exceeds the maximum that may be kept, " 1335 << maxNumberOfKeptEvents << '.' 1335 "WARNING: G4VisManager::EndOfEvent: Automatic event keeping suspended." 1336 "\n The number of events exceeds the maximum, " 1337 << maxNumberOfKeptEvents << 1338 ", that can be kept by the vis manager." 1336 1339 << G4endl; 1337 1340 } … … 1371 1374 if (fEventKeepingSuspended && fVerbosity >= warnings) { 1372 1375 G4cout << 1373 "WARNING: G4VisManager::EndOfRun: Event keeping was suspended." 1374 "\n The number of events in the run exceeded the maximum to be kept, " 1375 << fpScene->GetMaxNumberOfKeptEvents() << '.' << 1376 "\n The number of events to be kept can be changed with" 1377 "\n \"/vis/scene/endOfEventAction accumulate <N>\", where N is the" 1378 "\n maximum number you wish to allow. N < 0 means \"unlimited\"." 1376 "WARNING: G4VisManager::EndOfRun: Automatic event keeping has been suspended." 1377 "\n The number of events in the run exceeded the maximum, " 1378 << fpScene->GetMaxNumberOfKeptEvents() << 1379 ", that can be kept by the vis manager." << 1380 "\n The number of events kept by the vis manager can be changed with" 1381 "\n \"/vis/scene/endOfEventAction accumulate <N>\", where N is the" 1382 "\n maximum number you wish to allow. N < 0 means \"unlimited\"." 1379 1383 << G4endl; 1380 1384 } -
trunk/source/visualization/modeling/History
r931 r1140 1 $Id: History,v 1.1 09 2009/02/25 14:21:45allison Exp $1 $Id: History,v 1.114 2009/10/22 15:40:00 allison Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 20 20 History file for visualization/modeling 21 21 --------------------------------------- 22 23 22nd October 2009 John Allison (modeling-V09-02-05 coworks greps-V09-02-02) 24 - Added G4PSHitsModel for gMocren driver. 25 26 21st October 2009 John Allison (modeling-V09-02-04 coworks greps-V09-02-02) 27 - G4BoundingSphereScene, G4PhysicalVolumeMassScene, 28 G4PhysicalVolumeSearchScene: 29 o Added empty AddCompound (const G4THitsMap<G4double>&) methods. 30 31 10th October 2009 John Allison (modeling-V09-02-03) 32 - G4PhysicalVolumeModel: Added G4PhysicalVolumeModelTouchable. Used in 33 ComputeMaterial. Effective for nested parameterisations. 34 35 29th September 2009 John Allison (modeling-V09-02-02) 36 - G4PhysicalVolumeModel.cc: Added warning if logical volume not defined. 22 37 23 38 25th February 2009 John Allison (modeling-V09-02-01 - needs greps-V09-02-01) -
trunk/source/visualization/modeling/include/G4BoundingSphereScene.hh
r954 r1140 25 25 // 26 26 // 27 // $Id: G4BoundingSphereScene.hh,v 1.1 8 2008/01/04 21:59:15allison Exp $27 // $Id: G4BoundingSphereScene.hh,v 1.19 2009/10/21 14:17:33 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 71 71 void AddCompound (const G4VTrajectory&) {} 72 72 void AddCompound (const G4VHit&) {} 73 void AddCompound (const G4THitsMap<G4double>&) {} 73 74 G4VisExtent GetBoundingSphereExtent (); 74 75 const G4Point3D& GetCentre() const {return fCentre;} -
trunk/source/visualization/modeling/include/G4PhysicalVolumeMassScene.hh
r954 r1140 25 25 // 26 26 // 27 // $Id: G4PhysicalVolumeMassScene.hh,v 1. 9 2008/01/04 21:59:15allison Exp $27 // $Id: G4PhysicalVolumeMassScene.hh,v 1.10 2009/10/21 14:17:33 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 109 109 void AddCompound (const G4VTrajectory&) {} 110 110 void AddCompound (const G4VHit&) {} 111 void AddCompound (const G4THitsMap<G4double>&) {} 111 112 112 113 //////////////////////////////////////////////////////////////// -
trunk/source/visualization/modeling/include/G4PhysicalVolumeModel.hh
r954 r1140 25 25 // 26 26 // 27 // $Id: G4PhysicalVolumeModel.hh,v 1.3 4 2007/04/03 13:46:49 allison Exp $27 // $Id: G4PhysicalVolumeModel.hh,v 1.35 2009/10/10 14:29:59 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 49 49 50 50 #include "G4VModel.hh" 51 #include "G4VTouchable.hh" 51 52 52 53 #include "G4Transform3D.hh" … … 76 77 public: 77 78 G4PhysicalVolumeNodeID 78 (G4VPhysicalVolume* pPV = 0, G4int iCopyNo = 0, G4int depth = 0): 79 fpPV(pPV), fCopyNo(iCopyNo), fNonCulledDepth(depth) {} 79 (G4VPhysicalVolume* pPV = 0, 80 G4int iCopyNo = 0, 81 G4int depth = 0, 82 const G4Transform3D& transform = G4Transform3D()): 83 fpPV(pPV), 84 fCopyNo(iCopyNo), 85 fNonCulledDepth(depth), 86 fTransform(transform) {} 80 87 G4VPhysicalVolume* GetPhysicalVolume() const {return fpPV;} 81 88 G4int GetCopyNo() const {return fCopyNo;} 82 89 G4int GetNonCulledDepth() const {return fNonCulledDepth;} 90 const G4Transform3D& GetTransform() const {return fTransform;} 83 91 G4bool operator< (const G4PhysicalVolumeNodeID& right) const; 84 92 private: … … 86 94 G4int fCopyNo; 87 95 G4int fNonCulledDepth; 96 G4Transform3D fTransform; 88 97 }; 89 98 // Nested class for identifying physical volume nodes. 99 100 class G4PhysicalVolumeModelTouchable: public G4VTouchable { 101 public: 102 G4PhysicalVolumeModelTouchable 103 (const std::vector<G4PhysicalVolumeNodeID>& fullPVPath); 104 const G4ThreeVector& GetTranslation(G4int depth) const; 105 const G4RotationMatrix* GetRotation(G4int depth) const; 106 G4VPhysicalVolume* GetVolume(G4int depth) const; 107 G4VSolid* GetSolid(G4int depth) const; 108 G4int GetReplicaNumber(G4int depth) const; 109 G4int GetHistoryDepth() const {return fFullPVPath.size();} 110 private: 111 const std::vector<G4PhysicalVolumeNodeID>& fFullPVPath; 112 }; 113 // Nested class for handling nested parameterisations. 90 114 91 115 G4PhysicalVolumeModel -
trunk/source/visualization/modeling/include/G4PhysicalVolumeSearchScene.hh
r954 r1140 25 25 // 26 26 // 27 // $Id: G4PhysicalVolumeSearchScene.hh,v 1.1 8 2008/01/04 21:59:15allison Exp $27 // $Id: G4PhysicalVolumeSearchScene.hh,v 1.19 2009/10/21 14:17:33 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 74 74 void AddCompound (const G4VTrajectory&) {} 75 75 void AddCompound (const G4VHit&) {} 76 void AddCompound (const G4THitsMap<G4double>&) {} 76 77 G4int GetFoundDepth () const; 77 78 G4VPhysicalVolume* GetFoundVolume () const; -
trunk/source/visualization/modeling/src/G4PhysicalVolumeModel.cc
r1089 r1140 25 25 // 26 26 // 27 // $Id: G4PhysicalVolumeModel.cc,v 1.6 3 2007/11/10 14:56:36allison Exp $27 // $Id: G4PhysicalVolumeModel.cc,v 1.66 2009/10/23 08:08:19 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 46 46 #include "G4TransportationManager.hh" 47 47 #include "G4Polyhedron.hh" 48 #include "HepPolyhedronProcessor.h" 48 49 #include "G4AttDefStore.hh" 49 50 #include "G4AttDef.hh" … … 53 54 54 55 #include <sstream> 55 56 G4bool G4PhysicalVolumeModel::G4PhysicalVolumeNodeID::operator<57 (const G4PhysicalVolumeModel::G4PhysicalVolumeNodeID& right) const58 {59 if (fpPV < right.fpPV) return true;60 if (fpPV == right.fpPV) {61 if (fCopyNo < right.fCopyNo) return true;62 if (fCopyNo == right.fCopyNo)63 return fNonCulledDepth < right.fNonCulledDepth;64 }65 return false;66 }67 68 std::ostream& operator<<69 (std::ostream& os, const G4PhysicalVolumeModel::G4PhysicalVolumeNodeID node)70 {71 G4VPhysicalVolume* pPV = node.GetPhysicalVolume();72 if (pPV) {73 os << pPV->GetName()74 << ':' << node.GetCopyNo()75 << '[' << node.GetNonCulledDepth() << ']';76 } else {77 os << "Null node";78 }79 return os;80 }81 56 82 57 G4PhysicalVolumeModel::G4PhysicalVolumeModel … … 232 207 G4VPVParameterisation* pP = pVPV -> GetParameterisation (); 233 208 if (pP) { // Parametrised volume. 209 if (fCurrentDepth == 0) nReplicas = 1; // Just draw first 234 210 for (int n = 0; n < nReplicas; n++) { 235 211 pSol = pP -> ComputeSolid (n, pVPV); 236 pMaterial = pP -> ComputeMaterial (n, pVPV);237 212 pP -> ComputeTransformation (n, pVPV); 238 213 pSol -> ComputeDimensions (pP, n, pVPV); 239 214 pVPV -> SetCopyNo (n); 215 // Create a touchable of current parent for ComputeMaterial. 216 // fFullPVPath has not been updated yet so at this point it 217 // corresponds to the parent. 218 G4PhysicalVolumeModelTouchable parentTouchable(fFullPVPath); 219 pMaterial = pP -> ComputeMaterial (n, pVPV, &parentTouchable); 240 220 DescribeAndDescend (pVPV, requestedDepth, pLV, pSol, pMaterial, 241 221 theAT, sceneHandler); … … 363 343 fpCurrentTransform = &theNewAT; 364 344 365 /********************************************************366 G4cout << "G4PhysicalVolumeModel::DescribeAndDescend: "367 << pVPV -> GetName () << "." << pVPV -> GetCopyNo ();368 G4cout << "\n theAT: ";369 G4cout << "\n Rotation: ";370 G4RotationMatrix rotation = theAT.getRotation ();371 G4cout << rotation.thetaX() << ", "372 << rotation.phiX() << ", "373 << rotation.thetaY() << ", "374 << rotation.phiY() << ", "375 << rotation.thetaZ() << ", "376 << rotation.phiZ();377 G4cout << "\n Translation: " << theAT.getTranslation();378 G4cout << "\n theNewAT: ";379 G4cout << "\n Rotation: ";380 rotation = theNewAT.getRotation ();381 G4cout << rotation.thetaX() << ", "382 << rotation.phiX() << ", "383 << rotation.thetaY() << ", "384 << rotation.phiY() << ", "385 << rotation.thetaZ() << ", "386 << rotation.phiZ();387 G4cout << "\n Translation: " << theNewAT.getTranslation();388 G4cout << G4endl;389 **********************************************************/390 391 345 // Make decision to draw... 392 346 const G4VisAttributes* pVisAttribs = pLV->GetVisAttributes(); … … 429 383 G4int copyNo = fpCurrentPV->GetCopyNo(); 430 384 fFullPVPath.push_back 431 (G4PhysicalVolumeNodeID(fpCurrentPV,copyNo,fCurrentDepth)); 385 (G4PhysicalVolumeNodeID 386 (fpCurrentPV,copyNo,fCurrentDepth,*fpCurrentTransform)); 432 387 433 388 if (thisToBeDrawn) { … … 436 391 G4int copyNo = fpCurrentPV->GetCopyNo(); 437 392 fDrawnPVPath.push_back 438 (G4PhysicalVolumeNodeID(fpCurrentPV,copyNo,fCurrentDepth)); 393 (G4PhysicalVolumeNodeID 394 (fpCurrentPV,copyNo,fCurrentDepth,*fpCurrentTransform)); 439 395 440 396 if (fpMP->IsExplode() && fDrawnPVPath.size() == 1) { … … 563 519 G4Polyhedron* pOriginal = pSol->GetPolyhedron(); 564 520 G4Polyhedron::ResetNumberOfRotationSteps(); 521 565 522 if (!pOriginal) { 566 if (fpMP->IsWarning()) 567 G4cout << 568 "WARNING: G4PhysicalVolumeModel::DescribeSolid: solid\n \"" 569 << pSol->GetName() << 570 "\" has no polyhedron. Cannot by clipped." 571 << G4endl; 572 pSol -> DescribeYourselfTo (sceneHandler); // Standard treatment. 523 524 if (fpMP->IsWarning()) 525 G4cout << 526 "WARNING: G4PhysicalVolumeModel::DescribeSolid: solid\n \"" 527 << pSol->GetName() << 528 "\" has no polyhedron. Cannot by clipped." 529 << G4endl; 530 pSol -> DescribeYourselfTo (sceneHandler); // Standard treatment. 531 573 532 } else { 574 533 575 534 G4Polyhedron resultant = *pOriginal; 535 G4VisAttributes resultantVisAttribs(*pVisAttribs); 576 536 577 537 if (fpClippingPolyhedron) { 578 538 G4Polyhedron clipper = *fpClippingPolyhedron; // Local copy. 579 539 clipper.Transform(theAT.inverse()); 540 HepPolyhedronProcessor processor; 580 541 switch (fClippingMode) { 581 542 default: 582 case subtraction: resultant = resultant.subtract(clipper); break;583 case intersection: resultant = resultant.intersect(clipper); break;543 case subtraction: processor.push_back(HepPolyhedronProcessor::SUBTRACTION, clipper); break; 544 case intersection: processor.push_back(HepPolyhedronProcessor::INTERSECTION, clipper); break; 584 545 } 585 if (resultant.IsErrorBooleanProcess()) {546 if (!processor.execute(resultant)) { 586 547 if (fpMP->IsWarning()) 587 548 G4cout << … … 589 550 "\n solid \"" << pSol->GetName() << 590 551 "\" not defined due to error during Boolean processing." 552 "\n It will be drawn in red." 591 553 << G4endl; 592 // Nevertheless, keep resultant. 554 // Nevertheless, keep resultant, but draw it in red 555 resultantVisAttribs.SetColour(G4Colour::Red()); 593 556 } 594 557 } … … 597 560 G4Polyhedron sectioner = *pSectionPolyhedron; // Local copy. 598 561 sectioner.Transform(theAT.inverse()); 599 resultant = resultant.intersect(sectioner); 600 if(resultant.IsErrorBooleanProcess()) { 562 HepPolyhedronProcessor processor; 563 processor.push_back(HepPolyhedronProcessor::INTERSECTION, sectioner); 564 if (!processor.execute(resultant)) { 601 565 if (fpMP->IsWarning()) 602 566 G4cout << … … 604 568 "\n solid \"" << pSol->GetName() << 605 569 "\" not defined due to error during Boolean processing." 570 "\n It will be drawn in red." 606 571 << G4endl; 607 // Nevertheless, keep resultant. 572 // Nevertheless, keep resultant, but draw it in red 573 resultantVisAttribs.SetColour(G4Colour::Red()); 608 574 } 609 575 } … … 612 578 G4Polyhedron cutter = *pCutawayPolyhedron; // Local copy. 613 579 cutter.Transform(theAT.inverse()); 614 resultant = resultant.subtract(cutter); 615 if(resultant.IsErrorBooleanProcess()) { 580 HepPolyhedronProcessor processor; 581 processor.push_back(HepPolyhedronProcessor::SUBTRACTION, cutter); 582 if (!processor.execute(resultant)) { 616 583 if (fpMP->IsWarning()) 617 584 G4cout << … … 619 586 "\n solid \"" << pSol->GetName() << 620 587 "\" not defined due to error during Boolean processing." 588 "\n It will be drawn in red." 621 589 << G4endl; 622 // Nevertheless, keep resultant. 590 // Nevertheless, keep resultant, but draw it in red 591 resultantVisAttribs.SetColour(G4Colour::Red()); 623 592 } 624 593 } 625 594 626 595 // Finally, force polyhedron drawing... 627 resultant.SetVisAttributes( pVisAttribs);596 resultant.SetVisAttributes(resultantVisAttribs); 628 597 sceneHandler.BeginPrimitives(theAT); 629 598 sceneHandler.AddPrimitive(resultant); … … 760 729 if (i != fFullPVPath.size() - 1) oss << '/'; 761 730 } 731 732 if (!fpCurrentLV) { 733 G4Exception 734 ("G4PhysicalVolumeModel::CreateCurrentAttValues", 735 "", 736 JustWarning, 737 "Current logical volume not defined."); 738 return values; 739 } 740 762 741 values->push_back(G4AttValue("PVPath", oss.str(),"")); 763 742 if (fpCurrentLV) { … … 787 766 return values; 788 767 } 768 769 G4bool G4PhysicalVolumeModel::G4PhysicalVolumeNodeID::operator< 770 (const G4PhysicalVolumeModel::G4PhysicalVolumeNodeID& right) const 771 { 772 if (fpPV < right.fpPV) return true; 773 if (fpPV == right.fpPV) { 774 if (fCopyNo < right.fCopyNo) return true; 775 if (fCopyNo == right.fCopyNo) 776 return fNonCulledDepth < right.fNonCulledDepth; 777 } 778 return false; 779 } 780 781 std::ostream& operator<< 782 (std::ostream& os, const G4PhysicalVolumeModel::G4PhysicalVolumeNodeID node) 783 { 784 G4VPhysicalVolume* pPV = node.GetPhysicalVolume(); 785 if (pPV) { 786 os << pPV->GetName() 787 << ':' << node.GetCopyNo() 788 << '[' << node.GetNonCulledDepth() << ']' 789 << ':' << node.GetTransform(); 790 } else { 791 os << "Null node"; 792 } 793 return os; 794 } 795 796 G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::G4PhysicalVolumeModelTouchable 797 (const std::vector<G4PhysicalVolumeNodeID>& fullPVPath): 798 fFullPVPath(fullPVPath) {} 799 800 const G4ThreeVector& G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::GetTranslation(G4int depth) const 801 { 802 size_t i = fFullPVPath.size() - depth - 1; 803 if (i >= fFullPVPath.size()) { 804 G4Exception("G4PhysicalVolumeModelTouchable::GetTranslation", 805 "Index out of range", 806 FatalErrorInArgument, 807 "Asking for non-existent depth"); 808 } 809 static G4ThreeVector tempTranslation; 810 tempTranslation = fFullPVPath[i].GetTransform().getTranslation(); 811 return tempTranslation; 812 } 813 814 const G4RotationMatrix* G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::GetRotation(G4int depth) const 815 { 816 size_t i = fFullPVPath.size() - depth - 1; 817 if (i >= fFullPVPath.size()) { 818 G4Exception("G4PhysicalVolumeModelTouchable::GetRotation", 819 "Index out of range", 820 FatalErrorInArgument, 821 "Asking for non-existent depth"); 822 } 823 static G4RotationMatrix tempRotation; 824 tempRotation = fFullPVPath[i].GetTransform().getRotation(); 825 return &tempRotation; 826 } 827 828 G4VPhysicalVolume* G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::GetVolume(G4int depth) const 829 { 830 size_t i = fFullPVPath.size() - depth - 1; 831 if (i >= fFullPVPath.size()) { 832 G4Exception("G4PhysicalVolumeModelTouchable::GetVolume", 833 "Index out of range", 834 FatalErrorInArgument, 835 "Asking for non-existent depth"); 836 } 837 return fFullPVPath[i].GetPhysicalVolume(); 838 } 839 840 G4VSolid* G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::GetSolid(G4int depth) const 841 { 842 size_t i = fFullPVPath.size() - depth - 1; 843 if (i >= fFullPVPath.size()) { 844 G4Exception("G4PhysicalVolumeModelTouchable::GetSolid", 845 "Index out of range", 846 FatalErrorInArgument, 847 "Asking for non-existent depth"); 848 } 849 return fFullPVPath[i].GetPhysicalVolume()->GetLogicalVolume()->GetSolid(); 850 } 851 852 G4int G4PhysicalVolumeModel::G4PhysicalVolumeModelTouchable::GetReplicaNumber(G4int depth) const 853 { 854 size_t i = fFullPVPath.size() - depth - 1; 855 if (i >= fFullPVPath.size()) { 856 G4Exception("G4PhysicalVolumeModelTouchable::GetReplicaNumber", 857 "Index out of range", 858 FatalErrorInArgument, 859 "Asking for non-existent depth"); 860 } 861 return fFullPVPath[i].GetCopyNo(); 862 } -
trunk/source/visualization/test/History
r1093 r1140 1 $Id: History,v 1.11 7 2009/07/28 12:50:51 lgarnierExp $1 $Id: History,v 1.119 2009/09/29 21:36:38 allison Exp $ 2 2 3 3 History file for visualization/test subdirectory … … 5 5 6 6 $Log: History,v $ 7 Revision 1.119 2009/09/29 21:36:38 allison 8 vistest-V09-02-00 9 10 Revision 1.118 2009/09/29 21:35:56 allison 11 Changed main program, test19.cc, to use G4UIExecutive. 12 7 13 Revision 1.117 2009/07/28 12:50:51 lgarnier 8 14 Adding Qt support for test19 -
trunk/source/visualization/test/test19.cc
r1093 r1140 25 25 // 26 26 // 27 // $Id: test19.cc,v 1.3 0 2009/07/28 12:50:51 lgarnierExp $27 // $Id: test19.cc,v 1.31 2009/09/29 21:35:56 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 48 48 #include "MySteppingAction.hh" 49 49 50 #include "G4UIterminal.hh" 51 #if defined(G4UI_USE_GAG) 52 #include "G4UIGAG.hh" 53 #elif defined(G4UI_USE_TCSH) 54 #include "G4UItcsh.hh" 55 #elif defined(G4UI_USE_WO) 56 #include "G4UIWo.hh" 57 #elif defined(G4UI_USE_XM) 58 #include "G4UIXm.hh" 59 #elif defined(G4UI_USE_XAW) 60 #include "G4UIXaw.hh" 61 #elif defined(G4UI_USE_WIN32) 62 #include "G4UIWin32.hh" 63 #elif defined(G4UI_USE_QT) 64 #include "G4UIQt.hh" 50 #ifdef G4UI_USE 51 #include "G4UIExecutive.hh" 65 52 #endif 66 53 … … 93 80 #endif 94 81 82 #ifdef G4UI_USE 95 83 // Choose (G)UI. 96 G4UIsession* session; 97 #ifdef G4UI_USE_WIN32 98 session = new G4UIWin32 (hInstance,hPrevInstance,lpszCmdLine,nCmdShow); 99 #else 100 if (argc >= 2) { 101 #if defined(G4UI_USE_TCSH) 102 if (strcmp (argv[1], "tcsh")==0) session = 103 new G4UIterminal(new G4UItcsh); 104 #elif defined(G4UI_USE_WO) 105 if (strcmp (argv[1], "Wo")==0) session = new G4UIWo (argc, argv); 106 #elif defined(G4UI_USE_XM) 107 if (strcmp (argv[1], "Xm")==0) session = new G4UIXm (argc, argv); 108 #elif defined(G4UI_USE_XAW) 109 if (strcmp (argv[1], "Xaw")==0) session = new G4UIXaw (argc, argv); 110 #elif defined(G4UI_USE_GAG) 111 if (strcmp (argv[1], "gag")==0) session = new G4UIGAG ; 112 #elif defined(G4UI_USE_QT) 113 if (strcmp (argv[1], "Qt")==0) session = new G4UIQt (argc, argv); 114 #else 115 session = new G4UIterminal(); 116 #endif 117 else session = new G4UIterminal(); 118 } 119 else 120 { 121 G4cerr << "You should define a UI in order to interact with test" << G4endl; 122 return 0; 123 } 84 G4UIExecutive* UIexecutive = new G4UIExecutive(argc, argv); 85 G4UImanager::GetUIpointer()->SetSession(UIexecutive->GetSession()); //So that Pause works.. 124 86 #endif 125 G4UImanager::GetUIpointer()->SetSession(session); //So that Pause works..126 87 127 88 // Run manager … … 159 120 160 121 G4UImanager* UI = G4UImanager::GetUIpointer (); 161 162 122 #ifdef G4UI_USE_WIN32 163 123 G4cout << "Reading win32.g4m file...." << G4endl; … … 173 133 << G4endl; 174 134 135 #ifdef G4UI_USE 175 136 // Start an interactive session. 176 session -> SessionStart(); 137 UIexecutive -> SessionStart(); 138 #endif 177 139 178 140 #ifdef G4VIS_USE … … 185 147 G4cout << "vis_test19: Run manager deleted." << G4endl; 186 148 G4cout << "vis_test19: Deleting session..." << G4endl; 187 delete session; 149 #ifdef G4UI_USE 150 delete UIexecutive; 188 151 G4cout << "vis_test19: Session deleted." << G4endl; 152 #endif 189 153 190 154 return 0;
Note: See TracChangeset
for help on using the changeset viewer.