- Timestamp:
- May 20, 2010, 11:49:26 AM (14 years ago)
- Location:
- trunk/source/visualization
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/visualization/management/GNUmakefile
r1242 r1258 11 11 # For debug mode 12 12 # CPPFLAGS += -DG4DEBUG_VIS_MANAGEMENT 13 CPPFLAGS += -DG4VIS_BUILD_OPTIMISE_1 14 CPPFLAGS += -DG4VIS_BUILD_OPTIMISE_2 13 #CPPFLAGS += -DG4VIS_BUILD_OPTIMISE_2 15 14 16 15 -
trunk/source/visualization/management/History
r1242 r1258 1 $Id: History,v 1.1 38 2010/03/08 16:34:17 lgarnierExp $1 $Id: History,v 1.142 2010/05/11 12:17:40 allison Exp $ 2 2 3 3 ------------------------------------------------------------------- … … 26 26 History file for visualization management sub-category 27 27 ------------------------------------------------------ 28 29 11th May 2010 John Allison (visman-V09-03-00) 30 - G4VSceneHandler: 31 o Follow change in generic section and cutaway interface. 32 o Trap use of user-defined DrawTrajectory and print i_mode warning. 33 - G4VisCommandsSceneAdd.cc: 34 o Follow change in generic section and cutaway interface. 35 o Trap use of i_mode and print warning. 36 - G4VisManager.cc: 37 o Trap use of i_mode and print warning. 38 28 39 9th March 2010 Laurent Garnier 29 40 - G4OpenGLViewer : Fix clipping when resizing non square size windows -
trunk/source/visualization/management/include/G4VSceneHandler.hh
r1170 r1258 25 25 // 26 26 // 27 // $Id: G4VSceneHandler.hh,v 1.4 2 2009/11/04 12:55:33allison Exp $27 // $Id: G4VSceneHandler.hh,v 1.43 2010/05/11 10:50:57 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 309 309 // Other internal routines... 310 310 311 virtual const G4Polyhedron* CreateSectionPolyhedron();312 virtual const G4Polyhedron* CreateCutawayPolyhedron();311 virtual G4VSolid* CreateSectionSolid (); 312 virtual G4VSolid* CreateCutawaySolid (); 313 313 // Generic clipping using the BooleanProcessor in graphics_reps is 314 314 // implemented in this class. Subclasses that implement their own 315 315 // clipping should provide an override that returns zero. 316 316 317 void LoadAtts(const G4Visible&, G4AttHolder*); 317 318 // Load G4AttValues and G4AttDefs associated with the G4Visible -
trunk/source/visualization/management/src/G4VSceneHandler.cc
r1241 r1258 25 25 // 26 26 // 27 // $Id: G4VSceneHandler.cc,v 1.9 1 2009/11/16 13:51:08 lgarnierExp $27 // $Id: G4VSceneHandler.cc,v 1.92 2010/05/11 10:55:07 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 67 67 #include "G4Polycone.hh" 68 68 #include "G4Polyhedra.hh" 69 #include "G4DisplacedSolid.hh" 69 70 #include "G4LogicalVolume.hh" 70 71 #include "G4PhysicalVolumeModel.hh" … … 258 259 259 260 void G4VSceneHandler::AddCompound (const G4VTrajectory& traj) { 260 G4TrajectoriesModel* pTrModel =261 G4TrajectoriesModel* trajectoriesModel = 261 262 dynamic_cast<G4TrajectoriesModel*>(fpModel); 262 if (! pTrModel) G4Exception263 if (!trajectoriesModel) G4Exception 263 264 ("G4VSceneHandler::AddCompound(const G4VTrajectory&): Not a G4TrajectoriesModel."); 264 traj.DrawTrajectory(pTrModel->GetDrawingMode()); 265 G4VVisManager::IsDefaultDrawTrajectory = false; 266 if (trajectoriesModel->IsDrawingModeSet()) { 267 traj.DrawTrajectory(trajectoriesModel->GetDrawingMode()); 268 } else { 269 traj.DrawTrajectory(); 270 } 271 if (!G4VVisManager::IsDefaultDrawTrajectory) { 272 static G4bool warnedAboutIMode = false; 273 if (!warnedAboutIMode) { 274 G4Exception 275 ("G4VSceneHandler::AddCompound(const G4VTrajectory&)", 276 "", 277 JustWarning, 278 "WARNING: DEPRECATED: The use of the i_mode argument in DrawTrajectory" 279 "\n is deprecated and will be removed in a future major release."); 280 warnedAboutIMode = true; 281 } 282 } 265 283 } 266 284 … … 741 759 pModelingParams->SetExplodeCentre(vp.GetExplodeCentre()); 742 760 743 pModelingParams->SetSection Polyhedron(CreateSectionPolyhedron());744 pModelingParams->SetCutaway Polyhedron(CreateCutawayPolyhedron());761 pModelingParams->SetSectionSolid(CreateSectionSolid()); 762 pModelingParams->SetCutawaySolid(CreateCutawaySolid()); 745 763 // The polyhedron objects are deleted in the modeling parameters destructor. 746 764 … … 748 766 } 749 767 750 const G4Polyhedron* G4VSceneHandler::CreateSectionPolyhedron()751 { 752 /* Disable for now. Boolean processor not up to it.768 G4VSolid* G4VSceneHandler::CreateSectionSolid() 769 { 770 G4VSolid* sectioner = 0; 753 771 const G4ViewParameters& vp = fpViewer->GetViewParameters(); 754 772 if (vp.IsSection () ) { 755 773 G4double radius = fpScene->GetExtent().GetExtentRadius(); 756 774 G4double safe = radius + fpScene->GetExtent().GetExtentCentre().mag(); 757 G4Box sectionBox("clipper", 758 safe, safe, 1.e-5 * radius); // Thin in z-plane. 759 G4Polyhedron* sectioner = sectionBox.CreatePolyhedron(); 775 G4VSolid* sectionBox = 776 new G4Box("_sectioner", safe, safe, 1.e-5 * radius); // Thin in z-plane. 760 777 const G4Plane3D& s = vp.GetSectionPlane (); 761 778 G4double a = s.a(); … … 770 787 transform = G4Rotate3D(angle, axis) * transform; 771 788 } 772 sectioner->Transform(transform); 773 return sectioner; 774 } else { 775 return 0; 776 } 777 */ 778 return 0; 779 } 780 781 const G4Polyhedron* G4VSceneHandler::CreateCutawayPolyhedron() 789 sectioner = new G4DisplacedSolid 790 ("_displaced_sectioning_box", sectionBox, transform); 791 } 792 return sectioner; 793 } 794 795 G4VSolid* G4VSceneHandler::CreateCutawaySolid() 782 796 { 783 797 return 0; -
trunk/source/visualization/management/src/G4VisCommandsSceneAdd.cc
r1228 r1258 25 25 // 26 26 // 27 // $Id: G4VisCommandsSceneAdd.cc,v 1.7 8 2009/11/22 14:02:30allison Exp $27 // $Id: G4VisCommandsSceneAdd.cc,v 1.79 2010/05/11 10:58:49 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // /vis/scene commands - John Allison 9th August 1998 … … 1373 1373 static G4IdentityTrajectoryFilter auxiliaryPointsFilter; 1374 1374 G4String defaultTrajectoryType; 1375 G4bool i_mode_found = false; 1375 1376 G4int i_mode = 0; 1376 1377 if (smooth && rich) { … … 1390 1391 iss >> i_mode; 1391 1392 if (iss) { 1393 i_mode_found = true; 1392 1394 if (verbosity >= G4VisManager::warnings) { 1393 G4cout << "WARNING: Integer parameter " << i_mode << " found." 1394 "\n DEPRECATED - will be removed at next major release." 1395 "\n Use \"/vis/modeling/trajectories\" commands." 1395 G4cout << 1396 "WARNING: Integer parameter " << i_mode << " found." 1397 "\n DEPRECATED - its use in this command will be removed at a future major" 1398 "\n release. Use \"/vis/modeling/trajectories\" commands." 1396 1399 << G4endl; 1397 1400 } … … 1421 1424 } 1422 1425 1423 G4TrajectoriesModel* model = new G4TrajectoriesModel(i_mode); 1426 G4TrajectoriesModel* model = 0; 1427 if (i_mode_found) { 1428 model = new G4TrajectoriesModel(i_mode); 1429 } else { 1430 model = new G4TrajectoriesModel(); 1431 } 1424 1432 const G4String& currentSceneName = pScene -> GetName (); 1425 1433 pScene -> AddEndOfEventModel (model, warn); … … 1805 1813 const G4double y0 = (param4 + param3) / 2.; 1806 1814 const G4double z0 = (param6 + param5) / 2.; 1807 G4Box clippingBox("_clipping_box",dX,dY,dZ); 1808 G4Polyhedron* clippingPolyhedron = 1809 new G4PolyhedronBox(dX,dY,dZ); // The model deletes. 1810 clippingPolyhedron->Transform(G4Translate3D(x0,y0,z0)); 1815 G4VSolid* clippingSolid = 1816 new G4DisplacedSolid 1817 ("_displaced_clipping_box", 1818 new G4Box("_clipping_box",dX,dY,dZ), 1819 G4Translate3D(x0,y0,z0)); 1811 1820 for (size_t i = 0; i < foundVolumes.size(); ++i) { 1812 models[i]->SetClipping Polyhedron(clippingPolyhedron);1821 models[i]->SetClippingSolid(clippingSolid); 1813 1822 models[i]->SetClippingMode(clippingMode); 1814 1823 } -
trunk/source/visualization/management/src/G4VisManager.cc
r1242 r1258 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VisManager.cc,v 1.12 3 2010/03/08 16:34:17 lgarnierExp $26 // $Id: G4VisManager.cc,v 1.124 2010/05/11 11:02:19 allison Exp $ 27 27 // GEANT4 tag $Name: $ 28 28 // … … 889 889 assert (0 != fpTrajDrawModelMgr); 890 890 891 const G4VTrajectoryModel* model = CurrentTrajDrawModel(); 892 893 assert (0 != model); // Should exist 894 895 model->Draw(trajectory, i_mode, visible); 891 const G4VTrajectoryModel* trajectoryModel = CurrentTrajDrawModel(); 892 893 assert (0 != trajectoryModel); // Should exist 894 895 G4TrajectoriesModel* trajectoriesModel = 896 dynamic_cast<G4TrajectoriesModel*>(fpSceneHandler->GetModel()); 897 if (trajectoriesModel) { 898 if (trajectoriesModel->IsDrawingModeSet()) { 899 trajectoryModel->Draw(trajectory, i_mode, visible); 900 } else { 901 trajectoryModel->Draw(trajectory, visible); 902 } 903 } else { 904 //G4Exception("G4VisManager::DispatchToModel: Not a G4TrajectoriesModel."); 905 // Just draw at user's request 906 trajectoryModel->Draw(trajectory, i_mode, visible); 907 static G4bool warnedAboutIMode = false; 908 if (!warnedAboutIMode) { 909 G4Exception 910 ("G4VisManager::DispatchToModel", 911 "", 912 JustWarning, 913 "WARNING: DEPRECATED: The use of the i_mode argument in DrawTrajectory" 914 "\n is deprecated and will be removed at the next major release."); 915 warnedAboutIMode = true; 916 } 917 } 896 918 } 897 919 -
trunk/source/visualization/modeling/GNUmakefile
r1244 r1258 18 18 include $(G4INSTALL)/config/architecture.gmk 19 19 20 CPPFLAGS += -DG4VIS_BUILD_OPTIMISE_1 21 CPPFLAGS += -DG4VIS_BUILD_OPTIMISE_2 22 CPPFLAGS += -DG4VIS_BUILD_OPTIMISE_3 20 #CPPFLAGS += -DG4VIS_BUILD_OPTIMISE_2 23 21 24 22 CPPFLAGS += -I$(G4BASE)/global/management/include -
trunk/source/visualization/modeling/History
r1247 r1258 1 $Id: History,v 1.11 6 2010/04/27 15:46:18 lgarnierExp $1 $Id: History,v 1.117 2010/05/11 11:58:41 allison Exp $ 2 2 ------------------------------------------------------------------- 3 3 … … 20 20 History file for visualization/modeling 21 21 --------------------------------------- 22 23 11th May 2010 John Allison (modeling-V09-03-00) 24 - G4ModelingParameters, G4PhysicalVolumeModel: 25 o Replace polyhedra with solids for sections and cutaways. 26 - G4TrajectoriesModel: Trap use of i_mode and print warning. 27 - G4VTrajectoryModel and derived classes G4TrajectoryDrawBy*: 28 o Introduce Draw method *not* containing i_mode. 29 - G4TrajectoryDrawerUtils: 30 o Remove default (0) for i_mode arguments. 31 o Introduce functions without i_mode. 32 o Comment out unused DrawLineAndPoints function. 33 o Trap use of i_mode and print warning. 22 34 23 35 27th April 2010 Laurent Garnier -
trunk/source/visualization/modeling/include/G4ModelingParameters.hh
r954 r1258 25 25 // 26 26 // 27 // $Id: G4ModelingParameters.hh,v 1.1 7 2006/11/14 14:42:08allison Exp $27 // $Id: G4ModelingParameters.hh,v 1.18 2010/05/11 11:13:35 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 44 44 class G4VPhysicalVolume; 45 45 class G4VisAttributes; 46 class G4 Polyhedron;46 class G4VSolid; 47 47 class G4Event; 48 48 … … 92 92 const G4Point3D& GetExplodeCentre () const; 93 93 G4int GetNoOfSides () const; 94 const G4Polyhedron* GetSectionPolyhedron() const;95 const G4Polyhedron* GetCutawayPolyhedron() const;94 G4VSolid* GetSectionSolid () const; 95 G4VSolid* GetCutawaySolid () const; 96 96 const G4Event* GetEvent () const; 97 97 … … 108 108 void SetExplodeCentre (const G4Point3D& explodeCentre); 109 109 G4int SetNoOfSides (G4int); // Returns actual number set. 110 void SetSection Polyhedron (const G4Polyhedron* pSectionPolyhedron);111 void SetCutaway Polyhedron (const G4Polyhedron* pCutawayPolyhedron);110 void SetSectionSolid (G4VSolid* pSectionSolid); 111 void SetCutawaySolid (G4VSolid* pCutawaySolid); 112 112 void SetEvent (const G4Event* pEvent); 113 113 … … 126 126 G4Point3D fExplodeCentre; // ...about this centre. 127 127 G4int fNoOfSides; // ...if polygon approximates circle. 128 const G4Polyhedron* fpSectionPolyhedron;// For generic section (DCUT).129 const G4Polyhedron* fpCutawayPolyhedron;// For generic cutaways.128 G4VSolid* fpSectionSolid; // For generic section (DCUT). 129 G4VSolid* fpCutawaySolid; // For generic cutaways. 130 130 const G4Event* fpEvent; // Event being processed. 131 131 }; -
trunk/source/visualization/modeling/include/G4ModelingParameters.icc
r954 r1258 25 25 // 26 26 // 27 // $Id: G4ModelingParameters.icc,v 1.1 1 2006/11/14 14:42:08allison Exp $27 // $Id: G4ModelingParameters.icc,v 1.12 2010/05/11 11:13:35 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 82 82 } 83 83 84 inline const G4Polyhedron* G4ModelingParameters::GetSectionPolyhedron() const85 {return fpSection Polyhedron;}84 inline G4VSolid* G4ModelingParameters::GetSectionSolid () const 85 {return fpSectionSolid;} 86 86 87 inline const G4Polyhedron* G4ModelingParameters::GetCutawayPolyhedron() const88 {return fpCutaway Polyhedron;}87 inline G4VSolid* G4ModelingParameters::GetCutawaySolid () const 88 {return fpCutawaySolid;} 89 89 90 90 inline const G4Event* G4ModelingParameters::GetEvent () const … … 131 131 } 132 132 133 inline void G4ModelingParameters::SetSectionPolyhedron134 (const G4Polyhedron* pSectionPolyhedron) {135 fpSectionPolyhedron = pSectionPolyhedron;136 }137 138 inline void G4ModelingParameters::SetCutawayPolyhedron139 (const G4Polyhedron* pCutawayPolyhedron) {140 fpCutawayPolyhedron = pCutawayPolyhedron;141 }142 143 133 inline void G4ModelingParameters::SetEvent(const G4Event* pEvent) { 144 134 fpEvent = pEvent; -
trunk/source/visualization/modeling/include/G4PhysicalVolumeModel.hh
r1140 r1258 25 25 // 26 26 // 27 // $Id: G4PhysicalVolumeModel.hh,v 1.3 5 2009/10/10 14:29:59allison Exp $27 // $Id: G4PhysicalVolumeModel.hh,v 1.36 2010/05/11 11:16:51 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 62 62 class G4Material; 63 63 class G4VisAttributes; 64 class G4Polyhedron;65 64 class G4AttDef; 66 65 class G4AttValue; … … 137 136 G4int GetRequestedDepth () const {return fRequestedDepth;} 138 137 139 const G4 Polyhedron* GetClippingPolyhedron() const140 {return fpClipping Polyhedron;}138 const G4VSolid* GetClippingSolid () const 139 {return fpClippingSolid;} 141 140 142 141 G4int GetCurrentDepth() const {return fCurrentDepth;} … … 182 181 } 183 182 184 void SetClipping Polyhedron (const G4Polyhedron* pClippingPolyhedron) {185 fpClipping Polyhedron = pClippingPolyhedron;183 void SetClippingSolid (G4VSolid* pClippingSolid) { 184 fpClippingSolid = pClippingSolid; 186 185 } 187 186 … … 234 233 std::vector<G4PhysicalVolumeNodeID> fDrawnPVPath; 235 234 G4bool fCurtailDescent;// Can be set to curtail descent. 236 const G4Polyhedron*fpClippingPolyhedron;235 G4VSolid* fpClippingSolid; 237 236 ClippingMode fClippingMode; 238 237 -
trunk/source/visualization/modeling/include/G4TrajectoriesModel.hh
r954 r1258 25 25 // 26 26 // 27 // $Id: G4TrajectoriesModel.hh,v 1.1 0 2006/10/26 11:10:23allison Exp $27 // $Id: G4TrajectoriesModel.hh,v 1.11 2010/05/11 11:21:52 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 50 50 public: // With description 51 51 52 G4TrajectoriesModel (G4int drawingMode = 0); 53 52 G4TrajectoriesModel (); 53 G4TrajectoriesModel (G4int drawingMode); 54 54 55 virtual ~G4TrajectoriesModel (); 55 56 … … 57 58 // The main task of a model is to describe itself to the graphics scene. 58 59 59 G4int GetDrawingMode() const { return fDrawingMode;} 60 void SetDrawingMode(G4int drawingMode) {fDrawingMode = drawingMode;} 60 G4bool IsDrawingModeSet() const; 61 G4int GetDrawingMode() const; 62 void SetDrawingMode(G4int drawingMode); 61 63 62 64 const G4VTrajectory* GetCurrentTrajectory() const … … 65 67 private: 66 68 69 G4bool fDrawingModeSet; 67 70 G4int fDrawingMode; 68 71 const G4VTrajectory* fpCurrentTrajectory; -
trunk/source/visualization/modeling/include/G4TrajectoryDrawByAttribute.hh
r954 r1258 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4TrajectoryDrawByAttribute.hh,v 1. 1 2006/09/11 21:52:18 tinslayExp $26 // $Id: G4TrajectoryDrawByAttribute.hh,v 1.2 2010/05/11 11:31:31 allison Exp $ 27 27 // GEANT4 tag $Name: $ 28 28 // … … 51 51 virtual ~G4TrajectoryDrawByAttribute(); 52 52 53 // Draw the trajectory with optional i_mode parameter 54 virtual void Draw(const G4VTrajectory& trajectory, const G4int& i_mode = 0, 53 // Draw the trajectory 54 virtual void Draw(const G4VTrajectory& trajectory, const G4int& i_mode = 0, 55 const G4bool& visible = true) const; 56 virtual void Draw(const G4VTrajectory& trajectory, 55 57 const G4bool& visible = true) const; 56 58 -
trunk/source/visualization/modeling/include/G4TrajectoryDrawByCharge.hh
r954 r1258 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4TrajectoryDrawByCharge.hh,v 1. 7 2006/06/29 21:31:49 gunterExp $26 // $Id: G4TrajectoryDrawByCharge.hh,v 1.8 2010/05/11 11:31:31 allison Exp $ 27 27 // GEANT4 tag $Name: $ 28 28 // … … 57 57 virtual ~G4TrajectoryDrawByCharge(); 58 58 59 // Draw the trajectory with optional i_mode parameter 60 virtual void Draw(const G4VTrajectory& trajectory, const G4int& i_mode = 0, 59 // Draw method 60 virtual void Draw(const G4VTrajectory& trajectory, const G4int& i_mode = 0, 61 const G4bool& visible = true) const; 62 virtual void Draw(const G4VTrajectory& trajectory, 61 63 const G4bool& visible = true) const; 62 64 -
trunk/source/visualization/modeling/include/G4TrajectoryDrawByOriginVolume.hh
r954 r1258 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4TrajectoryDrawByOriginVolume.hh,v 1. 4 2006/06/29 21:31:51 gunterExp $26 // $Id: G4TrajectoryDrawByOriginVolume.hh,v 1.5 2010/05/11 11:31:31 allison Exp $ 27 27 // GEANT4 tag $Name: $ 28 28 // … … 50 50 virtual ~G4TrajectoryDrawByOriginVolume(); 51 51 52 virtual void Draw(const G4VTrajectory&, const G4int& i_mode = 0, 52 // Draw method 53 virtual void Draw(const G4VTrajectory& trajectory, const G4int& i_mode = 0, 53 54 const G4bool& visible = true) const; 54 // Draw the trajectory with optional i_mode parameter 55 55 virtual void Draw(const G4VTrajectory& trajectory, 56 const G4bool& visible = true) const; 57 56 58 virtual void Print(std::ostream& ostr) const; 57 59 // Print configuration -
trunk/source/visualization/modeling/include/G4TrajectoryDrawByParticleID.hh
r954 r1258 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4TrajectoryDrawByParticleID.hh,v 1. 7 2006/06/29 21:31:53 gunterExp $26 // $Id: G4TrajectoryDrawByParticleID.hh,v 1.8 2010/05/11 11:31:31 allison Exp $ 27 27 // GEANT4 tag $Name: $ 28 28 // … … 51 51 virtual ~G4TrajectoryDrawByParticleID(); 52 52 53 virtual void Draw(const G4VTrajectory&, const G4int&i_mode = 0, 53 // Draw method 54 virtual void Draw(const G4VTrajectory& trajectory, const G4int& i_mode = 0, 54 55 const G4bool& visible = true) const; 55 // Draw the trajectory with optional i_mode parameter 56 56 virtual void Draw(const G4VTrajectory& trajectory, 57 const G4bool& visible = true) const; 58 57 59 virtual void Print(std::ostream& ostr) const; 58 60 // Print configuration -
trunk/source/visualization/modeling/include/G4TrajectoryDrawerUtils.hh
r954 r1258 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4TrajectoryDrawerUtils.hh,v 1. 7 2007/05/30 08:56:55allison Exp $26 // $Id: G4TrajectoryDrawerUtils.hh,v 1.9 2010/05/11 11:58:18 allison Exp $ 27 27 // GEANT4 tag $Name: $ 28 28 // … … 49 49 G4Polymarker& auxiliaryPoints, G4Polymarker& stepPoints); 50 50 51 /*** 51 52 // Draw trajectory line and points 52 53 void DrawLineAndPoints(const G4VTrajectory& traj, const G4int& i_mode, 53 54 const G4Colour& cfg, const G4bool& visible); 55 ***/ 54 56 55 57 // Draw trajectory line and points using G4VisTrajContext object information 56 void DrawLineAndPoints(const G4VTrajectory& traj, const G4VisTrajContext&, const G4int& i_mode=0); 58 void DrawLineAndPoints(const G4VTrajectory& traj, const G4VisTrajContext&, const G4int& i_mode); 59 60 // Draw trajectory line and points using G4VisTrajContext object information 61 void DrawLineAndPoints(const G4VTrajectory& traj, const G4VisTrajContext&); 57 62 58 63 } -
trunk/source/visualization/modeling/include/G4TrajectoryGenericDrawer.hh
r954 r1258 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4TrajectoryGenericDrawer.hh,v 1. 2 2006/06/29 21:31:59 gunterExp $26 // $Id: G4TrajectoryGenericDrawer.hh,v 1.3 2010/05/11 11:31:31 allison Exp $ 27 27 // GEANT4 tag $Name: $ 28 28 // … … 48 48 virtual ~G4TrajectoryGenericDrawer(); 49 49 50 virtual void Draw(const G4VTrajectory& trajectory, const G4int& i_mode = 0, 50 virtual void Draw(const G4VTrajectory& trajectory, const G4int& i_mode = 0, 51 const G4bool& visible = true) const; 52 virtual void Draw(const G4VTrajectory& trajectory, 51 53 const G4bool& visible = true) const; 52 54 // Draw the trajectory with optional i_mode parameter -
trunk/source/visualization/modeling/include/G4VTrajectoryModel.hh
r954 r1258 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4VTrajectoryModel.hh,v 1. 7 2006/08/14 11:43:34allison Exp $26 // $Id: G4VTrajectoryModel.hh,v 1.8 2010/05/11 11:31:31 allison Exp $ 27 27 // GEANT4 tag $Name: $ 28 28 // … … 54 54 55 55 // Draw method 56 virtual void Draw(const G4VTrajectory& trajectory, const G4int& i_mode = 0, 56 virtual void Draw(const G4VTrajectory& trajectory, const G4int& i_mode = 0, 57 const G4bool& visible = true) const = 0; 58 virtual void Draw(const G4VTrajectory& trajectory, 57 59 const G4bool& visible = true) const = 0; 58 60 -
trunk/source/visualization/modeling/src/G4ModelingParameters.cc
r954 r1258 25 25 // 26 26 // 27 // $Id: G4ModelingParameters.cc,v 1.1 5 2006/11/14 14:42:08allison Exp $27 // $Id: G4ModelingParameters.cc,v 1.16 2010/05/11 11:13:35 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 37 37 #include "G4VisAttributes.hh" 38 38 #include "G4ExceptionSeverity.hh" 39 #include "G4 Polyhedron.hh"39 #include "G4VSolid.hh" 40 40 41 41 G4ModelingParameters::G4ModelingParameters (): … … 50 50 fExplodeFactor (1.), 51 51 fNoOfSides (24), 52 fpSection Polyhedron(0),53 fpCutaway Polyhedron(0),52 fpSectionSolid (0), 53 fpCutawaySolid (0), 54 54 fpEvent (0) 55 55 {} … … 75 75 fExplodeFactor (1.), 76 76 fNoOfSides (noOfSides), 77 fpSection Polyhedron(0),78 fpCutaway Polyhedron(0),79 fpEvent 77 fpSectionSolid (0), 78 fpCutawaySolid (0), 79 fpEvent (0) 80 80 {} 81 81 82 82 G4ModelingParameters::~G4ModelingParameters () 83 83 { 84 delete fpSection Polyhedron;85 delete fpCutaway Polyhedron;84 delete fpSectionSolid; 85 delete fpCutawaySolid; 86 86 } 87 87 … … 114 114 fNoOfSides = nSides; 115 115 return fNoOfSides; 116 } 117 118 void G4ModelingParameters::SetSectionSolid 119 (G4VSolid* pSectionSolid) { 120 delete fpSectionSolid; 121 fpSectionSolid = pSectionSolid; 122 } 123 124 void G4ModelingParameters::SetCutawaySolid 125 (G4VSolid* pCutawaySolid) { 126 delete fpCutawaySolid; 127 fpCutawaySolid = pCutawaySolid; 116 128 } 117 129 … … 166 178 << mp.fNoOfSides; 167 179 168 os << "\n Section (DCUT) polyhedronpointer: ";169 if (!mp.fpSection Polyhedron) os << "non-";180 os << "\n Section (DCUT) shape (G4VSolid) pointer: "; 181 if (!mp.fpSectionSolid) os << "non-"; 170 182 os << "null"; 171 183 172 os << "\n Cutaway (DCUT) polyhedronpointer: ";173 if (!mp.fpCutaway Polyhedron) os << "non-";184 os << "\n Cutaway (DCUT) shape (G4VSolid) pointer: "; 185 if (!mp.fpCutawaySolid) os << "non-"; 174 186 os << "null"; 175 187 … … 192 204 (fExplodeCentre != mp.fExplodeCentre) || 193 205 (fNoOfSides != mp.fNoOfSides) || 194 (fpSection Polyhedron != mp.fpSectionPolyhedron) ||195 (fpCutaway Polyhedron != mp.fpCutawayPolyhedron) ||206 (fpSectionSolid != mp.fpSectionSolid) || 207 (fpCutawaySolid != mp.fpCutawaySolid) || 196 208 (fpEvent != mp.fpEvent) 197 209 ) -
trunk/source/visualization/modeling/src/G4PhysicalVolumeModel.cc
r1171 r1258 25 25 // 26 26 // 27 // $Id: G4PhysicalVolumeModel.cc,v 1.6 6 2009/10/23 08:08:19allison Exp $27 // $Id: G4PhysicalVolumeModel.cc,v 1.67 2010/05/11 11:16:51 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 40 40 #include "G4LogicalVolume.hh" 41 41 #include "G4VSolid.hh" 42 #include "G4SubtractionSolid.hh" 43 #include "G4IntersectionSolid.hh" 42 44 #include "G4Material.hh" 43 45 #include "G4VisAttributes.hh" … … 73 75 fpCurrentTransform (0), 74 76 fCurtailDescent (false), 75 fpClipping Polyhedron(0),77 fpClippingSolid (0), 76 78 fClippingMode (subtraction) 77 79 { … … 86 88 G4PhysicalVolumeModel::~G4PhysicalVolumeModel () 87 89 { 88 delete fpClipping Polyhedron;90 delete fpClippingSolid; 89 91 } 90 92 … … 500 502 sceneHandler.PreAddSolid (theAT, *pVisAttribs); 501 503 502 const G4Polyhedron* pSectionPolyhedron = fpMP->GetSectionPolyhedron();503 const G4Polyhedron* pCutawayPolyhedron = fpMP->GetCutawayPolyhedron();504 505 if (!fpClipping Polyhedron && !pSectionPolyhedron && !pCutawayPolyhedron) {504 G4VSolid* pSectionSolid = fpMP->GetSectionSolid(); 505 G4VSolid* pCutawaySolid = fpMP->GetCutawaySolid(); 506 507 if (!fpClippingSolid && !pSectionSolid && !pCutawaySolid) { 506 508 507 509 pSol -> DescribeYourselfTo (sceneHandler); // Standard treatment. … … 509 511 } else { 510 512 511 // Clipping, etc., performed by Boolean operations on polyhedron objects.513 // Clipping, etc., performed by Boolean operations. 512 514 513 515 // First, get polyhedron for current solid... … … 517 519 else 518 520 G4Polyhedron::SetNumberOfRotationSteps(fpMP->GetNoOfSides()); 519 G4Polyhedron* pOriginal = pSol->GetPolyhedron();521 const G4Polyhedron* pOriginal = pSol->GetPolyhedron(); 520 522 G4Polyhedron::ResetNumberOfRotationSteps(); 521 523 … … 532 534 } else { 533 535 534 G4Polyhedron resultant = *pOriginal;536 G4Polyhedron resultant(*pOriginal); 535 537 G4VisAttributes resultantVisAttribs(*pVisAttribs); 536 537 if (fpClippingPolyhedron) { 538 G4Polyhedron clipper = *fpClippingPolyhedron; // Local copy. 539 clipper.Transform(theAT.inverse()); 540 HepPolyhedronProcessor processor; 538 G4VSolid* resultantSolid = 0; 539 540 if (fpClippingSolid) { 541 541 switch (fClippingMode) { 542 542 default: 543 case subtraction: processor.push_back(HepPolyhedronProcessor::SUBTRACTION, clipper); break; 544 case intersection: processor.push_back(HepPolyhedronProcessor::INTERSECTION, clipper); break; 543 case subtraction: 544 resultantSolid = new G4SubtractionSolid 545 ("resultant_solid", pSol, fpClippingSolid, theAT.inverse()); 546 break; 547 case intersection: 548 resultantSolid = new G4IntersectionSolid 549 ("resultant_solid", pSol, fpClippingSolid, theAT.inverse()); 550 break; 545 551 } 546 if (!processor.execute(resultant)) { 547 if (fpMP->IsWarning()) 548 G4cout << 549 "WARNING: G4PhysicalVolumeModel::DescribeSolid: clipped polyhedron for" 550 "\n solid \"" << pSol->GetName() << 551 "\" not defined due to error during Boolean processing." 552 "\n It will be drawn in red." 553 << G4endl; 554 // Nevertheless, keep resultant, but draw it in red 555 resultantVisAttribs.SetColour(G4Colour::Red()); 556 } 557 } 558 559 if (pSectionPolyhedron) { 560 G4Polyhedron sectioner = *pSectionPolyhedron; // Local copy. 561 sectioner.Transform(theAT.inverse()); 562 HepPolyhedronProcessor processor; 563 processor.push_back(HepPolyhedronProcessor::INTERSECTION, sectioner); 564 if (!processor.execute(resultant)) { 565 if (fpMP->IsWarning()) 566 G4cout << 567 "WARNING: G4PhysicalVolumeModel::DescribeSolid: sectioned polyhedron for" 568 "\n solid \"" << pSol->GetName() << 569 "\" not defined due to error during Boolean processing." 570 "\n It will be drawn in red." 571 << G4endl; 572 // Nevertheless, keep resultant, but draw it in red 573 resultantVisAttribs.SetColour(G4Colour::Red()); 574 } 575 } 576 577 if (pCutawayPolyhedron) { 578 G4Polyhedron cutter = *pCutawayPolyhedron; // Local copy. 579 cutter.Transform(theAT.inverse()); 580 HepPolyhedronProcessor processor; 581 processor.push_back(HepPolyhedronProcessor::SUBTRACTION, cutter); 582 if (!processor.execute(resultant)) { 583 if (fpMP->IsWarning()) 584 G4cout << 585 "WARNING: G4PhysicalVolumeModel::DescribeSolid: cutaway polyhedron for" 586 "\n solid \"" << pSol->GetName() << 587 "\" not defined due to error during Boolean processing." 588 "\n It will be drawn in red." 589 << G4endl; 590 // Nevertheless, keep resultant, but draw it in red 591 resultantVisAttribs.SetColour(G4Colour::Red()); 592 } 593 } 552 } 553 554 if (pSectionSolid) { 555 resultantSolid = new G4IntersectionSolid 556 ("sectioned_solid", pSol, pSectionSolid, theAT.inverse()); 557 } 558 559 if (pCutawaySolid) { 560 resultantSolid = new G4SubtractionSolid 561 ("cutaway_solid", pSol, pCutawaySolid, theAT.inverse()); 562 } 563 564 G4Polyhedron* tmpResultant = resultantSolid->GetPolyhedron(); 565 if (tmpResultant) resultant = *tmpResultant; 566 else { 567 if (fpMP->IsWarning()) 568 G4cout << 569 "WARNING: G4PhysicalVolumeModel::DescribeSolid: resultant polyhedron for" 570 "\n solid \"" << pSol->GetName() << 571 "\" not defined due to error during Boolean processing." 572 "\n Original will be drawn in red." 573 << G4endl; 574 resultantVisAttribs.SetColour(G4Colour::Red()); 575 } 576 577 delete resultantSolid; 594 578 595 579 // Finally, force polyhedron drawing... -
trunk/source/visualization/modeling/src/G4TrajectoriesModel.cc
r954 r1258 25 25 // 26 26 // 27 // $Id: G4TrajectoriesModel.cc,v 1.2 4 2006/11/14 14:42:08allison Exp $27 // $Id: G4TrajectoriesModel.cc,v 1.25 2010/05/11 11:21:52 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 41 41 #include "G4AttCheck.hh" 42 42 43 G4TrajectoriesModel::G4TrajectoriesModel (): 44 fDrawingModeSet(false), 45 fDrawingMode(0), 46 fpCurrentTrajectory(0) 47 { 48 fGlobalTag = "G4TrajectoriesModel for all trajectories."; 49 fGlobalDescription = fGlobalTag; 50 } 51 43 52 G4TrajectoriesModel::G4TrajectoriesModel (G4int drawingMode): 44 fDrawingMode(drawingMode), fpCurrentTrajectory(0) { 53 fDrawingModeSet(true), 54 fDrawingMode(drawingMode), 55 fpCurrentTrajectory(0) { 45 56 fGlobalTag = "G4TrajectoriesModel for all trajectories."; 46 57 fGlobalDescription = fGlobalTag; … … 66 77 } 67 78 } 79 } 80 } 81 82 G4bool G4TrajectoriesModel::IsDrawingModeSet() const 83 { 84 return fDrawingModeSet; 85 } 86 87 G4int G4TrajectoriesModel::GetDrawingMode() const 88 { 89 if (fDrawingModeSet) return fDrawingMode; 90 else { 91 G4Exception 92 ("G4TrajectoriesModel::GetDrawingMode", 93 "", 94 FatalException, 95 "Illegal attempt to obtain i_mode." 96 "\n i_mode is an old trajectories parameter that is DEPRECATED" 97 "\n and will be removed at the next major release." 98 ); 99 return 0; 100 } 101 } 102 103 void G4TrajectoriesModel::SetDrawingMode(G4int drawingMode) 104 { 105 if (fDrawingModeSet) fDrawingMode = drawingMode; 106 else { 107 G4Exception 108 ("G4TrajectoriesModel::SetDrawingMode", 109 "", 110 FatalException, 111 "Illegal attempt to set i_mode." 112 "\n i_mode is an old trajectories parameter that is DEPRECATED" 113 "\n and will be removed at the next major release." 114 ); 68 115 } 69 116 } -
trunk/source/visualization/modeling/src/G4TrajectoryDrawByAttribute.cc
r954 r1258 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4TrajectoryDrawByAttribute.cc,v 1. 3 2006/09/14 15:41:42 tinslayExp $26 // $Id: G4TrajectoryDrawByAttribute.cc,v 1.4 2010/05/11 11:31:31 allison Exp $ 27 27 // GEANT4 tag $Name: $ 28 28 // … … 62 62 63 63 void 64 G4TrajectoryDrawByAttribute::Draw(const G4VTrajectory& object, const G4int&, 64 G4TrajectoryDrawByAttribute::Draw(const G4VTrajectory& object, 65 const G4int& i_mode, 66 const G4bool& visible) const 67 { 68 Draw(object, visible); 69 } 70 71 void 72 G4TrajectoryDrawByAttribute::Draw(const G4VTrajectory& object, 65 73 const G4bool& visible) const 66 74 { -
trunk/source/visualization/modeling/src/G4TrajectoryDrawByCharge.cc
r954 r1258 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4TrajectoryDrawByCharge.cc,v 1. 8 2006/06/29 21:33:06 gunterExp $26 // $Id: G4TrajectoryDrawByCharge.cc,v 1.9 2010/05/11 11:31:31 allison Exp $ 27 27 // GEANT4 tag $Name: $ 28 28 // … … 57 57 58 58 void 59 G4TrajectoryDrawByCharge::Draw(const G4VTrajectory& traj, const G4int& i_mode, const G4bool& visible) const 59 G4TrajectoryDrawByCharge::Draw(const G4VTrajectory& object, 60 const G4int& i_mode, 61 const G4bool& visible) const 62 { 63 Draw(object, visible); 64 } 65 66 void 67 G4TrajectoryDrawByCharge::Draw(const G4VTrajectory& traj, const G4bool& visible) const 60 68 { 61 69 G4Colour colour; … … 79 87 } 80 88 81 G4TrajectoryDrawerUtils::DrawLineAndPoints(traj, myContext , i_mode);89 G4TrajectoryDrawerUtils::DrawLineAndPoints(traj, myContext); 82 90 } 83 91 -
trunk/source/visualization/modeling/src/G4TrajectoryDrawByOriginVolume.cc
r954 r1258 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4TrajectoryDrawByOriginVolume.cc,v 1. 4 2006/06/29 21:33:08 gunterExp $26 // $Id: G4TrajectoryDrawByOriginVolume.cc,v 1.5 2010/05/11 11:31:31 allison Exp $ 27 27 // GEANT4 tag $Name: $ 28 28 // … … 45 45 46 46 void 47 G4TrajectoryDrawByOriginVolume::Draw(const G4VTrajectory& traj, const G4int& i_mode, const G4bool& visible) const 47 G4TrajectoryDrawByOriginVolume::Draw(const G4VTrajectory& object, 48 const G4int& i_mode, 49 const G4bool& visible) const 50 { 51 Draw(object, visible); 52 } 53 54 void 55 G4TrajectoryDrawByOriginVolume::Draw(const G4VTrajectory& traj, const G4bool& visible) const 48 56 { 49 57 G4Colour colour(fDefault); … … 79 87 } 80 88 81 G4TrajectoryDrawerUtils::DrawLineAndPoints(traj, myContext , i_mode);89 G4TrajectoryDrawerUtils::DrawLineAndPoints(traj, myContext); 82 90 } 83 91 -
trunk/source/visualization/modeling/src/G4TrajectoryDrawByParticleID.cc
r954 r1258 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4TrajectoryDrawByParticleID.cc,v 1. 8 2006/06/29 21:33:10 gunterExp $26 // $Id: G4TrajectoryDrawByParticleID.cc,v 1.9 2010/05/11 11:31:31 allison Exp $ 27 27 // GEANT4 tag $Name: $ 28 28 // … … 43 43 44 44 void 45 G4TrajectoryDrawByParticleID::Draw(const G4VTrajectory& traj, const G4int& i_mode, const G4bool& visible) const 45 G4TrajectoryDrawByParticleID::Draw(const G4VTrajectory& object, 46 const G4int& i_mode, 47 const G4bool& visible) const 48 { 49 Draw(object, visible); 50 } 51 52 void 53 G4TrajectoryDrawByParticleID::Draw(const G4VTrajectory& traj, const G4bool& visible) const 46 54 { 47 55 G4Colour colour(fDefault); … … 62 70 } 63 71 64 G4TrajectoryDrawerUtils::DrawLineAndPoints(traj, myContext , i_mode);72 G4TrajectoryDrawerUtils::DrawLineAndPoints(traj, myContext); 65 73 } 66 74 -
trunk/source/visualization/modeling/src/G4TrajectoryDrawerUtils.cc
r1247 r1258 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4TrajectoryDrawerUtils.cc,v 1.1 3 2010/04/27 15:46:18 lgarnierExp $26 // $Id: G4TrajectoryDrawerUtils.cc,v 1.14 2010/05/11 11:58:18 allison Exp $ 27 27 // GEANT4 tag $Name: $ 28 28 // … … 40 40 #include "G4UIcommand.hh" 41 41 #include "G4AttValue.hh" 42 #include <sstream> 42 43 43 44 namespace G4TrajectoryDrawerUtils { … … 79 80 } 80 81 } 81 82 83 /*** 82 84 void DrawLineAndPoints(const G4VTrajectory& traj, const G4int& i_mode, const G4Colour& colour, const G4bool& visible) { 83 85 // If i_mode>=0, draws a trajectory as a polyline (default is blue for … … 87 89 // given by std::abs(i_mode)/1000. E.g: i_mode = 5000 gives easily 88 90 // visible markers. 91 92 static G4bool warnedAboutIMode = false; 93 std::ostringstream oss; 94 oss << "WARNING: DEPRECATED use of i_mode (i_mode: " << i_mode 95 << "). Feature will be removed at a future major release."; 96 if (!warnedAboutIMode) { 97 G4Exception 98 ("G4TrajectoryDrawerUtils::DrawLineAndPoints(traj, i_mode, colour, visible)", 99 "", 100 JustWarning, 101 oss.str().c_str()); 102 warnedAboutIMode = true; 103 } 89 104 90 105 G4VVisManager* pVVisManager = G4VVisManager::GetConcreteInstance(); … … 130 145 131 146 } 147 ***/ 132 148 133 149 static void GetTimes(const G4VTrajectory& traj, … … 146 162 147 163 // Pre- and Post-Point times from the trajectory point... 148 G4double trajectoryPointPreTime = - DBL_MAX;149 G4double trajectoryPointPostTime = DBL_MAX;164 G4double trajectoryPointPreTime = -std::numeric_limits<double>::max(); 165 G4double trajectoryPointPostTime = std::numeric_limits<double>::max(); 150 166 std::vector<G4AttValue>* trajectoryPointAttValues = 151 167 aTrajectoryPoint->CreateAttValues(); … … 356 372 void DrawLineAndPoints(const G4VTrajectory& traj, const G4VisTrajContext& context, const G4int& i_mode) 357 373 { 374 static G4bool warnedAboutIMode = false; 375 std::ostringstream oss; 376 oss << "WARNING: DEPRECATED use of i_mode (i_mode: " << i_mode 377 << "). Feature will be removed at a future major release."; 378 if (!warnedAboutIMode) { 379 G4Exception 380 ("G4TrajectoryDrawerUtils::DrawLineAndPoints(traj, context, i_mode)", 381 "", 382 JustWarning, 383 oss.str().c_str()); 384 warnedAboutIMode = true; 385 } 386 358 387 // Extra copy while i_mode is still around 359 388 G4VisTrajContext myContext(context); … … 370 399 myContext.SetAuxPtsSize(markerSize); 371 400 myContext.SetStepPtsSize(markerSize); 372 373 static G4bool warnedAboutIMode = false;374 375 if (!warnedAboutIMode) {376 G4cout<<"Trajectory drawing configuration will be based on imode value of "<<i_mode<<G4endl;377 warnedAboutIMode = true;378 }379 401 } 380 402 … … 421 443 } 422 444 } 445 446 void DrawLineAndPoints(const G4VTrajectory& traj, const G4VisTrajContext& context) 447 { 448 // Return if don't need to do anything 449 if (!context.GetDrawLine() && !context.GetDrawAuxPts() && !context.GetDrawStepPts()) return; 450 451 // Get points to draw 452 G4Polyline trajectoryLine; 453 G4Polymarker stepPoints; 454 G4Polymarker auxiliaryPoints; 455 456 GetPoints(traj, trajectoryLine, auxiliaryPoints, stepPoints); 457 458 if (context.GetTimeSliceInterval()) { 459 460 // Get corresponding track time information, if any 461 std::vector<G4double> trajectoryLineTimes; 462 std::vector<G4double> stepPointTimes; 463 std::vector<G4double> auxiliaryPointTimes; 464 465 GetTimes(traj, trajectoryLineTimes, auxiliaryPointTimes, stepPointTimes); 466 467 // Check validity 468 if (trajectoryLineTimes.size() != trajectoryLine.size() || 469 stepPointTimes.size() != stepPoints.size() || 470 auxiliaryPointTimes.size() != auxiliaryPoints.size()) { 471 472 // Revert to drawing without time information... 473 DrawWithoutTime(context, trajectoryLine, auxiliaryPoints, stepPoints); 474 } else { 475 476 SliceLine(context.GetTimeSliceInterval(), 477 trajectoryLine, trajectoryLineTimes); 478 479 DrawWithTime(context, 480 trajectoryLine, auxiliaryPoints, stepPoints, 481 trajectoryLineTimes, auxiliaryPointTimes, stepPointTimes); 482 } 483 484 } else { 485 486 DrawWithoutTime(context, trajectoryLine, auxiliaryPoints, stepPoints); 487 488 } 489 } 423 490 } -
trunk/source/visualization/modeling/src/G4TrajectoryGenericDrawer.cc
r954 r1258 24 24 // ******************************************************************** 25 25 // 26 // $Id: G4TrajectoryGenericDrawer.cc,v 1. 2 2006/06/29 21:33:16 gunterExp $26 // $Id: G4TrajectoryGenericDrawer.cc,v 1.3 2010/05/11 11:31:31 allison Exp $ 27 27 // GEANT4 tag $Name: $ 28 28 // … … 57 57 58 58 void 59 G4TrajectoryGenericDrawer::Draw(const G4VTrajectory& traj, const G4bool& visible) const 60 { 61 G4VisTrajContext myContext(GetContext()); 62 myContext.SetVisible(visible); 63 64 if (GetVerbose()) { 65 G4cout<<"G4TrajectoryGenericDrawer named "<<Name(); 66 G4cout<<", drawing trajectory with configuration: "<<G4endl; 67 myContext.Print(G4cout); 68 } 69 70 G4TrajectoryDrawerUtils::DrawLineAndPoints(traj, myContext); 71 } 72 73 void 59 74 G4TrajectoryGenericDrawer::Print(std::ostream& ostr) const 60 75 {
Note: See TracChangeset
for help on using the changeset viewer.