Import Geant4 8.1.0 source tree
This commit is contained in:
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4GraphicsSystemList.hh,v 1.8 2003/06/16 17:14:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4GraphicsSystemList.hh,v 1.9 2006/06/29 21:27:54 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 2nd April 1996
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Scene.hh,v 1.14 2003/11/27 11:48:03 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4Scene.hh,v 1.17 2006/06/29 21:27:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
// Scene John Allison 19th July 1996.
|
||||
@@ -92,8 +95,13 @@ public: // With description
|
||||
// "transient" objects, such as hits, at end of run. Otherwise
|
||||
// they will be accumulated.
|
||||
|
||||
G4bool GetRecomputeTransients () const;
|
||||
// If true, the visualization manager will attempt to re-run events
|
||||
// in order to reconstruct trajectories, etc., when the viewer
|
||||
// requests a scene traversal.
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// Add, Set, Clear functions...
|
||||
// Add and Set functions...
|
||||
|
||||
G4bool AddRunDurationModel (G4VModel*, G4bool warn = false);
|
||||
// Adds models of type which are expected to last for the duration
|
||||
@@ -120,9 +128,6 @@ public: // With description
|
||||
std::vector<G4VModel*>& SetEndOfEventModelList ();
|
||||
// Allows you to change the model list - do with care!
|
||||
|
||||
void Clear ();
|
||||
// Clears and destroys models in all lists.
|
||||
|
||||
void SetRefreshAtEndOfEvent(G4bool);
|
||||
// If set true, the visualization manager will request viewer to
|
||||
// refresh "transient" objects, such as hits, at end of event.
|
||||
@@ -133,6 +138,14 @@ public: // With description
|
||||
// refresh "transient" objects, such as hits, at end of run.
|
||||
// Otherwise they will be accumulated.
|
||||
|
||||
void SetRecomputeTransients(G4bool);
|
||||
// If set true, the visualization manager will attempt to re-run
|
||||
// events in order to reconstruct trajectories, etc., when the
|
||||
// viewer requests a scene traversal.
|
||||
|
||||
//////////////////////////////////////////////
|
||||
// Other functions...
|
||||
|
||||
void CalculateExtent();
|
||||
// (Re-)calculates the extent from the extents of its models.
|
||||
|
||||
@@ -144,6 +157,7 @@ private:
|
||||
G4Point3D fStandardTargetPoint;
|
||||
G4bool fRefreshAtEndOfEvent;
|
||||
G4bool fRefreshAtEndOfRun;
|
||||
G4bool fRecomputeTransients;
|
||||
};
|
||||
|
||||
#include "G4Scene.icc"
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Scene.icc,v 1.11 2003/11/27 11:48:06 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4Scene.icc,v 1.13 2006/06/29 21:27:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
// Scene data John Allison 19th July 1996.
|
||||
@@ -65,6 +68,10 @@ inline G4bool G4Scene::GetRefreshAtEndOfRun () const {
|
||||
return fRefreshAtEndOfRun;
|
||||
}
|
||||
|
||||
inline G4bool G4Scene::GetRecomputeTransients () const {
|
||||
return fRecomputeTransients;
|
||||
}
|
||||
|
||||
inline std::vector<G4VModel*>& G4Scene::SetRunDurationModelList ()
|
||||
{
|
||||
return fRunDurationModelList;
|
||||
@@ -75,10 +82,14 @@ inline std::vector<G4VModel*>& G4Scene::SetEndOfEventModelList ()
|
||||
return fRunDurationModelList;
|
||||
}
|
||||
|
||||
inline void G4Scene::SetRefreshAtEndOfEvent(G4bool refresh) {
|
||||
inline void G4Scene::SetRefreshAtEndOfEvent(G4bool refresh) {
|
||||
fRefreshAtEndOfEvent = refresh;
|
||||
}
|
||||
|
||||
inline void G4Scene::SetRefreshAtEndOfRun(G4bool refresh) {
|
||||
inline void G4Scene::SetRefreshAtEndOfRun(G4bool refresh) {
|
||||
fRefreshAtEndOfRun = refresh;
|
||||
}
|
||||
|
||||
inline void G4Scene::SetRecomputeTransients(G4bool recompute) {
|
||||
fRecomputeTransients = recompute;
|
||||
}
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SceneHandlerList.hh,v 1.7 2003/06/16 17:14:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4SceneHandlerList.hh,v 1.8 2006/06/29 21:28:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
// John Allison May 1996
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4SceneList.hh,v 1.9 2003/06/16 17:14:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4SceneList.hh,v 1.10 2006/06/29 21:28:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 9th August 1998
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VGraphicsSystem.hh,v 1.10 2003/06/16 17:14:07 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VGraphicsSystem.hh,v 1.11 2006/06/29 21:28:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 27th March 1996
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VGraphicsSystem.icc,v 1.6 2001/07/11 10:09:14 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VGraphicsSystem.icc,v 1.7 2006/06/29 21:28:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 27th March 1996
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VSceneHandler.hh,v 1.25 2005/09/02 12:58:18 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VSceneHandler.hh,v 1.33 2006/06/29 21:28:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 19th July 1996.
|
||||
@@ -97,7 +100,7 @@ public: // With description
|
||||
// IMPORTANT: invoke this from your polymorphic versions, e.g.:
|
||||
// void MyXXXSceneHandler::PostAddSolid () {
|
||||
// ...
|
||||
// G4VSceneHandler::PostAddSolid (objectTransformation, visAttribs);
|
||||
// G4VSceneHandler::PostAddSolid ();
|
||||
// }
|
||||
|
||||
virtual void AddSolid (const G4Box&);
|
||||
@@ -125,27 +128,19 @@ public: // With description
|
||||
virtual void AddCompound (const G4VTrajectory&);
|
||||
virtual void AddCompound (const G4VHit&);
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Other inherited functions.
|
||||
|
||||
virtual void EstablishSpecials (G4PhysicalVolumeModel&);
|
||||
// Used to establish any special relationships between scene and this
|
||||
// particular type of model - non-pure, i.e., no requirement to
|
||||
// implement. See G4PhysicalVolumeModel.hh for details.
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Functions for adding primitives.
|
||||
|
||||
virtual void BeginModeling ();
|
||||
// IMPORTANT: invoke this from your polymorphic versions, e.g.:
|
||||
// void MyXXXScene::BeginModeling () {
|
||||
// void MyXXXSceneHandler::BeginModeling () {
|
||||
// G4VSceneHandler::BeginModeling ();
|
||||
// ...
|
||||
// }
|
||||
|
||||
virtual void EndModeling ();
|
||||
// IMPORTANT: invoke this from your polymorphic versions, e.g.:
|
||||
// void MyXXXScene::EndModeling () {
|
||||
// void MyXXXSceneHandler::EndModeling () {
|
||||
// ...
|
||||
// G4VSceneHandler::EndModeling ();
|
||||
// }
|
||||
@@ -166,6 +161,24 @@ public: // With description
|
||||
// G4VSceneHandler::EndPrimitives ();
|
||||
// }
|
||||
|
||||
virtual void BeginPrimitives2D ();
|
||||
// The x,y coordinates of the primitives passed to AddPrimitive are
|
||||
// intrepreted as screen coordinates, -1 < x,y < 1. The
|
||||
// z-coordinate is ignored.
|
||||
// IMPORTANT: invoke this from your polymorphic versions, e.g.:
|
||||
// void MyXXXSceneHandler::BeginPrimitives2D
|
||||
// (const G4Transform3D& objectTransformation) {
|
||||
// G4VSceneHandler::BeginPrimitives2D ();
|
||||
// ...
|
||||
// }
|
||||
|
||||
virtual void EndPrimitives2D ();
|
||||
// IMPORTANT: invoke this from your polymorphic versions, e.g.:
|
||||
// void MyXXXSceneHandler::EndPrimitives2D () {
|
||||
// ...
|
||||
// G4VSceneHandler::EndPrimitives2D ();
|
||||
// }
|
||||
|
||||
virtual void AddPrimitive (const G4Polyline&) = 0;
|
||||
virtual void AddPrimitive (const G4Scale&);
|
||||
// Default implementation in this class but can be over-ridden.
|
||||
@@ -177,10 +190,17 @@ public: // With description
|
||||
virtual void AddPrimitive (const G4Polyhedron&) = 0;
|
||||
virtual void AddPrimitive (const G4NURBS&) = 0;
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Other inherited functions.
|
||||
|
||||
virtual void EstablishSpecials (G4PhysicalVolumeModel&);
|
||||
// Used to establish any special relationships between scene handler and this
|
||||
// particular type of model - non-pure, i.e., no requirement to
|
||||
// implement. See G4PhysicalVolumeModel.hh for details.
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Access functions.
|
||||
const G4String& GetName () const;
|
||||
void SetName (const G4String&);
|
||||
G4int GetSceneHandlerId () const;
|
||||
G4int GetViewCount () const;
|
||||
G4VGraphicsSystem* GetGraphicsSystem () const;
|
||||
@@ -189,13 +209,20 @@ public: // With description
|
||||
G4VModel* GetModel () const;
|
||||
G4VViewer* GetCurrentViewer () const;
|
||||
G4bool GetMarkForClearingTransientStore () const;
|
||||
G4bool IsReadyForTransients () const;
|
||||
G4bool GetTransientsDrawnThisEvent () const;
|
||||
G4bool GetTransientsDrawnThisRun () const;
|
||||
void SetName (const G4String&);
|
||||
void SetCurrentViewer (G4VViewer*);
|
||||
void SetScene (G4Scene*);
|
||||
G4ViewerList& SetViewerList (); // Non-const so you can change.
|
||||
void SetModel (G4VModel*);
|
||||
void SetMarkForClearingTransientStore (G4bool);
|
||||
// Sets flag which will cause transient store to be cleared at the
|
||||
// next call to BeginPrimitives().
|
||||
// next call to BeginPrimitives(). Maintained by vis manager.
|
||||
void SetTransientsDrawnThisEvent (G4bool);
|
||||
void SetTransientsDrawnThisRun (G4bool);
|
||||
// Maintained by vis manager.
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Public utility functions.
|
||||
@@ -230,7 +257,7 @@ public: // With description
|
||||
// GetMarkerSize / 2.
|
||||
|
||||
G4ModelingParameters* CreateModelingParameters ();
|
||||
// Only the scene and view know what the Modeling Parameters should
|
||||
// Only the scene handler and view know what the Modeling Parameters should
|
||||
// be. For historical reasons, the GEANT4 Visualization Environment
|
||||
// maintains its own Scene Data and View Parameters, which must be
|
||||
// converted, when needed, to Modeling Parameters.
|
||||
@@ -271,30 +298,31 @@ protected:
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Data members
|
||||
|
||||
G4VGraphicsSystem& fSystem; // Graphics system.
|
||||
const G4int fSceneHandlerId; // Id of this instance.
|
||||
G4String fName;
|
||||
G4int fViewCount; // To determine view ids.
|
||||
G4ViewerList fViewerList; // Viewers.
|
||||
G4VViewer* fpViewer; // Current viewer.
|
||||
G4Scene* fpScene; // Scene for this scene handler.
|
||||
G4bool fMarkForClearingTransientStore;
|
||||
G4bool fSecondPassRequested;
|
||||
G4bool fSecondPass; // ...in process.
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Workspace...
|
||||
|
||||
G4bool fReadyForTransients; // I.e., not processing scene.
|
||||
G4VModel* fpModel; // Current model.
|
||||
const G4Transform3D* fpObjectTransformation; // Current
|
||||
// accumulated object transformation.
|
||||
G4int fNestingDepth; // For Begin/EndPrimitives.
|
||||
G4VGraphicsSystem& fSystem; // Graphics system.
|
||||
const G4int fSceneHandlerId; // Id of this instance.
|
||||
G4String fName;
|
||||
G4int fViewCount; // To determine view ids.
|
||||
G4ViewerList fViewerList; // Viewers.
|
||||
G4VViewer* fpViewer; // Current viewer.
|
||||
G4Scene* fpScene; // Scene for this scene handler.
|
||||
G4bool fMarkForClearingTransientStore;
|
||||
G4bool fReadyForTransients; // I.e., not processing the
|
||||
// run-duration part of scene.
|
||||
G4bool fTransientsDrawnThisEvent; // Maintained by vis
|
||||
G4bool fTransientsDrawnThisRun; // manager.
|
||||
G4bool fProcessingSolid; // True if within Pre/PostAddSolid.
|
||||
G4bool fSecondPassRequested;
|
||||
G4bool fSecondPass; // ...in process.
|
||||
G4VModel* fpModel; // Current model.
|
||||
const G4Transform3D* fpObjectTransformation; // Current accumulated
|
||||
// object transformation.
|
||||
G4int fNestingDepth; // For Begin/EndPrimitives.
|
||||
const G4VisAttributes* fpVisAttribs; // Working vis attributes.
|
||||
G4int fCurrentDepth; // Current depth of geom. hierarchy.
|
||||
G4VPhysicalVolume* fpCurrentPV; // Current physical volume.
|
||||
G4LogicalVolume* fpCurrentLV; // Current logical volume.
|
||||
G4Material* fpCurrentMaterial; // Current material.
|
||||
G4int fCurrentDepth; // Current depth of geom. hierarchy.
|
||||
G4VPhysicalVolume* fpCurrentPV; // Current physical volume.
|
||||
G4LogicalVolume* fpCurrentLV; // Current logical volume.
|
||||
G4Material* fpCurrentMaterial; // Current material.
|
||||
const G4Transform3D fIdentityTransformation;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VSceneHandler.icc,v 1.12 2001/08/09 20:13:40 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VSceneHandler.icc,v 1.17 2006/06/29 21:28:10 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 19th July 1996.
|
||||
@@ -83,6 +86,18 @@ inline G4bool G4VSceneHandler::GetMarkForClearingTransientStore () const {
|
||||
return fMarkForClearingTransientStore;
|
||||
}
|
||||
|
||||
inline G4bool G4VSceneHandler::IsReadyForTransients () const {
|
||||
return fReadyForTransients;
|
||||
}
|
||||
|
||||
inline G4bool G4VSceneHandler::GetTransientsDrawnThisEvent () const {
|
||||
return fTransientsDrawnThisEvent;
|
||||
}
|
||||
|
||||
inline G4bool G4VSceneHandler::GetTransientsDrawnThisRun () const {
|
||||
return fTransientsDrawnThisRun;
|
||||
}
|
||||
|
||||
inline void G4VSceneHandler::SetCurrentViewer (G4VViewer* pViewer) {
|
||||
fpViewer = pViewer;
|
||||
}
|
||||
@@ -100,6 +115,14 @@ inline void G4VSceneHandler::SetMarkForClearingTransientStore (G4bool mark) {
|
||||
fMarkForClearingTransientStore = mark;
|
||||
}
|
||||
|
||||
inline void G4VSceneHandler::SetTransientsDrawnThisEvent (G4bool drawn) {
|
||||
fTransientsDrawnThisEvent = drawn;
|
||||
}
|
||||
|
||||
inline void G4VSceneHandler::SetTransientsDrawnThisRun (G4bool drawn) {
|
||||
fTransientsDrawnThisRun = drawn;
|
||||
}
|
||||
|
||||
inline const G4Colour& G4VSceneHandler::GetColor (const G4Visible& visible) {
|
||||
return GetColour (visible);
|
||||
}
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VUserVisAction.hh,v 1.5 2005/11/22 16:53:27 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VUserVisAction.hh,v 1.8 2006/06/29 21:28:12 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -44,16 +47,17 @@
|
||||
|
||||
#include "G4Transform3D.hh"
|
||||
|
||||
class G4VUserVisAction {
|
||||
class G4VGraphicsScene;
|
||||
|
||||
class G4VUserVisAction
|
||||
{
|
||||
public: // With description
|
||||
G4VUserVisAction() {}
|
||||
virtual ~G4VUserVisAction() {}
|
||||
virtual void Draw() = 0;
|
||||
void operator()(const G4Transform3D& = G4Transform3D()) {
|
||||
void operator()(G4VGraphicsScene&, const G4Transform3D&) {
|
||||
Draw();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VViewer.hh,v 1.16 2005/06/02 17:43:47 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VViewer.hh,v 1.18 2006/06/29 21:28:14 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 27th March 1996
|
||||
@@ -126,7 +129,6 @@ protected:
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Other parameters.
|
||||
G4bool fModified; // If View Parameters have been modified.
|
||||
G4bool fNeedKernelVisit; // See DrawView() for comments.
|
||||
};
|
||||
|
||||
@@ -135,7 +137,7 @@ protected:
|
||||
/*********************************************
|
||||
|
||||
Here is a minimal DrawView () as it might be implemented in the
|
||||
concrete view.
|
||||
concrete viewer.
|
||||
|
||||
void G4VViewer::DrawView () { // Default - concrete view usually overrides.
|
||||
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VViewer.icc,v 1.10 2005/02/23 11:24:52 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VViewer.icc,v 1.11 2006/06/29 21:28:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 30th December 1996
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VVisCommand.hh,v 1.17 2005/03/09 23:48:15 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VVisCommand.hh,v 1.18 2006/06/29 21:28:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
|
||||
// Base class for visualization commands - John Allison 9th August 1998
|
||||
// It is really a messenger - we have one command per messenger.
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VVisCommand.icc,v 1.4 2001/07/11 10:09:14 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VVisCommand.icc,v 1.5 2006/06/29 21:28:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
|
||||
// Base class for visualization commands - John Allison 9th August 1998
|
||||
// It is really a messenger - we have one command per messenger.
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ViewParameters.hh,v 1.20 2005/11/13 15:26:18 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4ViewParameters.hh,v 1.21 2006/06/29 21:28:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 19th July 1996
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ViewParameters.icc,v 1.10 2005/11/13 15:26:18 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4ViewParameters.icc,v 1.11 2006/06/29 21:28:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 20th October 1996
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ViewerList.hh,v 1.7 2003/06/16 17:14:12 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4ViewerList.hh,v 1.8 2006/06/29 21:28:26 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
// John Allison May 1996
|
||||
|
||||
@@ -1,26 +1,30 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4VisCommandModelCreate.hh,v 1.2 2005/11/23 20:25:21 tinslay Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VisCommandModelCreate.hh,v 1.3 2006/06/29 21:28:28 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
// Jane Tinslay, John Allison, Joseph Perl October 2005
|
||||
//
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommands.hh,v 1.3 2001/08/05 02:29:02 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VisCommands.hh,v 1.5 2006/06/29 21:28:30 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
|
||||
// /vis/ top level commands - John Allison 5th February 2001
|
||||
|
||||
@@ -48,6 +51,18 @@ private:
|
||||
G4UIcmdWithoutParameter* fpCommand1;
|
||||
};
|
||||
|
||||
class G4VisCommandList: public G4VVisCommand {
|
||||
public:
|
||||
G4VisCommandList ();
|
||||
virtual ~G4VisCommandList ();
|
||||
G4String GetCurrentValue (G4UIcommand* command);
|
||||
void SetNewValue (G4UIcommand* command, G4String newValue);
|
||||
private:
|
||||
G4VisCommandList (const G4VisCommandList&);
|
||||
G4VisCommandList& operator = (const G4VisCommandList&);
|
||||
G4UIcmdWithAString* fpCommand;
|
||||
};
|
||||
|
||||
class G4VisCommandVerbose: public G4VVisCommand {
|
||||
public:
|
||||
G4VisCommandVerbose ();
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommandsCompound.hh,v 1.8 2005/02/15 14:50:52 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VisCommandsCompound.hh,v 1.9 2006/06/29 21:28:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
|
||||
// Compound /vis/ commands - John Allison 15th May 2000
|
||||
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommandsGeometry.hh,v 1.3 2006/06/29 21:28:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
|
||||
// /vis/geometry commands - John Allison 31st January 2006
|
||||
|
||||
#ifndef G4VISCOMMANDSGEOMETRY_HH
|
||||
#define G4VISCOMMANDSGEOMETRY_HH
|
||||
|
||||
#include "G4VVisCommand.hh"
|
||||
|
||||
class G4UIcmdWithAString;
|
||||
class G4LogicalVolume;
|
||||
class G4VisAttributes;
|
||||
|
||||
#include <map>
|
||||
|
||||
class G4VVisCommandGeometry: public G4VVisCommand {
|
||||
public:
|
||||
virtual ~G4VVisCommandGeometry();
|
||||
protected:
|
||||
static std::map<G4LogicalVolume*, const G4VisAttributes*>
|
||||
fVisAttsMap;
|
||||
typedef std::map<G4LogicalVolume*, const G4VisAttributes*>::const_iterator
|
||||
VisAttsMapIterator;
|
||||
};
|
||||
|
||||
class G4VisCommandGeometryList: public G4VVisCommandGeometry {
|
||||
public:
|
||||
G4VisCommandGeometryList();
|
||||
virtual ~G4VisCommandGeometryList();
|
||||
G4String GetCurrentValue(G4UIcommand* command);
|
||||
void SetNewValue(G4UIcommand* command, G4String newValue);
|
||||
private:
|
||||
G4VisCommandGeometryList(const G4VisCommandGeometryList&);
|
||||
G4VisCommandGeometryList& operator=(const G4VisCommandGeometryList&);
|
||||
G4UIcmdWithAString* fpCommand;
|
||||
};
|
||||
|
||||
class G4VisCommandGeometryRestore: public G4VVisCommandGeometry {
|
||||
public:
|
||||
G4VisCommandGeometryRestore();
|
||||
virtual ~G4VisCommandGeometryRestore();
|
||||
G4String GetCurrentValue(G4UIcommand* command);
|
||||
void SetNewValue(G4UIcommand* command, G4String newValue);
|
||||
private:
|
||||
G4VisCommandGeometryRestore(const G4VisCommandGeometryRestore&);
|
||||
G4VisCommandGeometryRestore& operator=(const G4VisCommandGeometryRestore&);
|
||||
G4UIcmdWithAString* fpCommand;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,271 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommandsGeometrySet.hh,v 1.2 2006/06/29 21:28:36 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
|
||||
// /vis/geometry commands - John Allison 31st January 2006
|
||||
|
||||
#ifndef G4VISCOMMANDSGEOMETRYSET_HH
|
||||
#define G4VISCOMMANDSGEOMETRYSET_HH
|
||||
|
||||
#include "G4VisCommandsGeometry.hh"
|
||||
|
||||
class G4UIcommand;
|
||||
class G4VisAttributes;
|
||||
|
||||
class G4VVisCommandGeometrySetFunction {
|
||||
public:
|
||||
virtual void operator()(G4VisAttributes*) const = 0;
|
||||
};
|
||||
|
||||
class G4VisCommandGeometrySetColourFunction:
|
||||
public G4VVisCommandGeometrySetFunction {
|
||||
public:
|
||||
G4VisCommandGeometrySetColourFunction
|
||||
(const G4Colour& colour):
|
||||
fColour(colour) {}
|
||||
void operator()
|
||||
(G4VisAttributes* visAtts) const
|
||||
{visAtts->SetColour(fColour);}
|
||||
private:
|
||||
const G4Colour& fColour;
|
||||
};
|
||||
|
||||
class G4VisCommandGeometrySetDaughtersInvisibleFunction:
|
||||
public G4VVisCommandGeometrySetFunction {
|
||||
public:
|
||||
G4VisCommandGeometrySetDaughtersInvisibleFunction
|
||||
(G4bool daughtersInvisible):
|
||||
fDaughtersInvisible(daughtersInvisible) {}
|
||||
void operator()
|
||||
(G4VisAttributes* visAtts) const
|
||||
{visAtts->SetDaughtersInvisible(fDaughtersInvisible);}
|
||||
private:
|
||||
G4bool fDaughtersInvisible;
|
||||
};
|
||||
|
||||
class G4VisCommandGeometrySetForceAuxEdgeVisibleFunction:
|
||||
public G4VVisCommandGeometrySetFunction {
|
||||
public:
|
||||
G4VisCommandGeometrySetForceAuxEdgeVisibleFunction
|
||||
(G4bool forceAuxEdgeVisible):
|
||||
fForceAuxEdgeVisible(forceAuxEdgeVisible) {}
|
||||
void operator()
|
||||
(G4VisAttributes* visAtts) const
|
||||
{visAtts->SetForceAuxEdgeVisible(fForceAuxEdgeVisible);}
|
||||
private:
|
||||
G4bool fForceAuxEdgeVisible;
|
||||
};
|
||||
|
||||
class G4VisCommandGeometrySetForceSolidFunction:
|
||||
public G4VVisCommandGeometrySetFunction {
|
||||
public:
|
||||
G4VisCommandGeometrySetForceSolidFunction
|
||||
(G4bool forceSolid):
|
||||
fForceSolid(forceSolid) {}
|
||||
void operator()
|
||||
(G4VisAttributes* visAtts) const
|
||||
{visAtts->SetForceSolid(fForceSolid);}
|
||||
private:
|
||||
G4bool fForceSolid;
|
||||
};
|
||||
|
||||
class G4VisCommandGeometrySetForceWireframeFunction:
|
||||
public G4VVisCommandGeometrySetFunction {
|
||||
public:
|
||||
G4VisCommandGeometrySetForceWireframeFunction
|
||||
(G4bool forceWireframe):
|
||||
fForceWireframe(forceWireframe) {}
|
||||
void operator()
|
||||
(G4VisAttributes* visAtts) const
|
||||
{visAtts->SetForceWireframe(fForceWireframe);}
|
||||
private:
|
||||
G4bool fForceWireframe;
|
||||
};
|
||||
|
||||
class G4VisCommandGeometrySetLineStyleFunction:
|
||||
public G4VVisCommandGeometrySetFunction {
|
||||
public:
|
||||
G4VisCommandGeometrySetLineStyleFunction
|
||||
(G4VisAttributes::LineStyle lineStyle):
|
||||
fLineStyle(lineStyle) {}
|
||||
void operator()
|
||||
(G4VisAttributes* visAtts) const
|
||||
{visAtts->SetLineStyle(fLineStyle);}
|
||||
private:
|
||||
G4VisAttributes::LineStyle fLineStyle;
|
||||
};
|
||||
|
||||
class G4VisCommandGeometrySetLineWidthFunction:
|
||||
public G4VVisCommandGeometrySetFunction {
|
||||
public:
|
||||
G4VisCommandGeometrySetLineWidthFunction
|
||||
(G4double lineWidth):
|
||||
fLineWidth(lineWidth) {}
|
||||
void operator()
|
||||
(G4VisAttributes* visAtts) const
|
||||
{visAtts->SetLineWidth(fLineWidth);}
|
||||
private:
|
||||
G4double fLineWidth;
|
||||
};
|
||||
|
||||
class G4VisCommandGeometrySetVisibilityFunction:
|
||||
public G4VVisCommandGeometrySetFunction {
|
||||
public:
|
||||
G4VisCommandGeometrySetVisibilityFunction
|
||||
(G4bool visibility):
|
||||
fVisibility(visibility) {}
|
||||
void operator()
|
||||
(G4VisAttributes* visAtts) const
|
||||
{visAtts->SetVisibility(fVisibility);}
|
||||
private:
|
||||
G4bool fVisibility;
|
||||
};
|
||||
|
||||
class G4VVisCommandGeometrySet: public G4VVisCommandGeometry {
|
||||
protected:
|
||||
void Set(G4String logVolName, const G4VVisCommandGeometrySetFunction&,
|
||||
G4int requestedDepth);
|
||||
void SetLVVisAtts(G4LogicalVolume*, const G4VVisCommandGeometrySetFunction&,
|
||||
G4int depth, G4int requestedDepth);
|
||||
};
|
||||
|
||||
class G4VisCommandGeometrySetColour: public G4VVisCommandGeometrySet {
|
||||
public:
|
||||
G4VisCommandGeometrySetColour ();
|
||||
virtual ~G4VisCommandGeometrySetColour ();
|
||||
G4String GetCurrentValue (G4UIcommand* command);
|
||||
void SetNewValue (G4UIcommand* command, G4String newValue);
|
||||
private:
|
||||
G4VisCommandGeometrySetColour (const G4VisCommandGeometrySetColour&);
|
||||
G4VisCommandGeometrySetColour& operator = (const G4VisCommandGeometrySetColour&);
|
||||
G4UIcommand* fpCommand;
|
||||
};
|
||||
|
||||
class G4VisCommandGeometrySetDaughtersInvisible:
|
||||
public G4VVisCommandGeometrySet {
|
||||
public:
|
||||
G4VisCommandGeometrySetDaughtersInvisible ();
|
||||
virtual ~G4VisCommandGeometrySetDaughtersInvisible ();
|
||||
G4String GetCurrentValue (G4UIcommand* command);
|
||||
void SetNewValue (G4UIcommand* command, G4String newValue);
|
||||
private:
|
||||
G4VisCommandGeometrySetDaughtersInvisible
|
||||
(const G4VisCommandGeometrySetDaughtersInvisible&);
|
||||
G4VisCommandGeometrySetDaughtersInvisible& operator=
|
||||
(const G4VisCommandGeometrySetDaughtersInvisible&);
|
||||
G4UIcommand* fpCommand;
|
||||
};
|
||||
|
||||
class G4VisCommandGeometrySetForceAuxEdgeVisible:
|
||||
public G4VVisCommandGeometrySet {
|
||||
public:
|
||||
G4VisCommandGeometrySetForceAuxEdgeVisible ();
|
||||
virtual ~G4VisCommandGeometrySetForceAuxEdgeVisible ();
|
||||
G4String GetCurrentValue (G4UIcommand* command);
|
||||
void SetNewValue (G4UIcommand* command, G4String newValue);
|
||||
private:
|
||||
G4VisCommandGeometrySetForceAuxEdgeVisible
|
||||
(const G4VisCommandGeometrySetForceAuxEdgeVisible&);
|
||||
G4VisCommandGeometrySetForceAuxEdgeVisible& operator=
|
||||
(const G4VisCommandGeometrySetForceAuxEdgeVisible&);
|
||||
G4UIcommand* fpCommand;
|
||||
};
|
||||
|
||||
class G4VisCommandGeometrySetForceSolid:
|
||||
public G4VVisCommandGeometrySet {
|
||||
public:
|
||||
G4VisCommandGeometrySetForceSolid ();
|
||||
virtual ~G4VisCommandGeometrySetForceSolid ();
|
||||
G4String GetCurrentValue (G4UIcommand* command);
|
||||
void SetNewValue (G4UIcommand* command, G4String newValue);
|
||||
private:
|
||||
G4VisCommandGeometrySetForceSolid
|
||||
(const G4VisCommandGeometrySetForceSolid&);
|
||||
G4VisCommandGeometrySetForceSolid& operator=
|
||||
(const G4VisCommandGeometrySetForceSolid&);
|
||||
G4UIcommand* fpCommand;
|
||||
};
|
||||
|
||||
class G4VisCommandGeometrySetForceWireframe:
|
||||
public G4VVisCommandGeometrySet {
|
||||
public:
|
||||
G4VisCommandGeometrySetForceWireframe ();
|
||||
virtual ~G4VisCommandGeometrySetForceWireframe ();
|
||||
G4String GetCurrentValue (G4UIcommand* command);
|
||||
void SetNewValue (G4UIcommand* command, G4String newValue);
|
||||
private:
|
||||
G4VisCommandGeometrySetForceWireframe
|
||||
(const G4VisCommandGeometrySetForceWireframe&);
|
||||
G4VisCommandGeometrySetForceWireframe& operator=
|
||||
(const G4VisCommandGeometrySetForceWireframe&);
|
||||
G4UIcommand* fpCommand;
|
||||
};
|
||||
|
||||
class G4VisCommandGeometrySetLineStyle:
|
||||
public G4VVisCommandGeometrySet {
|
||||
public:
|
||||
G4VisCommandGeometrySetLineStyle ();
|
||||
virtual ~G4VisCommandGeometrySetLineStyle ();
|
||||
G4String GetCurrentValue (G4UIcommand* command);
|
||||
void SetNewValue (G4UIcommand* command, G4String newValue);
|
||||
private:
|
||||
G4VisCommandGeometrySetLineStyle
|
||||
(const G4VisCommandGeometrySetLineStyle&);
|
||||
G4VisCommandGeometrySetLineStyle& operator=
|
||||
(const G4VisCommandGeometrySetLineStyle&);
|
||||
G4UIcommand* fpCommand;
|
||||
};
|
||||
|
||||
class G4VisCommandGeometrySetLineWidth:
|
||||
public G4VVisCommandGeometrySet {
|
||||
public:
|
||||
G4VisCommandGeometrySetLineWidth ();
|
||||
virtual ~G4VisCommandGeometrySetLineWidth ();
|
||||
G4String GetCurrentValue (G4UIcommand* command);
|
||||
void SetNewValue (G4UIcommand* command, G4String newValue);
|
||||
private:
|
||||
G4VisCommandGeometrySetLineWidth
|
||||
(const G4VisCommandGeometrySetLineWidth&);
|
||||
G4VisCommandGeometrySetLineWidth& operator=
|
||||
(const G4VisCommandGeometrySetLineWidth&);
|
||||
G4UIcommand* fpCommand;
|
||||
};
|
||||
|
||||
class G4VisCommandGeometrySetVisibility: public G4VVisCommandGeometrySet {
|
||||
public:
|
||||
G4VisCommandGeometrySetVisibility ();
|
||||
virtual ~G4VisCommandGeometrySetVisibility ();
|
||||
G4String GetCurrentValue (G4UIcommand* command);
|
||||
void SetNewValue (G4UIcommand* command, G4String newValue);
|
||||
private:
|
||||
G4VisCommandGeometrySetVisibility (const G4VisCommandGeometrySetVisibility&);
|
||||
G4VisCommandGeometrySetVisibility& operator = (const G4VisCommandGeometrySetVisibility&);
|
||||
G4UIcommand* fpCommand;
|
||||
};
|
||||
|
||||
#endif
|
||||
@@ -1,26 +1,30 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4VisCommandsListManager.hh,v 1.1 2005/11/21 05:45:42 tinslay Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VisCommandsListManager.hh,v 1.3 2006/06/29 21:28:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
// Jane Tinslay, John Allison, Joseph Perl October 2005
|
||||
//
|
||||
@@ -160,4 +164,58 @@ void G4VisCommandListManagerSelect<Manager>::SetNewValue(G4UIcommand*, G4String
|
||||
fpManager->SetCurrent(name);
|
||||
}
|
||||
|
||||
// Mode command
|
||||
template <typename Manager>
|
||||
class G4VisCommandManagerMode : public G4UImessenger {
|
||||
|
||||
public: // With description
|
||||
|
||||
G4VisCommandManagerMode(Manager*, const G4String& placement);
|
||||
|
||||
virtual ~G4VisCommandManagerMode();
|
||||
|
||||
G4String GetCurrentValue(G4UIcommand*);
|
||||
void SetNewValue (G4UIcommand* command, G4String newValue);
|
||||
|
||||
private:
|
||||
|
||||
Manager* fpManager;
|
||||
G4String fPlacement;
|
||||
|
||||
G4UIcmdWithAString* fpCommand;
|
||||
|
||||
};
|
||||
template <typename Manager>
|
||||
G4VisCommandManagerMode<Manager>::G4VisCommandManagerMode(Manager* manager, const G4String& placement)
|
||||
:fpManager(manager)
|
||||
,fPlacement(placement)
|
||||
{
|
||||
G4String command = fPlacement+"/mode";
|
||||
|
||||
fpCommand = new G4UIcmdWithAString(command, this);
|
||||
fpCommand->SetGuidance("Set mode of operation");
|
||||
fpCommand->SetParameterName("mode", false);
|
||||
fpCommand->SetCandidates("soft hard");
|
||||
}
|
||||
|
||||
template <typename Manager>
|
||||
G4VisCommandManagerMode<Manager>::~G4VisCommandManagerMode()
|
||||
{
|
||||
delete fpCommand;
|
||||
}
|
||||
|
||||
template <typename Manager>
|
||||
G4String
|
||||
G4VisCommandManagerMode<Manager>::GetCurrentValue(G4UIcommand*)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
template <typename Manager>
|
||||
void G4VisCommandManagerMode<Manager>::SetNewValue(G4UIcommand*, G4String name)
|
||||
{
|
||||
assert (0 != fpManager);
|
||||
fpManager->SetMode(name);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommandsScene.hh,v 1.15 2005/03/09 23:48:15 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VisCommandsScene.hh,v 1.17 2006/06/29 21:28:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
|
||||
// /vis/scene commands - John Allison 9th August 1998
|
||||
|
||||
@@ -123,4 +126,17 @@ private:
|
||||
G4UIcmdWithAString* fpCommand;
|
||||
};
|
||||
|
||||
class G4VisCommandSceneTransientsAction: public G4VVisCommandScene {
|
||||
public:
|
||||
G4VisCommandSceneTransientsAction ();
|
||||
virtual ~G4VisCommandSceneTransientsAction ();
|
||||
G4String GetCurrentValue (G4UIcommand* command);
|
||||
void SetNewValue (G4UIcommand* command, G4String newValue);
|
||||
private:
|
||||
G4VisCommandSceneTransientsAction (const G4VisCommandSceneTransientsAction&);
|
||||
G4VisCommandSceneTransientsAction& operator =
|
||||
(const G4VisCommandSceneTransientsAction&);
|
||||
G4UIcmdWithAString* fpCommand;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommandsSceneAdd.hh,v 1.14 2005/04/10 21:04:39 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VisCommandsSceneAdd.hh,v 1.16 2006/06/29 21:28:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
|
||||
// /vis/scene commands - John Allison 9th August 1998
|
||||
|
||||
@@ -49,6 +52,26 @@ private:
|
||||
G4UIcommand* fpCommand;
|
||||
};
|
||||
|
||||
class G4VisCommandSceneAddEventID: public G4VVisCommandScene {
|
||||
public:
|
||||
G4VisCommandSceneAddEventID ();
|
||||
virtual ~G4VisCommandSceneAddEventID ();
|
||||
G4String GetCurrentValue (G4UIcommand* command);
|
||||
void SetNewValue (G4UIcommand* command, G4String newValue);
|
||||
private:
|
||||
G4VisCommandSceneAddEventID (const G4VisCommandSceneAddEventID&);
|
||||
G4VisCommandSceneAddEventID& operator = (const G4VisCommandSceneAddEventID&);
|
||||
struct EventID {
|
||||
EventID(G4VisManager* vm, G4int size, G4double x, G4double y):
|
||||
fpVisManager(vm), fSize(size), fX(x), fY(y) {}
|
||||
void operator()(G4VGraphicsScene&, const G4Transform3D&);
|
||||
G4VisManager* fpVisManager;
|
||||
G4int fSize;
|
||||
G4double fX, fY;
|
||||
};
|
||||
G4UIcommand* fpCommand;
|
||||
};
|
||||
|
||||
class G4VisCommandSceneAddGhosts: public G4VVisCommandScene {
|
||||
public:
|
||||
G4VisCommandSceneAddGhosts ();
|
||||
@@ -98,13 +121,12 @@ private:
|
||||
G4VisCommandSceneAddLogo& operator = (const G4VisCommandSceneAddLogo&);
|
||||
class G4Logo {
|
||||
public:
|
||||
G4Logo(G4double height, const G4VisAttributes&, G4VisManager*);
|
||||
G4Logo(G4double height, const G4VisAttributes&);
|
||||
~G4Logo();
|
||||
void operator()(const G4Transform3D&);
|
||||
void operator()(G4VGraphicsScene&, const G4Transform3D&);
|
||||
private:
|
||||
G4double fHeight;
|
||||
G4VisAttributes fVisAtts;
|
||||
G4VisManager* fpVisManager;
|
||||
G4Polyhedron *fpG, *fp4;
|
||||
};
|
||||
G4UIcommand* fpCommand;
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommandsSceneHandler.hh,v 1.7 2005/03/09 23:48:15 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VisCommandsSceneHandler.hh,v 1.8 2006/06/29 21:28:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
|
||||
// /vis/sceneHandler commands - John Allison 10th October 1998
|
||||
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommandsViewer.hh,v 1.19 2005/11/22 17:00:15 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VisCommandsViewer.hh,v 1.20 2006/06/29 21:28:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
|
||||
// /vis/viewer commands - John Allison 25th October 1998
|
||||
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommandsViewerSet.hh,v 1.15 2005/10/13 18:10:29 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VisCommandsViewerSet.hh,v 1.17 2006/06/29 21:28:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
|
||||
// /vis/viewer/set commands - John Allison 16th May 2000
|
||||
|
||||
@@ -51,6 +54,7 @@ private:
|
||||
G4UIcmdWithAString* fpCommandAll;
|
||||
G4UIcmdWithABool* fpCommandAutoRefresh;
|
||||
G4UIcmdWithABool* fpCommandAuxEdge;
|
||||
G4UIcommand* fpCommandBackground;
|
||||
G4UIcommand* fpCommandCulling;
|
||||
G4UIcmdWithABool* fpCommandEdge;
|
||||
G4UIcmdWithADouble* fpCommandGlobalMarkerScale;
|
||||
@@ -70,7 +74,6 @@ private:
|
||||
G4UIcommand* fpCommandViewpointThetaPhi;
|
||||
G4UIcommand* fpCommandViewpointVector;
|
||||
G4ThreeVector fViewpointVector;
|
||||
G4UIcommand* fpCommandBackground;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisExecutive.hh,v 1.5 2005/11/22 16:57:16 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VisExecutive.hh,v 1.6 2006/06/29 21:28:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 2nd February 2005 (based on MyVisManager, 24th January 1998).
|
||||
|
||||
@@ -1,32 +1,38 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisExecutive.icc,v 1.7 2005/11/23 05:20:02 tinslay Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VisExecutive.icc,v 1.13 2006/06/29 21:28:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 24th January 1998.
|
||||
|
||||
#ifndef G4VISEXECUTIVE_ICC
|
||||
#define G4VISEXECUTIVE_ICC
|
||||
|
||||
// Supported drivers...
|
||||
|
||||
// Not needing external packages or libraries...
|
||||
@@ -36,6 +42,7 @@
|
||||
#include "G4HepRep.hh"
|
||||
#include "G4HepRepFile.hh"
|
||||
#include "G4RayTracer.hh"
|
||||
#include "G4TrajectoryFilterFactories.hh"
|
||||
#include "G4TrajectoryModelFactories.hh"
|
||||
#include "G4VRML1File.hh"
|
||||
#include "G4VRML2File.hh"
|
||||
@@ -135,6 +142,16 @@ void G4VisExecutive::RegisterGraphicsSystems () {
|
||||
void
|
||||
G4VisExecutive::RegisterModelFactories()
|
||||
{
|
||||
// Trajectory draw models
|
||||
RegisterModelFactory(new G4TrajectoryGenericDrawerFactory());
|
||||
RegisterModelFactory(new G4TrajectoryDrawByChargeFactory());
|
||||
RegisterModelFactory(new G4TrajectoryDrawByParticleIDFactory());
|
||||
RegisterModelFactory(new G4TrajectoryDrawByOriginVolumeFactory());
|
||||
|
||||
// Trajectory filter models
|
||||
RegisterModelFactory(new G4TrajectoryChargeFilterFactory());
|
||||
RegisterModelFactory(new G4TrajectoryParticleFilterFactory());
|
||||
RegisterModelFactory(new G4TrajectoryOriginVolumeFilterFactory());
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisFeaturesOfDAWNFILE.hh,v 1.4 2001/07/11 10:09:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VisFeaturesOfDAWNFILE.hh,v 1.5 2006/06/29 21:28:54 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
#ifndef G4VISFEATURESOFDAWNFILE_HH
|
||||
#define G4VISFEATURESOFDAWNFILE_HH
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisFeaturesOfFukuiRenderer.hh,v 1.4 2001/07/11 10:09:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VisFeaturesOfFukuiRenderer.hh,v 1.5 2006/06/29 21:28:56 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisFeaturesOfOpenGL.hh,v 1.4 2001/07/11 10:09:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VisFeaturesOfOpenGL.hh,v 1.5 2006/06/29 21:28:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisFeaturesOfOpenInventor.hh,v 1.4 2001/07/11 10:09:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VisFeaturesOfOpenInventor.hh,v 1.5 2006/06/29 21:29:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -0,0 +1,246 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4VisFilterManager.hh,v 1.4 2006/06/29 21:29:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
// Filter manager. Manages filter models, factories, messengers,
|
||||
// command placement, filter mode etc
|
||||
//
|
||||
// Jane Tinslay, March 2006
|
||||
//
|
||||
#ifndef G4VISFILTERMANAGER_HH
|
||||
#define G4VISFILTERMANAGER_HH
|
||||
|
||||
#include "G4String.hh"
|
||||
#include "G4UImessenger.hh"
|
||||
#include "G4VFilter.hh"
|
||||
#include "G4VModelFactory.hh"
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
|
||||
namespace FilterMode {
|
||||
enum Mode {Soft, Hard};
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
class G4VisFilterManager {
|
||||
|
||||
public:
|
||||
|
||||
// Construct with command placement
|
||||
G4VisFilterManager(const G4String&);
|
||||
|
||||
virtual ~G4VisFilterManager();
|
||||
|
||||
// Useful typedef's
|
||||
typedef G4VFilter<T> Filter;
|
||||
typedef G4VModelFactory<Filter> Factory;
|
||||
|
||||
// Registration methods
|
||||
void Register(Filter*);
|
||||
void Register(Factory*);
|
||||
|
||||
// Do filtering
|
||||
bool Accept(const T&);
|
||||
|
||||
// Command placement
|
||||
G4String Placement() const;
|
||||
|
||||
// Filter mode operations
|
||||
void SetMode(const FilterMode::Mode&);
|
||||
void SetMode(const G4String&);
|
||||
FilterMode::Mode GetMode() const;
|
||||
|
||||
// Print configuration
|
||||
void Print(std::ostream& ostr, const G4String& name="") const;
|
||||
|
||||
// Accessors
|
||||
const std::vector<Filter*>& FilterList() const;
|
||||
const std::vector<Factory*>& FactoryList() const;
|
||||
|
||||
private:
|
||||
|
||||
// Data members
|
||||
G4String fPlacement; // Placement
|
||||
FilterMode::Mode fMode;
|
||||
std::vector<Factory*> fFactoryList;
|
||||
std::vector<Filter*> fFilterList;
|
||||
std::vector<G4UImessenger*> fMessengerList;
|
||||
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
G4VisFilterManager<T>::G4VisFilterManager(const G4String& placement)
|
||||
:fPlacement(placement)
|
||||
{
|
||||
fMode = FilterMode::Hard;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
G4VisFilterManager<T>::~G4VisFilterManager()
|
||||
{
|
||||
// Cleanup
|
||||
std::vector<G4UImessenger*>::iterator iterMsgr = fMessengerList.begin();
|
||||
|
||||
while (iterMsgr != fMessengerList.end()) {
|
||||
delete *iterMsgr;
|
||||
iterMsgr++;
|
||||
}
|
||||
|
||||
typename std::vector<Factory*>::iterator iterFactory = fFactoryList.begin();
|
||||
|
||||
while (iterFactory != fFactoryList.end()) {
|
||||
delete *iterFactory;
|
||||
iterFactory++;
|
||||
}
|
||||
|
||||
typename std::vector<Filter*>::iterator iterFilter = fFilterList.begin();
|
||||
|
||||
while (iterFilter != fFilterList.end()) {
|
||||
delete *iterFilter;
|
||||
iterFilter++;
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void
|
||||
G4VisFilterManager<T>::Register(Filter* filter)
|
||||
{
|
||||
fFilterList.push_back(filter);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void
|
||||
G4VisFilterManager<T>::Register(Factory* factory)
|
||||
{
|
||||
fFactoryList.push_back(factory);
|
||||
|
||||
fMessengerList.push_back(new G4VisCommandModelCreate<Factory>(factory, fPlacement));
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
bool
|
||||
G4VisFilterManager<T>::Accept(const T& obj)
|
||||
{
|
||||
typename std::vector<Filter*>::const_iterator iter = fFilterList.begin();
|
||||
bool passed(true);
|
||||
|
||||
while (passed && (iter != fFilterList.end())) {
|
||||
passed = (*iter)->Accept(obj);
|
||||
iter++;
|
||||
}
|
||||
|
||||
return passed;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
G4String
|
||||
G4VisFilterManager<T>::Placement() const
|
||||
{
|
||||
return fPlacement;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void
|
||||
G4VisFilterManager<T>::SetMode(const G4String& mode)
|
||||
{
|
||||
bool result(false);
|
||||
|
||||
G4String myMode(mode);
|
||||
myMode.toLower();
|
||||
|
||||
if (myMode == "soft") {result = true; SetMode(FilterMode::Soft);}
|
||||
else if (myMode == "hard") {result = true; SetMode(FilterMode::Hard);}
|
||||
|
||||
if (!result) {
|
||||
std::ostringstream o;
|
||||
o << "Invalid Filter mode."<<mode;
|
||||
G4Exception
|
||||
("G4VisFilterManager::SetMode(const G4String& mode)", "InvalidMode", JustWarning, o.str().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void
|
||||
G4VisFilterManager<T>::SetMode(const FilterMode::Mode& mode)
|
||||
{
|
||||
fMode = mode;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
FilterMode::Mode
|
||||
G4VisFilterManager<T>::GetMode() const
|
||||
{
|
||||
return fMode;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void
|
||||
G4VisFilterManager<T>::Print(std::ostream& ostr, const G4String& name) const
|
||||
{
|
||||
ostr<<"Registered filter factories:"<<std::endl;
|
||||
typename std::vector<Factory*>::const_iterator iterFactory = fFactoryList.begin();
|
||||
|
||||
while (iterFactory != fFactoryList.end()) {
|
||||
(*iterFactory)->Print(ostr);
|
||||
iterFactory++;
|
||||
}
|
||||
|
||||
if (0 == fFactoryList.size()) ostr<<" None"<<std::endl;
|
||||
|
||||
ostr<<std::endl;
|
||||
ostr<<"Registered filters:"<<std::endl;
|
||||
|
||||
typename std::vector<Filter*>::const_iterator iterFilter = fFilterList.begin();
|
||||
|
||||
while (iterFilter != fFilterList.end()) {
|
||||
if (!name.isNull()) {
|
||||
if ((*iterFilter)->Name() == name) (*iterFilter)->PrintAll(ostr);
|
||||
}
|
||||
else {
|
||||
(*iterFilter)->PrintAll(ostr);
|
||||
}
|
||||
iterFilter++;
|
||||
}
|
||||
|
||||
if (0 == fFilterList.size()) ostr<<" None"<<std::endl;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
const std::vector< G4VFilter<T>* >&
|
||||
G4VisFilterManager<T>::FilterList() const
|
||||
{
|
||||
return fFilterList;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
const std::vector< G4VModelFactory< G4VFilter<T> >* >&
|
||||
G4VisFilterManager<T>::FactoryList() const
|
||||
{
|
||||
return fFactoryList;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,26 +1,30 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4VisListManager.hh,v 1.3 2005/11/23 20:25:22 tinslay Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VisListManager.hh,v 1.8 2006/06/29 21:29:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
// Jane Tinslay, John Allison, Joseph Perl October 2005
|
||||
//
|
||||
@@ -46,14 +50,18 @@ public: // With description
|
||||
|
||||
virtual ~G4VisListManager();
|
||||
|
||||
void Register(T* ptr);
|
||||
// Register ptr. Manager assumes ownership and
|
||||
// ptr becomes current
|
||||
void Register(T* ptr);
|
||||
|
||||
void SetCurrent(const G4String& name);
|
||||
|
||||
// Accessors
|
||||
const T* Current() const {return fpCurrent;}
|
||||
|
||||
void Print(std::ostream& ostr, const G4String& name) const;
|
||||
const std::map<G4String, T*>& Map() const;
|
||||
|
||||
// Print configuration
|
||||
void Print(std::ostream& ostr, const G4String& name="") const;
|
||||
|
||||
private:
|
||||
|
||||
@@ -120,7 +128,12 @@ template <typename T>
|
||||
void
|
||||
G4VisListManager<T>::Print(std::ostream& ostr, const G4String& name) const
|
||||
{
|
||||
ostr<<"Current: "<<fpCurrent->Name()<<std::endl;
|
||||
if (0 == fMap.size()) {
|
||||
G4cout<<" None"<<std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
ostr<<" Current: "<<fpCurrent->Name()<<std::endl;
|
||||
|
||||
if (!name.isNull()) {
|
||||
// Print out specified object
|
||||
@@ -137,10 +150,17 @@ G4VisListManager<T>::Print(std::ostream& ostr, const G4String& name) const
|
||||
typename std::map<G4String, T*>::const_iterator iter = fMap.begin();
|
||||
while (iter != fMap.end()) {
|
||||
iter->second->Print(ostr);
|
||||
ostr<<G4endl;
|
||||
ostr<<std::endl;
|
||||
iter++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
const std::map<G4String, T*>&
|
||||
G4VisListManager<T>::Map() const
|
||||
{
|
||||
return fMap;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisManager.hh,v 1.45 2005/11/29 22:23:01 tinslay Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VisManager.hh,v 1.59 2006/06/29 21:29:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -98,13 +101,15 @@ class G4UImessenger;
|
||||
class G4VisStateDependent;
|
||||
class G4VTrajectoryModel;
|
||||
class G4VUserVisAction;
|
||||
template <typename T> class G4VisListManager;
|
||||
template <typename T> class G4VFilter;
|
||||
template <typename T> class G4VisFilterManager;
|
||||
template <typename T> class G4VisModelManager;
|
||||
template <typename T> class G4VModelFactory;
|
||||
|
||||
namespace {
|
||||
// Typedef's for trajectory drawing
|
||||
typedef G4VModelFactory<G4VTrajectoryModel> G4TrajectoryModelFactory;
|
||||
typedef G4VisListManager<G4VTrajectoryModel> G4TrajectoryModelManager;
|
||||
// Useful typedef's
|
||||
typedef G4VModelFactory<G4VTrajectoryModel> G4TrajDrawModelFactory;
|
||||
typedef G4VModelFactory< G4VFilter<G4VTrajectory> > G4TrajFilterFactory;
|
||||
}
|
||||
|
||||
class G4VisManager: public G4VVisManager {
|
||||
@@ -116,9 +121,14 @@ class G4VisManager: public G4VVisManager {
|
||||
// G4VVisManager::GetConcreteInstance (), always testing for
|
||||
// non-zero.
|
||||
|
||||
// Odd friends that need access to various methods of the G4VisManager...
|
||||
// Odd friends that need access to the G4VisManager...
|
||||
friend class G4RTSteppingAction;
|
||||
friend class G4RayTrajectory;
|
||||
friend class G4RayTracerSceneHandler;
|
||||
friend class G4RTMessenger;
|
||||
friend class G4OpenGLXmViewerMessenger;
|
||||
friend class G4XXXSceneHandler;
|
||||
friend class G4HepRepFileSceneHandler;
|
||||
|
||||
// Management friends...
|
||||
friend class G4VSceneHandler;
|
||||
@@ -132,6 +142,8 @@ class G4VisManager: public G4VVisManager {
|
||||
|
||||
friend class G4VisStateDependent;
|
||||
|
||||
friend class G4VisCommandList;
|
||||
|
||||
public: // With description
|
||||
|
||||
enum Verbosity {
|
||||
@@ -179,12 +191,18 @@ public: // With description
|
||||
// a sub-class implementation of the protected virtual function,
|
||||
// RegisterGraphicsSystems. See, e.g., G4VisExecutive.icc.
|
||||
|
||||
void RegisterModelFactory(G4TrajectoryModelFactory* factory);
|
||||
// Register trajectory model factory. Assumes ownership of factory.
|
||||
void RegisterModelFactory(G4TrajDrawModelFactory* factory);
|
||||
// Register trajectory draw model factory. Assumes ownership of factory.
|
||||
|
||||
void RegisterModel(G4VTrajectoryModel* model);
|
||||
// Register trajectory model. Assumes ownership of model.
|
||||
|
||||
void RegisterModelFactory(G4TrajFilterFactory* factory);
|
||||
// Register trajectory filter model factory. Assumes ownership of factory.
|
||||
|
||||
void RegisterModel(G4VFilter<G4VTrajectory>* filter);
|
||||
// Register trajectory filter model. Assumes ownership of model.
|
||||
|
||||
void SelectTrajectoryModel(const G4String& model);
|
||||
// Set default trajectory model. Useful for use in compiled code
|
||||
|
||||
@@ -220,6 +238,8 @@ public: // With description
|
||||
void Draw (const G4Text&,
|
||||
const G4Transform3D& objectTransformation = G4Transform3D());
|
||||
|
||||
void Draw2D (const G4Text&);
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Now functions that implement the pure virtual functions of
|
||||
// G4VVisManager for drawing a GEANT4 object. Note that the
|
||||
@@ -253,6 +273,8 @@ public: // With description
|
||||
void DispatchToModel(const G4VTrajectory&, G4int i_mode);
|
||||
// Draw the trajectory.
|
||||
|
||||
G4bool FilterTrajectory(const G4VTrajectory&);
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// Administration routines.
|
||||
|
||||
@@ -284,6 +306,8 @@ public: // With description
|
||||
void Disable();
|
||||
// Global enable/disable functions.
|
||||
|
||||
const G4VTrajectoryModel* CurrentTrajDrawModel() const;
|
||||
|
||||
G4VUserVisAction* GetUserAction () const;
|
||||
G4VisExtent GetUserActionExtent () const;
|
||||
G4VGraphicsSystem* GetCurrentGraphicsSystem () const;
|
||||
@@ -307,6 +331,12 @@ public: // With description
|
||||
// it contains more information. (The size information in
|
||||
// GetXGeometryString and GetWindowSizeHint is guaranteed to be
|
||||
// identical.)
|
||||
G4int GetEventCount () const;
|
||||
const G4String& GetBeginOfLastRunRandomStatus () const;
|
||||
const G4String& GetBeginOfLastEventRandomStatus () const;
|
||||
G4int GetLastRunID () const;
|
||||
G4bool GetTransientsDrawnThisRun () const;
|
||||
G4bool GetTransientsDrawnThisEvent () const;
|
||||
|
||||
void SetUserAction (G4VUserVisAction* pVisAction,
|
||||
const G4VisExtent& = G4VisExtent::NullExtent);
|
||||
@@ -322,6 +352,8 @@ public: // With description
|
||||
void SetVerboseLevel (Verbosity);
|
||||
void SetWindowSizeHint (G4int xHint, G4int yHint);
|
||||
void SetXGeometryString (const G4String&);
|
||||
void SetReprocessing (G4bool);
|
||||
void SetReprocessingLastEvent (G4bool);
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
@@ -359,14 +391,13 @@ protected:
|
||||
|
||||
void RegisterMessengers (); // Command messengers.
|
||||
void PrintAvailableGraphicsSystems () const;
|
||||
void PrintAvailableModels () const;
|
||||
void PrintInvalidPointers () const;
|
||||
G4bool IsValidView ();
|
||||
// True if view is valid. Prints messages and sanitises various data.
|
||||
void ClearTransientStoreIfMarked();
|
||||
// Clears transient store of current scene handler if it is marked
|
||||
// for clearing. Assumes view is valid.
|
||||
void CheckModel ();
|
||||
// If a scene handler has no model, provides a null model.
|
||||
|
||||
static G4VisManager* fpInstance; // Pointer to single instance.
|
||||
G4bool fInitialised;
|
||||
@@ -390,17 +421,25 @@ protected:
|
||||
G4VisStateDependent* fpStateDependent; // Friend state dependent class.
|
||||
G4int fWindowSizeHintX, fWindowSizeHintY; // For viewer...
|
||||
G4String fXGeometryString; // ...construction.
|
||||
G4NullModel fVisManagerNullModel; // As a default.
|
||||
G4TrajectoriesModel dummyTrajectoriesModel; // For passing drawing mode.
|
||||
G4ModelingParameters fVisManagerModelingParameters; // Useful memory.
|
||||
G4int fEventCount;
|
||||
G4String fBeginOfLastRunRandomStatus;
|
||||
G4String fBeginOfLastEventRandomStatus;
|
||||
G4bool fReprocessing;
|
||||
G4bool fReprocessingLastEvent;
|
||||
G4int fLastRunID;
|
||||
G4int fLastEventID;
|
||||
G4bool fTransientsDrawnThisRun;
|
||||
G4bool fTransientsDrawnThisEvent;
|
||||
|
||||
private:
|
||||
|
||||
// Trajectory model related data members
|
||||
G4String fTrajectoryPlacement; // Placement for trajectory model commands
|
||||
G4TrajectoryModelManager* fpTrajectoryModelMgr; // Trajectory model manager
|
||||
std::vector<G4TrajectoryModelFactory*> fTrajectoryModelFactoryList; // Trajectory model factories
|
||||
// Trajectory draw model manager
|
||||
G4VisModelManager<G4VTrajectoryModel>* fpTrajDrawModelMgr;
|
||||
|
||||
// Trajectory filter model manager
|
||||
G4VisFilterManager<G4VTrajectory>* fpTrajFilterMgr;
|
||||
|
||||
};
|
||||
|
||||
#include "G4VisManager.icc"
|
||||
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisManager.icc,v 1.11 2005/11/21 05:45:42 tinslay Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VisManager.icc,v 1.17 2006/06/29 21:29:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
//
|
||||
// GEANT4 Visualization Manager - John Allison 02/Jan/1996.
|
||||
@@ -78,12 +81,32 @@ inline const G4String& G4VisManager::GetXGeometryString () const {
|
||||
return fXGeometryString;
|
||||
}
|
||||
|
||||
inline void G4VisManager::SetUserActionExtent (const G4VisExtent& extent) {
|
||||
fUserVisActionExtent = extent;
|
||||
inline G4int G4VisManager::GetEventCount() const {
|
||||
return fEventCount;
|
||||
}
|
||||
|
||||
inline void G4VisManager::SetCurrentScene (G4Scene* pScene) {
|
||||
fpScene = pScene;
|
||||
inline const G4String& G4VisManager::GetBeginOfLastRunRandomStatus() const {
|
||||
return fBeginOfLastRunRandomStatus;
|
||||
}
|
||||
|
||||
inline const G4String& G4VisManager::GetBeginOfLastEventRandomStatus() const {
|
||||
return fBeginOfLastEventRandomStatus;
|
||||
}
|
||||
|
||||
inline G4int G4VisManager::GetLastRunID() const {
|
||||
return fLastRunID;
|
||||
}
|
||||
|
||||
inline G4bool G4VisManager::GetTransientsDrawnThisEvent() const {
|
||||
return fTransientsDrawnThisEvent;
|
||||
}
|
||||
|
||||
inline G4bool G4VisManager::GetTransientsDrawnThisRun() const {
|
||||
return fTransientsDrawnThisRun;
|
||||
}
|
||||
|
||||
inline void G4VisManager::SetUserActionExtent (const G4VisExtent& extent) {
|
||||
fUserVisActionExtent = extent;
|
||||
}
|
||||
|
||||
inline G4SceneList& G4VisManager::SetSceneList () {
|
||||
@@ -106,6 +129,14 @@ inline void G4VisManager::SetXGeometryString (const G4String& geomString) {
|
||||
fXGeometryString = geomString;
|
||||
}
|
||||
|
||||
inline void G4VisManager::SetReprocessing (G4bool reprocessing) {
|
||||
fReprocessing = reprocessing;
|
||||
}
|
||||
|
||||
inline void G4VisManager::SetReprocessingLastEvent (G4bool reprocessing) {
|
||||
fReprocessingLastEvent = reprocessing;
|
||||
}
|
||||
|
||||
inline void G4VisManager::RegisterMessenger(G4UImessenger* msgr)
|
||||
{
|
||||
fMessengerList.push_back(msgr);
|
||||
|
||||
@@ -0,0 +1,184 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4VisModelManager.hh,v 1.4 2006/06/29 21:29:10 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
// Generic model manager. Manages models, associated
|
||||
// factories, messengers, command placement etc
|
||||
//
|
||||
// Jane Tinslay, March 2006
|
||||
//
|
||||
#ifndef G4VISMODELMANAGER_HH
|
||||
#define G4VISMODELMANAGER_HH
|
||||
|
||||
#include "G4UImessenger.hh"
|
||||
#include "G4VisCommandModelCreate.hh"
|
||||
#include "G4VisListManager.hh"
|
||||
#include "G4VModelFactory.hh"
|
||||
#include <vector>
|
||||
|
||||
template <typename Model>
|
||||
class G4VisModelManager {
|
||||
|
||||
public: // With description
|
||||
|
||||
// Useful typedef's
|
||||
typedef G4VisListManager<Model> List;
|
||||
typedef G4VModelFactory<Model> Factory;
|
||||
|
||||
G4VisModelManager(const G4String&);
|
||||
virtual ~G4VisModelManager();
|
||||
|
||||
// Registration methods
|
||||
void Register(Model*);
|
||||
void Register(Factory*);
|
||||
|
||||
// Change/Retrieve "Current" object
|
||||
void SetCurrent(const G4String&);
|
||||
const Model* Current() const;
|
||||
|
||||
// Command placement
|
||||
G4String Placement() const;
|
||||
|
||||
// Print factory and model data
|
||||
void Print(std::ostream& ostr, const G4String& name="") const;
|
||||
|
||||
// Accessors
|
||||
const List* ListManager() const;
|
||||
const std::vector<Factory*>& FactoryList() const;
|
||||
|
||||
private:
|
||||
|
||||
// Data members
|
||||
G4String fPlacement;
|
||||
List* fpModelList;
|
||||
std::vector<Factory*> fFactoryList;
|
||||
std::vector<G4UImessenger*> fMessengerList;
|
||||
|
||||
};
|
||||
|
||||
template <typename Model>
|
||||
G4VisModelManager<Model>::G4VisModelManager(const G4String& placement)
|
||||
:fPlacement(placement)
|
||||
,fpModelList(new List)
|
||||
{}
|
||||
|
||||
template <typename Model>
|
||||
G4VisModelManager<Model>::~G4VisModelManager()
|
||||
{
|
||||
// Cleanup
|
||||
std::vector<G4UImessenger*>::iterator iterMsgr = fMessengerList.begin();
|
||||
|
||||
while (iterMsgr != fMessengerList.end()) {
|
||||
delete *iterMsgr;
|
||||
iterMsgr++;
|
||||
}
|
||||
|
||||
typename std::vector<Factory*>::iterator iterFactory = fFactoryList.begin();
|
||||
|
||||
while (iterFactory != fFactoryList.end()) {
|
||||
delete *iterFactory;
|
||||
iterFactory++;
|
||||
}
|
||||
|
||||
delete fpModelList;
|
||||
}
|
||||
|
||||
template <typename Model>
|
||||
void
|
||||
G4VisModelManager<Model>::Register(Model* model)
|
||||
{
|
||||
fpModelList->Register(model);
|
||||
}
|
||||
|
||||
template <typename Model>
|
||||
void
|
||||
G4VisModelManager<Model>::Register(Factory* factory)
|
||||
{
|
||||
// Assume ownership
|
||||
fFactoryList.push_back(factory);
|
||||
|
||||
// Generate "create" command for this factory
|
||||
fMessengerList.push_back(new G4VisCommandModelCreate<Factory>(factory, fPlacement));
|
||||
}
|
||||
|
||||
template <typename Model>
|
||||
void
|
||||
G4VisModelManager<Model>::SetCurrent(const G4String& model)
|
||||
{
|
||||
fpModelList->SetCurrent(model);
|
||||
}
|
||||
|
||||
template <typename Model>
|
||||
const Model*
|
||||
G4VisModelManager<Model>::Current() const
|
||||
{
|
||||
return fpModelList->Current();
|
||||
}
|
||||
|
||||
template <typename Model>
|
||||
G4String
|
||||
G4VisModelManager<Model>::Placement() const
|
||||
{
|
||||
return fPlacement;
|
||||
}
|
||||
|
||||
template <typename Model>
|
||||
void
|
||||
G4VisModelManager<Model>::Print(std::ostream& ostr, const G4String& name) const
|
||||
{
|
||||
ostr<<"Registered model factories:"<<std::endl;
|
||||
|
||||
typename std::vector<Factory*>::const_iterator iter = fFactoryList.begin();
|
||||
|
||||
while (iter != fFactoryList.end()) {
|
||||
(*iter)->Print(ostr);
|
||||
iter++;
|
||||
}
|
||||
|
||||
if (0 == fFactoryList.size()) ostr<<" None"<<std::endl;
|
||||
|
||||
ostr<<std::endl;
|
||||
ostr<<"Registered models: "<<std::endl;
|
||||
|
||||
fpModelList->Print(ostr, name);
|
||||
}
|
||||
|
||||
template <typename Model>
|
||||
const G4VisListManager<Model>*
|
||||
G4VisModelManager<Model>::ListManager() const
|
||||
{
|
||||
return fpModelList;
|
||||
}
|
||||
|
||||
template <typename Model>
|
||||
const std::vector<G4VModelFactory<Model>*>&
|
||||
G4VisModelManager<Model>::FactoryList() const
|
||||
{
|
||||
return fFactoryList;
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -1,28 +1,31 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * DISCLAIMER *
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The following disclaimer summarizes all the specific disclaimers *
|
||||
// * of contributors to this software. The specific disclaimers,which *
|
||||
// * govern, are listed with their locations in: *
|
||||
// * http://cern.ch/geant4/license *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the intellectual property of the *
|
||||
// * GEANT4 collaboration. *
|
||||
// * By copying, distributing or modifying the Program (or any work *
|
||||
// * based on the Program) you indicate your acceptance of this *
|
||||
// * statement, and all its terms. *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisStateDependent.hh,v 1.4 2001/07/11 10:09:17 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-00 $
|
||||
// $Id: G4VisStateDependent.hh,v 1.5 2006/06/29 21:29:12 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-08-01 $
|
||||
//
|
||||
// A "state dependent" service class for G4VisManager.
|
||||
// John Allison 29th November 1999
|
||||
|
||||
Reference in New Issue
Block a user