Import Geant4 9.2.0 source tree
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4GraphicsSystemList.cc,v 1.4 2006/06/29 21:29:14 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
|
||||
#include "G4GraphicsSystemList.hh"
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4Scene.cc,v 1.23 2006/11/26 15:51:12 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Scene data John Allison 19th July 1996.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SceneHandlerList.cc,v 1.4 2006/06/29 21:29:18 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
|
||||
#include "G4SceneHandlerList.hh"
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4SceneList.cc,v 1.6 2006/06/29 21:29:20 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
|
||||
#include "G4SceneList.hh"
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VGraphicsSystem.cc,v 1.11 2006/06/29 21:29:22 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// John Allison 27th March 1996
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VSceneHandler.cc,v 1.82 2007/05/16 15:47:44 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4VSceneHandler.cc,v 1.83 2008/01/04 22:03:46 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// John Allison 19th July 1996
|
||||
@@ -158,14 +158,13 @@ void G4VSceneHandler::EndPrimitives () {
|
||||
}
|
||||
}
|
||||
|
||||
void G4VSceneHandler::BeginPrimitives2D () {
|
||||
void G4VSceneHandler::BeginPrimitives2D
|
||||
(const G4Transform3D& objectTransformation) {
|
||||
fNestingDepth++;
|
||||
if (fNestingDepth > 1)
|
||||
G4Exception("G4VSceneHandler::BeginPrimitives2D: Nesting detected."
|
||||
"\n It is illegal to nest Begin/EndPrimitives.");
|
||||
// Not actually required for 2D operations but some drivers do an
|
||||
// initial transformation...
|
||||
fpObjectTransformation = &fIdentityTransformation;
|
||||
fpObjectTransformation = &objectTransformation;
|
||||
}
|
||||
|
||||
void G4VSceneHandler::EndPrimitives2D () {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VViewer.cc,v 1.24 2007/01/05 16:25:15 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// John Allison 27th March 1996
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VVisCommand.cc,v 1.18 2006/06/29 21:29:28 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
|
||||
// Base class for visualization commands - John Allison 9th August 1998
|
||||
// It is really a messenger - we have one command per messenger.
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ViewParameters.cc,v 1.29 2007/04/03 13:33:16 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4ViewParameters.cc,v 1.31 2008/04/04 13:48:53 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// John Allison 19th July 1996
|
||||
@@ -232,9 +232,13 @@ void G4ViewParameters::SetPan (G4double right, G4double up) {
|
||||
}
|
||||
|
||||
void G4ViewParameters::IncrementPan (G4double right, G4double up) {
|
||||
IncrementPan (right,up, 0);
|
||||
}
|
||||
|
||||
void G4ViewParameters::IncrementPan (G4double right, G4double up, G4double distance) {
|
||||
G4Vector3D unitRight = (fUpVector.cross (fViewpointDirection)).unit();
|
||||
G4Vector3D unitUp = (fViewpointDirection.cross (unitRight)).unit();
|
||||
fCurrentTargetPoint += right * unitRight + up * unitUp;
|
||||
fCurrentTargetPoint += right * unitRight + up * unitUp + distance * fViewpointDirection;
|
||||
}
|
||||
|
||||
void G4ViewParameters::PrintDifferences (const G4ViewParameters& v) const {
|
||||
@@ -508,8 +512,8 @@ G4bool G4ViewParameters::operator != (const G4ViewParameters& v) const {
|
||||
}
|
||||
|
||||
if (IsExplode() &&
|
||||
(fExplodeFactor != v.fExplodeFactor) ||
|
||||
(fExplodeCentre != v.fExplodeCentre)) return true;
|
||||
((fExplodeFactor != v.fExplodeFactor) ||
|
||||
(fExplodeCentre != v.fExplodeCentre))) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4ViewerList.cc,v 1.4 2006/06/29 21:29:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
|
||||
#include "G4ViewerList.hh"
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommands.cc,v 1.22 2007/03/27 15:47:32 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4VisCommands.cc,v 1.23 2008/07/27 10:46:23 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
|
||||
// /vis/ top level commands - John Allison 5th February 2001
|
||||
|
||||
@@ -178,6 +178,15 @@ G4String G4VisCommandReviewKeptEvents::GetCurrentValue (G4UIcommand*)
|
||||
|
||||
void G4VisCommandReviewKeptEvents::SetNewValue (G4UIcommand*, G4String newValue)
|
||||
{
|
||||
static bool reviewing = false;
|
||||
if (reviewing) {
|
||||
G4cout <<
|
||||
"\"/vis/reviewKeptEvents\" not allowed within an already started review."
|
||||
"\n No action taken."
|
||||
<< G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
G4String& macroFileName = newValue;
|
||||
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
|
||||
|
||||
@@ -222,6 +231,7 @@ void G4VisCommandReviewKeptEvents::SetNewValue (G4UIcommand*, G4String newValue)
|
||||
UImanager->SetVerboseLevel(newVerbose);
|
||||
|
||||
// Event by event refreshing...
|
||||
reviewing = true;
|
||||
G4bool currentRefreshAtEndOfEvent = pScene->GetRefreshAtEndOfEvent();
|
||||
pScene->SetRefreshAtEndOfEvent(true);
|
||||
if (macroFileName.empty()) {
|
||||
@@ -285,6 +295,7 @@ void G4VisCommandReviewKeptEvents::SetNewValue (G4UIcommand*, G4String newValue)
|
||||
}
|
||||
}
|
||||
pScene->SetRefreshAtEndOfEvent(currentRefreshAtEndOfEvent);
|
||||
reviewing = false;
|
||||
|
||||
UImanager->SetVerboseLevel(keepVerbose);
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommandsCompound.cc,v 1.39 2007/11/16 20:29:04 perl Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
|
||||
// Compound /vis/ commands - John Allison 15th May 2000
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommandsGeometry.cc,v 1.4 2007/01/05 16:29:38 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
|
||||
// /vis/geometry commands - John Allison 31st January 2006
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommandsGeometrySet.cc,v 1.7 2007/01/05 16:24:19 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
|
||||
// /vis/geometry commands - John Allison 31st January 2006
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommandsScene.cc,v 1.67 2007/11/10 15:03:56 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4VisCommandsScene.cc,v 1.68 2008/04/28 16:12:38 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
|
||||
// /vis/scene commands - John Allison 9th August 1998
|
||||
|
||||
@@ -243,7 +243,10 @@ void G4VisCommandSceneEndOfEventAction::SetNewValue (G4UIcommand*,
|
||||
else G4cout << "up to " << maxNumberOfKeptEvents;
|
||||
G4cout << " events.";
|
||||
if (maxNumberOfKeptEvents > 1 || maxNumberOfKeptEvents < 0)
|
||||
G4cout << "\n This may use a lot of memory.";
|
||||
G4cout <<
|
||||
"\n This may use a lot of memory."
|
||||
"\n It may be changed with, e.g., "
|
||||
"\"/vis/scene/endOfEventAction accumulate 10\".";
|
||||
}
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommandsSceneAdd.cc,v 1.73 2007/11/16 20:29:04 perl Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// /vis/scene commands - John Allison 9th August 1998
|
||||
|
||||
#include "G4VisCommandsSceneAdd.hh"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommandsSceneHandler.cc,v 1.32 2006/06/29 21:29:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
|
||||
// /vis/sceneHandler commands - John Allison 10th October 1998
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommandsViewer.cc,v 1.68 2007/01/11 16:41:30 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4VisCommandsViewer.cc,v 1.70 2008/04/30 10:07:28 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
|
||||
// /vis/viewer commands - John Allison 25th October 1998
|
||||
|
||||
@@ -404,13 +404,13 @@ void G4VisCommandViewerClone::SetNewValue (G4UIcommand*, G4String newValue) {
|
||||
// Need to handle the possibility that the names contain embedded
|
||||
// blanks within quotation marks...
|
||||
char c;
|
||||
while (is.get(c) && c == ' ');
|
||||
while (is.get(c) && c == ' '){}
|
||||
if (c == '"') {
|
||||
while (is.get(c) && c != '"') originalName += c;
|
||||
while (is.get(c) && c != '"') {originalName += c;}
|
||||
}
|
||||
else {
|
||||
originalName += c;
|
||||
while (is.get(c) && c != ' ') originalName += c;
|
||||
while (is.get(c) && c != ' ') {originalName += c;}
|
||||
}
|
||||
originalName = originalName.strip (G4String::both, ' ');
|
||||
originalName = originalName.strip (G4String::both, '"');
|
||||
@@ -426,13 +426,13 @@ void G4VisCommandViewerClone::SetNewValue (G4UIcommand*, G4String newValue) {
|
||||
}
|
||||
originalName = originalViewer->GetName(); // Ensures long name.
|
||||
|
||||
while (is.get(c) && c == ' ');
|
||||
while (is.get(c) && c == ' '){}
|
||||
if (c == '"') {
|
||||
while (is.get(c) && c != '"') cloneName += c;
|
||||
while (is.get(c) && c != '"') {cloneName += c;}
|
||||
}
|
||||
else {
|
||||
cloneName += c;
|
||||
while (is.get(c) && c != ' ') cloneName += c;
|
||||
while (is.get(c) && c != ' ') {cloneName += c;}
|
||||
}
|
||||
cloneName = cloneName.strip (G4String::both, ' ');
|
||||
cloneName = cloneName.strip (G4String::both, '"');
|
||||
@@ -563,13 +563,13 @@ void G4VisCommandViewerCreate::SetNewValue (G4UIcommand*, G4String newValue) {
|
||||
// Now need to handle the possibility that the second string
|
||||
// contains embedded blanks within quotation marks...
|
||||
char c;
|
||||
while (is.get(c) && c == ' ');
|
||||
while (is.get(c) && c == ' '){}
|
||||
if (c == '"') {
|
||||
while (is.get(c) && c != '"') newName += c;
|
||||
while (is.get(c) && c != '"') {newName += c;}
|
||||
}
|
||||
else {
|
||||
newName += c;
|
||||
while (is.get(c) && c != ' ') newName += c;
|
||||
while (is.get(c) && c != ' ') {newName += c;}
|
||||
}
|
||||
newName = newName.strip (G4String::both, ' ');
|
||||
newName = newName.strip (G4String::both, '"');
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommandsViewerSet.cc,v 1.49 2007/07/10 17:51:54 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
|
||||
// /vis/viewer/set commands - John Allison 16th May 2000
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VisFeaturesOfDAWNFILE.cc,v 1.6 2006/06/29 21:29:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
#include "G4VisFeaturesOfDAWNFILE.hh"
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VisFeaturesOfFukuiRenderer.cc,v 1.5 2006/06/29 21:29:54 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VisFeaturesOfOpenGL.cc,v 1.6 2007/10/03 14:21:55 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VisFeaturesOfOpenInventor.cc,v 1.5 2006/06/29 21:29:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4VisManager.cc,v 1.114 2007/11/10 14:59:46 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4VisManager.cc,v 1.115 2008/01/04 22:03:46 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// GEANT4 Visualization Manager - John Allison 02/Jan/1996.
|
||||
@@ -504,11 +504,78 @@ void G4VisManager::Draw (const G4Text& text,
|
||||
}
|
||||
}
|
||||
|
||||
void G4VisManager::Draw2D (const G4Text& text)
|
||||
void G4VisManager::Draw2D (const G4Circle& circle,
|
||||
const G4Transform3D& objectTransform)
|
||||
{
|
||||
if (IsValidView()) {
|
||||
ClearTransientStoreIfMarked();
|
||||
fpSceneHandler -> BeginPrimitives2D();
|
||||
fpSceneHandler -> BeginPrimitives2D(objectTransform);
|
||||
fpSceneHandler -> AddPrimitive(circle);
|
||||
fpSceneHandler -> EndPrimitives2D();
|
||||
}
|
||||
}
|
||||
|
||||
void G4VisManager::Draw2D (const G4NURBS& nurbs,
|
||||
const G4Transform3D& objectTransform)
|
||||
{
|
||||
if (IsValidView()) {
|
||||
ClearTransientStoreIfMarked();
|
||||
fpSceneHandler -> BeginPrimitives2D(objectTransform);
|
||||
fpSceneHandler -> AddPrimitive(nurbs);
|
||||
fpSceneHandler -> EndPrimitives2D();
|
||||
}
|
||||
}
|
||||
|
||||
void G4VisManager::Draw2D (const G4Polyhedron& polyhedron,
|
||||
const G4Transform3D& objectTransform)
|
||||
{
|
||||
if (IsValidView()) {
|
||||
ClearTransientStoreIfMarked();
|
||||
fpSceneHandler -> BeginPrimitives2D(objectTransform);
|
||||
fpSceneHandler -> AddPrimitive(polyhedron);
|
||||
fpSceneHandler -> EndPrimitives2D();
|
||||
}
|
||||
}
|
||||
|
||||
void G4VisManager::Draw2D (const G4Polyline& line,
|
||||
const G4Transform3D& objectTransform)
|
||||
{
|
||||
if (IsValidView()) {
|
||||
ClearTransientStoreIfMarked();
|
||||
fpSceneHandler -> BeginPrimitives2D(objectTransform);
|
||||
fpSceneHandler -> AddPrimitive(line);
|
||||
fpSceneHandler -> EndPrimitives2D();
|
||||
}
|
||||
}
|
||||
|
||||
void G4VisManager::Draw2D (const G4Polymarker& polymarker,
|
||||
const G4Transform3D& objectTransform)
|
||||
{
|
||||
if (IsValidView()) {
|
||||
ClearTransientStoreIfMarked();
|
||||
fpSceneHandler -> BeginPrimitives2D(objectTransform);
|
||||
fpSceneHandler -> AddPrimitive(polymarker);
|
||||
fpSceneHandler -> EndPrimitives2D();
|
||||
}
|
||||
}
|
||||
|
||||
void G4VisManager::Draw2D (const G4Square& square,
|
||||
const G4Transform3D& objectTransform)
|
||||
{
|
||||
if (IsValidView()) {
|
||||
ClearTransientStoreIfMarked();
|
||||
fpSceneHandler -> BeginPrimitives2D(objectTransform);
|
||||
fpSceneHandler -> AddPrimitive(square);
|
||||
fpSceneHandler -> EndPrimitives2D();
|
||||
}
|
||||
}
|
||||
|
||||
void G4VisManager::Draw2D (const G4Text& text,
|
||||
const G4Transform3D& objectTransform)
|
||||
{
|
||||
if (IsValidView()) {
|
||||
ClearTransientStoreIfMarked();
|
||||
fpSceneHandler -> BeginPrimitives2D(objectTransform);
|
||||
fpSceneHandler -> AddPrimitive(text);
|
||||
fpSceneHandler -> EndPrimitives2D();
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4VisStateDependent.cc,v 1.6 2006/06/29 21:30:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
|
||||
#include "G4VisStateDependent.hh"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user