Import Geant4 1.1.0 source tree
This commit is contained in:
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4Scene.cc,v 1.4.4.1 1999/12/07 20:53:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4Scene.cc,v 1.5 1999/12/15 14:54:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// Scene data John Allison 19th July 1996.
|
||||
@@ -37,7 +37,7 @@ G4bool G4Scene::AddRunDurationModel (G4VModel* pModel) {
|
||||
<< "\"\n is already in the run-duration list of scene \""
|
||||
<< fName
|
||||
<< "\"."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
return false;
|
||||
}
|
||||
fRunDurationModelList.append (pModel);
|
||||
@@ -72,7 +72,7 @@ G4bool G4Scene::AddWorldIfEmpty () {
|
||||
" invisible, e.g.,"
|
||||
"\n myWorldLogicalVol ->"
|
||||
" SetVisAttributes (G4VisAttributes::Invisible);"
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
successful = AddRunDurationModel (new G4PhysicalVolumeModel (pWorld));
|
||||
// Note: default depth and no modeling parameters.
|
||||
@@ -80,7 +80,7 @@ G4bool G4Scene::AddWorldIfEmpty () {
|
||||
G4cout <<
|
||||
"G4Scene::AddWorldIfEmpty: The scene was empty,"
|
||||
"\n \"world\" has been added.";
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -99,7 +99,7 @@ G4bool G4Scene::AddEndOfEventModel (G4VModel* pModel) {
|
||||
<< "\"\n is already in the run-duration list of scene \""
|
||||
<< fName
|
||||
<< "\"."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
return false;
|
||||
}
|
||||
fEndOfEventModelList.append (pModel);
|
||||
@@ -111,7 +111,7 @@ void G4Scene::Clear () {
|
||||
fEndOfEventModelList.clearAndDestroy ();
|
||||
}
|
||||
|
||||
ostream& operator << (ostream& os, const G4Scene& d) {
|
||||
G4std::ostream& operator << (G4std::ostream& os, const G4Scene& d) {
|
||||
|
||||
os << "Scene data:";
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VGraphicsSystem.cc,v 1.4.8.1 1999/12/07 20:53:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VGraphicsSystem.cc,v 1.5 1999/12/15 14:54:25 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 27th March 1996
|
||||
@@ -42,7 +42,7 @@ G4VGraphicsSystem::G4VGraphicsSystem (const G4String& name,
|
||||
fDescription (description),
|
||||
fFunctionality (f) {}
|
||||
|
||||
ostream& operator << (ostream& os, const G4VGraphicsSystem& gs) {
|
||||
G4std::ostream& operator << (G4std::ostream& os, const G4VGraphicsSystem& gs) {
|
||||
G4VisManager* pVMan = G4VisManager::GetInstance ();
|
||||
const G4SceneHandlerList& scenes = pVMan -> GetAvailableSceneHandlers ();
|
||||
os << "Graphics System: " << gs.GetName ();
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VSceneHandler.cc,v 1.7.2.1 1999/12/07 20:53:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VSceneHandler.cc,v 1.8 1999/12/15 14:54:25 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 19th July 1996
|
||||
@@ -15,11 +15,7 @@
|
||||
#include "G4VSceneHandler.hh"
|
||||
|
||||
#include "G4ios.hh"
|
||||
#ifdef WIN32
|
||||
#include <strstrea.h>
|
||||
#else
|
||||
#include <strstream.h>
|
||||
#endif
|
||||
#include "g4std/strstream"
|
||||
|
||||
#include "G4VisManager.hh"
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
@@ -59,8 +55,8 @@ G4VSceneHandler::G4VSceneHandler (G4VGraphicsSystem& system, G4int id, const G4S
|
||||
fpScene = pVMan -> GetCurrentScene ();
|
||||
if (name == "") {
|
||||
char charname [50];
|
||||
ostrstream ost (charname, 50);
|
||||
ost << fSystem.GetName () << '-' << fSceneId << ends;
|
||||
G4std::ostrstream ost (charname, 50);
|
||||
ost << fSystem.GetName () << '-' << fSceneId << G4std::ends;
|
||||
fName = charname;
|
||||
}
|
||||
else {
|
||||
@@ -239,8 +235,8 @@ void G4VSceneHandler::RequestPrimitives (const G4VSolid& solid) {
|
||||
break;
|
||||
}
|
||||
else {
|
||||
G4cerr << "NURBS not available for " << solid.GetName () << endl;
|
||||
G4cerr << "Trying polyhedron." << endl;
|
||||
G4cerr << "NURBS not available for " << solid.GetName () << G4endl;
|
||||
G4cerr << "Trying polyhedron." << G4endl;
|
||||
}
|
||||
// Dropping through to polyhedron...
|
||||
case G4ModelingParameters::polyhedron:
|
||||
@@ -258,7 +254,7 @@ void G4VSceneHandler::RequestPrimitives (const G4VSolid& solid) {
|
||||
else {
|
||||
G4cerr << "Polyhedron not available for " << solid.GetName ()
|
||||
<<".\nThis means it cannot be visualized on most systems."
|
||||
"\nContact the Visualization Coordinator." << endl;
|
||||
"\nContact the Visualization Coordinator." << G4endl;
|
||||
}
|
||||
break;
|
||||
case G4ModelingParameters::hierarchy:
|
||||
@@ -266,7 +262,7 @@ void G4VSceneHandler::RequestPrimitives (const G4VSolid& solid) {
|
||||
<< GetModel () -> GetCurrentTag ()
|
||||
<< ", depth "
|
||||
<< fCurrentDepth
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
break;
|
||||
}
|
||||
EndPrimitives ();
|
||||
@@ -285,7 +281,7 @@ void G4VSceneHandler::ProcessScene (G4VViewer& view) {
|
||||
fpScene -> GetRunDurationModelList ();
|
||||
|
||||
if (runDurationModelList.entries ()) {
|
||||
G4cout << "Traversing scene data..." << endl;
|
||||
G4cout << "Traversing scene data..." << G4endl;
|
||||
G4ModelingParameters* pMP = CreateModelingParameters ();
|
||||
for (int i = 0; i < runDurationModelList.entries (); i++) {
|
||||
G4VModel* pModel = runDurationModelList[i];
|
||||
@@ -312,7 +308,7 @@ void G4VSceneHandler::ProcessScene (G4VViewer& view) {
|
||||
SetModel (0); // Flags invalid model.
|
||||
}
|
||||
else {
|
||||
G4cerr << "No run-duration models in scene data." << endl;
|
||||
G4cerr << "No run-duration models in scene data." << G4endl;
|
||||
}
|
||||
|
||||
fReadyForTransients = true;
|
||||
@@ -461,7 +457,7 @@ G4double G4VSceneHandler::GetMarkerSize (const G4VMarker& marker,
|
||||
return size;
|
||||
}
|
||||
|
||||
ostream& operator << (ostream& os, const G4VSceneHandler& s) {
|
||||
G4std::ostream& operator << (G4std::ostream& os, const G4VSceneHandler& s) {
|
||||
|
||||
G4VisManager* pVMan = G4VisManager::GetInstance ();
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VViewer.cc,v 1.4.4.1 1999/12/07 20:53:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VViewer.cc,v 1.5 1999/12/15 14:54:25 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 27th March 1996
|
||||
@@ -15,11 +15,7 @@
|
||||
#include "G4VViewer.hh"
|
||||
|
||||
#include "G4ios.hh"
|
||||
#ifdef WIN32
|
||||
#include <strstrea.h>
|
||||
#else
|
||||
#include <strstream.h>
|
||||
#endif
|
||||
#include "g4std/strstream"
|
||||
|
||||
#include "G4VisManager.hh"
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
@@ -38,8 +34,8 @@ fNeedKernelVisit (true)
|
||||
fVP = pVMan -> GetCurrentViewParameters ();
|
||||
if (name == "") {
|
||||
char charname [50];
|
||||
ostrstream ost (charname, 50);
|
||||
ost << fSceneHandler.GetName () << '-' << fViewId << ends;
|
||||
G4std::ostrstream ost (charname, 50);
|
||||
ost << fSceneHandler.GetName () << '-' << fViewId << G4std::ends;
|
||||
fName = charname;
|
||||
}
|
||||
else {
|
||||
@@ -91,7 +87,7 @@ void G4VViewer::SetViewParameters (const G4ViewParameters& vp) {
|
||||
fModified = true;
|
||||
}
|
||||
|
||||
ostream& operator << (ostream& os, const G4VViewer& v) {
|
||||
G4std::ostream& operator << (G4std::ostream& os, const G4VViewer& v) {
|
||||
os << "View " << v.fName << ":\n";
|
||||
os << v.fVP;
|
||||
return os;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VVisCommand.cc,v 1.4.4.1 1999/12/07 20:53:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VVisCommand.cc,v 1.6 1999/12/16 17:19:31 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
|
||||
// Base class for visualization commands - John Allison 9th August 1998
|
||||
// It is really a messenger - we have one command per messenger.
|
||||
@@ -17,24 +17,8 @@ G4VVisCommand::~G4VVisCommand () {}
|
||||
|
||||
G4VisManager* G4VVisCommand::fpVisManager = 0;
|
||||
|
||||
G4UIcmdWithAString* G4VVisCommand::fpCommandSceneEdit = 0;
|
||||
G4std::vector <G4UIcommand*> G4VVisCommand::sceneNameCommands;
|
||||
|
||||
G4UIcmdWithAString* G4VVisCommand::fpCommandSceneNotifyHandlers = 0;
|
||||
G4std::vector <G4UIcommand*> G4VVisCommand::sceneHandlerNameCommands;
|
||||
|
||||
G4UIcmdWithAString* G4VVisCommand::fpCommandSceneRemove = 0;
|
||||
|
||||
G4UIcmdWithAString* G4VVisCommand::fpCommandSceneSelect = 0;
|
||||
|
||||
G4UIcmdWithAString* G4VVisCommand::fpCommandSceneHandlerAttach = 0;
|
||||
|
||||
G4UIcmdWithAString* G4VVisCommand::fpCommandSceneHandlerRemove = 0;
|
||||
|
||||
G4UIcmdWithAString* G4VVisCommand::fpCommandSceneHandlerSelect = 0;
|
||||
|
||||
G4UIcommand* G4VVisCommand::fpCommandViewerCreate = 0;
|
||||
|
||||
G4UIcmdWithAString* G4VVisCommand::fpCommandViewerRemove = 0;
|
||||
|
||||
G4UIcmdWithAString* G4VVisCommand::fpCommandViewerSelect = 0;
|
||||
|
||||
G4UIcmdWithAString* G4VVisCommand::fpCommandViewerUpdate = 0;
|
||||
G4std::vector <G4UIcommand*> G4VVisCommand::viewerNameCommands;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4ViewParameters.cc,v 1.4.8.1 1999/12/07 20:53:59 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4ViewParameters.cc,v 1.5 1999/12/15 14:54:25 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// John Allison 19th July 1996
|
||||
@@ -115,7 +115,7 @@ void G4ViewParameters::AddCutawayPlane (const G4Plane3D& cutawayPlane) {
|
||||
fCutawayPlanes.insert (cutawayPlane);
|
||||
}
|
||||
else {
|
||||
G4cerr << "A maximum of 3 cutaway planes supported." << endl;
|
||||
G4cerr << "A maximum of 3 cutaway planes supported." << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -128,14 +128,14 @@ void G4ViewParameters::SetVisibleDensity (G4double visibleDensity) {
|
||||
const G4double reasonableMaximum = 10.0 * g / cm3;
|
||||
if (visibleDensity < 0) {
|
||||
G4cout << "G4ViewParameters::SetVisibleDensity: attempt to set negative "
|
||||
"density - ignored." << endl;
|
||||
"density - ignored." << G4endl;
|
||||
}
|
||||
else {
|
||||
if (fVisibleDensity > reasonableMaximum) {
|
||||
G4cout << "G4ViewParameters::SetVisibleDensity: density > "
|
||||
<< reasonableMaximum
|
||||
<< " g / cm3 - did you mean this?"
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
fVisibleDensity = visibleDensity;
|
||||
}
|
||||
@@ -147,7 +147,7 @@ void G4ViewParameters::SetNoOfSides (G4int nSides) {
|
||||
nSides = nSidesMin;
|
||||
G4cout << "G4ViewParameters::SetNoOfSides: attempt to set the"
|
||||
"\nnumber of sides per circle < " << nSidesMin
|
||||
<< "; forced to" << nSides << endl;
|
||||
<< "; forced to" << nSides << G4endl;
|
||||
}
|
||||
fNoOfSides = nSides;
|
||||
}
|
||||
@@ -216,32 +216,32 @@ void G4ViewParameters::PrintDifferences (const G4ViewParameters& v) const {
|
||||
(fGlobalMarkerScale != v.fGlobalMarkerScale) ||
|
||||
(fMarkerNotHidden != v.fMarkerNotHidden) ||
|
||||
(fWindowSizeHintY != v.fWindowSizeHintY))
|
||||
G4cout << "Difference in 1st batch." << endl;
|
||||
G4cout << "Difference in 1st batch." << G4endl;
|
||||
|
||||
if (fSection) {
|
||||
if (!(fSectionPlane == v.fSectionPlane))
|
||||
G4cout << "Difference in section planes batch." << endl;
|
||||
G4cout << "Difference in section planes batch." << G4endl;
|
||||
}
|
||||
|
||||
if (fCutaway) {
|
||||
if (fCutawayPlanes.entries () != v.fCutawayPlanes.entries ()) {
|
||||
G4cout << "Difference in no of cutaway planes." << endl;
|
||||
G4cout << "Difference in no of cutaway planes." << G4endl;
|
||||
}
|
||||
else {
|
||||
for (int i = 0; i < fCutawayPlanes.entries (); i++) {
|
||||
if (!(fCutawayPlanes (i) == v.fCutawayPlanes (i)))
|
||||
G4cout << "Difference in cutaway plane no. " << i << endl;
|
||||
G4cout << "Difference in cutaway plane no. " << i << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (fExplode) {
|
||||
if (fExplodeFactor != v.fExplodeFactor)
|
||||
G4cout << "Difference in explode factor." << endl;
|
||||
G4cout << "Difference in explode factor." << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
ostream& operator << (ostream& os, const G4ViewParameters& v) {
|
||||
G4std::ostream& operator << (G4std::ostream& os, const G4ViewParameters& v) {
|
||||
os << "View parameters and options:";
|
||||
|
||||
os << "\n Drawing style: ";
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VisCommandTemplates.cc,v 1.3.2.1 1999/12/07 20:54:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VisCommandTemplates.cc,v 1.4 1999/12/15 14:54:25 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// Visualization Command Messenger Template private functions.
|
||||
@@ -46,7 +46,7 @@ G4int G4VisButtonCommandMessengerInterpret (G4String newValues) {
|
||||
choice.compareTo ("true", G4String::ignoreCase) == 0) iSelector = 1;
|
||||
if (iSelector < 0 || choice.isNull ()) {
|
||||
G4cout << "Choice not recognised."
|
||||
"\n Choice is 0 (or off or false) or 1 (or on or true)." << endl;;
|
||||
"\n Choice is 0 (or off or false) or 1 (or on or true)." << G4endl;;
|
||||
}
|
||||
return iSelector;
|
||||
}
|
||||
|
||||
@@ -5,13 +5,15 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VisCommandsCamera.cc,v 1.3.8.1 1999/12/07 20:54:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VisCommandsCamera.cc,v 1.5 2000/01/11 17:23:25 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
|
||||
#include "G4VisCommandsCamera.hh"
|
||||
|
||||
#include "G4UnitsTable.hh"
|
||||
|
||||
void G4VisCommandCameraReset::SetValue () {
|
||||
G4VisManager* pVMan = G4VisManager::GetInstance ();
|
||||
if (pVMan -> IsValidView ()) {
|
||||
@@ -22,16 +24,20 @@ void G4VisCommandCameraReset::SetValue () {
|
||||
vp.SetDolly (0.);
|
||||
vp.SetViewpointDirection (G4Vector3D (0., 0., 1.));
|
||||
vp.SetUpVector (G4Vector3D (0., 1., 0.));
|
||||
if (pVMan -> GetVerboseLevel () > 0) {
|
||||
G4cout << "Target point reset";
|
||||
G4cout << "\nZoom factor reset to 1.";
|
||||
G4cout << "\nDolly distance reset to 0.";
|
||||
G4cout << "\nViewpoint direction reset to +z.";
|
||||
G4cout << "\nUp vector set to +y.";
|
||||
G4cout << endl;
|
||||
if (pVMan -> GetVerboseLevel () > 1) {
|
||||
pVMan -> PrintCurrentView ();
|
||||
}
|
||||
G4cout << "Target point reset to centre of scene, ("
|
||||
<< G4BestUnit (pScene -> GetStandardTargetPoint ().x(), "Length")
|
||||
<< ", "
|
||||
<< G4BestUnit (pScene -> GetStandardTargetPoint ().y(), "Length")
|
||||
<< ", "
|
||||
<< G4BestUnit (pScene -> GetStandardTargetPoint ().z(), "Length")
|
||||
<< ")";
|
||||
G4cout << "\nZoom factor reset to 1.";
|
||||
G4cout << "\nDolly distance reset to 0.";
|
||||
G4cout << "\nViewpoint direction reset to +z.";
|
||||
G4cout << "\nUp vector reset to +y.";
|
||||
G4cout << G4endl;
|
||||
if (pVMan -> GetVerboseLevel () > 1) {
|
||||
pVMan -> PrintCurrentView ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VisCommandsCameraMessengers.cc,v 1.2.8.1 1999/12/07 20:54:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VisCommandsCameraMessengers.cc,v 1.3 1999/12/15 14:54:26 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// Messengers for /vis~/camera commands - John Allison 6th April 1998.
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VisCommandsScene.cc,v 1.9.4.1 1999/12/07 20:54:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VisCommandsScene.cc,v 1.11 1999/12/16 17:19:32 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
|
||||
// /vis/scene commands - John Allison 9th August 1998
|
||||
|
||||
@@ -20,11 +20,7 @@
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
#include "G4ios.hh"
|
||||
#ifdef WIN32
|
||||
#include <strstrea.h>
|
||||
#else
|
||||
#include <strstream.h>
|
||||
#endif
|
||||
#include "g4std/strstream"
|
||||
|
||||
G4VVisCommandScene::G4VVisCommandScene () {}
|
||||
|
||||
@@ -46,30 +42,9 @@ void G4VVisCommandScene::UpdateCandidateLists () {
|
||||
nameList += sceneList [iScene] -> GetName () + " ";
|
||||
}
|
||||
nameList = nameList.strip ();
|
||||
|
||||
if (fpCommandSceneEdit) {
|
||||
fpCommandSceneEdit -> GetParameter (0) ->
|
||||
SetParameterCandidates (nameList);
|
||||
}
|
||||
|
||||
if (fpCommandSceneNotifyHandlers) {
|
||||
fpCommandSceneNotifyHandlers -> GetParameter (0) ->
|
||||
SetParameterCandidates (nameList);
|
||||
}
|
||||
|
||||
if (fpCommandSceneRemove) {
|
||||
fpCommandSceneRemove -> GetParameter (0) ->
|
||||
SetParameterCandidates (nameList);
|
||||
}
|
||||
|
||||
if (fpCommandSceneSelect) {
|
||||
fpCommandSceneSelect -> GetParameter (0) ->
|
||||
SetParameterCandidates (nameList);
|
||||
}
|
||||
|
||||
if (fpCommandSceneHandlerAttach) {
|
||||
fpCommandSceneHandlerAttach -> GetParameter (0) ->
|
||||
SetParameterCandidates (nameList);
|
||||
sceneNameCommandsIterator i;
|
||||
for (i = sceneNameCommands.begin (); i != sceneNameCommands.end (); ++i) {
|
||||
(*i)->GetParameter (0) -> SetParameterCandidates (nameList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +72,7 @@ G4VisCommandSceneCreate::G4VisCommandSceneCreate (): fId (0) {
|
||||
fpCommand -> SetParameterName ("scene-name",
|
||||
omitable = true,
|
||||
currentAsDefault = true);
|
||||
fpCommandSceneEdit = fpCommand;
|
||||
sceneNameCommands.push_back (fpCommand);
|
||||
}
|
||||
|
||||
G4VisCommandSceneCreate::~G4VisCommandSceneCreate () {
|
||||
@@ -106,8 +81,8 @@ G4VisCommandSceneCreate::~G4VisCommandSceneCreate () {
|
||||
|
||||
G4String G4VisCommandSceneCreate::NextName () {
|
||||
char nextName [20];
|
||||
ostrstream ost (nextName, 20);
|
||||
ost << "scene-" << fId << ends;
|
||||
G4std::ostrstream ost (nextName, 20);
|
||||
ost << "scene-" << fId << G4std::ends;
|
||||
return nextName;
|
||||
}
|
||||
|
||||
@@ -131,7 +106,7 @@ void G4VisCommandSceneCreate::SetNewValue (G4UIcommand* command,
|
||||
if (sceneList [iScene] -> GetName () == newName) break;
|
||||
}
|
||||
if (iScene < nScenes) {
|
||||
G4cout << "Scene \"" << newName << "\" already exists." << endl;
|
||||
G4cout << "Scene \"" << newName << "\" already exists." << G4endl;
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -139,7 +114,7 @@ void G4VisCommandSceneCreate::SetNewValue (G4UIcommand* command,
|
||||
// Adds empty scene data object to list.
|
||||
|
||||
UpdateVisManagerScene (newName);
|
||||
G4cout << "New empty scene \"" << newName << "\" created." << endl;
|
||||
G4cout << "New empty scene \"" << newName << "\" created." << G4endl;
|
||||
|
||||
UpdateCandidateLists ();
|
||||
}
|
||||
@@ -156,6 +131,7 @@ G4VisCommandSceneEdit::G4VisCommandSceneEdit () {
|
||||
fpCommand -> SetParameterName ("scene-name",
|
||||
omitable = true,
|
||||
currentAsDefault = true);
|
||||
sceneNameCommands.push_back (fpCommand);
|
||||
}
|
||||
|
||||
G4VisCommandSceneEdit::~G4VisCommandSceneEdit () {
|
||||
@@ -169,7 +145,7 @@ G4String G4VisCommandSceneEdit::GetCurrentValue (G4UIcommand* command) {
|
||||
void G4VisCommandSceneEdit::SetNewValue (G4UIcommand* command,
|
||||
G4String newValue) {
|
||||
G4String sceneName;
|
||||
istrstream is ((char*)newValue.data());
|
||||
G4std::istrstream is ((char*)newValue.data());
|
||||
is >> sceneName;
|
||||
|
||||
G4SceneList& sceneList = fpVisManager -> SetSceneList ();
|
||||
@@ -183,18 +159,18 @@ void G4VisCommandSceneEdit::SetNewValue (G4UIcommand* command,
|
||||
G4cout << "G4VisCommandSceneEdit::SetNewValue: Scene \""
|
||||
<< sceneName << "\" not found."
|
||||
"\n /vis/scene/list to see scenes."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
return;
|
||||
}
|
||||
else {
|
||||
G4cout << "Scene \"" << sceneName << "\" contains:" << endl;
|
||||
G4cout << "Scene \"" << sceneName << "\" contains:" << G4endl;
|
||||
G4String uiCommand ("/vis/scene/list ");
|
||||
uiCommand += sceneName;
|
||||
uiCommand += " 1";
|
||||
G4UImanager::GetUIpointer () -> ApplyCommand (uiCommand);
|
||||
G4cout <<
|
||||
"(YOU CAN DO NOTHING YET - /vis/scene/edit FACILITY IN PREPARATION."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
UpdateVisManagerScene (sceneName);
|
||||
@@ -220,7 +196,7 @@ G4VisCommandSceneList::G4VisCommandSceneList () {
|
||||
omitable = true);
|
||||
parameter -> SetCurrentAsDefault (false);
|
||||
parameter -> SetDefaultValue (0);
|
||||
fpCommand -> SetParameter (parameter);
|
||||
sceneNameCommands.push_back (fpCommand);
|
||||
}
|
||||
|
||||
G4VisCommandSceneList::~G4VisCommandSceneList () {
|
||||
@@ -235,7 +211,7 @@ void G4VisCommandSceneList::SetNewValue (G4UIcommand* command,
|
||||
G4String newValue) {
|
||||
G4String name;
|
||||
G4int verbosity;
|
||||
istrstream is ((char*)newValue.data());
|
||||
G4std::istrstream is ((char*)newValue.data());
|
||||
is >> name >> verbosity;
|
||||
|
||||
G4SceneList& sceneList = fpVisManager -> SetSceneList ();
|
||||
@@ -273,14 +249,14 @@ void G4VisCommandSceneList::SetNewValue (G4UIcommand* command,
|
||||
if (verbosity >= 2) {
|
||||
G4cout << "\n " << *sceneList [iScene];
|
||||
}
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
if (!found) {
|
||||
G4cout << "No scenes found";
|
||||
if (name != "all") {
|
||||
G4cout << " of name \"" << name << "\"";
|
||||
}
|
||||
G4cout << "." << endl;
|
||||
G4cout << "." << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,7 +274,7 @@ G4VisCommandSceneNotifyHandlers::G4VisCommandSceneNotifyHandlers () {
|
||||
fpCommand -> SetParameterName ("scene-name",
|
||||
omitable = true,
|
||||
currentAsDefault = true);
|
||||
fpCommandSceneNotifyHandlers = fpCommand;
|
||||
sceneNameCommands.push_back (fpCommand);
|
||||
}
|
||||
|
||||
G4VisCommandSceneNotifyHandlers::~G4VisCommandSceneNotifyHandlers () {
|
||||
@@ -330,7 +306,7 @@ void G4VisCommandSceneNotifyHandlers::SetNewValue (G4UIcommand* command,
|
||||
if (iScene >= nScenes ) {
|
||||
G4cout << "Scene \"" << sceneName << "\" not found."
|
||||
"\n /vis/scene/list to see scenes."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -358,7 +334,7 @@ void G4VisCommandSceneNotifyHandlers::SetNewValue (G4UIcommand* command,
|
||||
G4cout << "Viewer \"" << aViewer -> GetName ()
|
||||
<< "\" of scene handler \"" << aSceneHandler -> GetName ()
|
||||
<< "\"\n prepared at request of scene \"" << sceneName
|
||||
<< "\"." << endl;
|
||||
<< "\"." << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -376,7 +352,7 @@ G4VisCommandSceneRemove::G4VisCommandSceneRemove () {
|
||||
fpCommand -> SetParameterName ("scene-name",
|
||||
omitable = false,
|
||||
currentAsDefault = true);
|
||||
fpCommandSceneRemove = fpCommand;
|
||||
sceneNameCommands.push_back (fpCommand);
|
||||
}
|
||||
|
||||
G4VisCommandSceneRemove::~G4VisCommandSceneRemove () {
|
||||
@@ -400,28 +376,28 @@ void G4VisCommandSceneRemove::SetNewValue (G4UIcommand* command,
|
||||
if (iScene < nScenes) {
|
||||
delete sceneList [iScene];
|
||||
sceneList.removeAt (iScene);
|
||||
G4cout << "Scene \"" << removeName << "\" removed." << endl;
|
||||
G4cout << "Scene \"" << removeName << "\" removed." << G4endl;
|
||||
UpdateCandidateLists ();
|
||||
if (sceneList.isEmpty ()) {
|
||||
UpdateVisManagerScene ();
|
||||
G4cout << "No scenes left. Please create a new one." << endl;
|
||||
G4cout << "No scenes left. Please create a new one." << G4endl;
|
||||
}
|
||||
else {
|
||||
if (currentSceneName == removeName) {
|
||||
UpdateVisManagerScene (sceneList [0] -> GetName ());
|
||||
G4cout << "Current scene is now \""
|
||||
<< fpVisManager -> GetCurrentScene () -> GetName ()
|
||||
<< "\"" << endl;
|
||||
<< "\"" << G4endl;
|
||||
}
|
||||
else {
|
||||
G4cout << "Current scene unchanged." << endl;
|
||||
G4cout << "Current scene unchanged." << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
G4cout << "Scene \"" << removeName
|
||||
<< "\" not found - \"/vis/scene/list\" to see possibilities."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -437,7 +413,7 @@ G4VisCommandSceneSelect::G4VisCommandSceneSelect () {
|
||||
fpCommand -> SetParameterName ("scene-name",
|
||||
omitable = true,
|
||||
currentAsDefault = true);
|
||||
fpCommandSceneSelect = fpCommand;
|
||||
sceneNameCommands.push_back (fpCommand);
|
||||
}
|
||||
|
||||
G4VisCommandSceneSelect::~G4VisCommandSceneSelect () {
|
||||
@@ -459,10 +435,10 @@ void G4VisCommandSceneSelect::SetNewValue (G4UIcommand* command,
|
||||
G4cout << "Scene \"" << selectName;
|
||||
if (iScene < nScenes) {
|
||||
UpdateVisManagerScene (selectName);
|
||||
G4cout << "\" selected." << endl;
|
||||
G4cout << "\" selected." << G4endl;
|
||||
}
|
||||
else {
|
||||
G4cout << "\" not found - \"/vis/scene/list\" to see possibilities."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VisCommandsSceneAdd.cc,v 1.8.4.1 1999/12/07 20:54:00 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VisCommandsSceneAdd.cc,v 1.9 1999/12/15 14:54:26 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
|
||||
// /vis/scene commands - John Allison 9th August 1998
|
||||
|
||||
@@ -27,11 +27,7 @@
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
#include "G4ios.hh"
|
||||
#ifdef WIN32
|
||||
# include <Strstrea.h>
|
||||
#else
|
||||
# include <strstream.h>
|
||||
#endif
|
||||
#include "g4std/strstream"
|
||||
|
||||
////////////// /vis/scene/add/volume ///////////////////////////////////////
|
||||
|
||||
@@ -76,7 +72,7 @@ void G4VisCommandSceneAddVolume::SetNewValue (G4UIcommand* command,
|
||||
G4SceneList& sceneList = fpVisManager -> SetSceneList ();
|
||||
if (sceneList.isEmpty ()) {
|
||||
G4cout << "No scenes - please create one before adding anything."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -84,7 +80,7 @@ void G4VisCommandSceneAddVolume::SetNewValue (G4UIcommand* command,
|
||||
G4int copyNo;
|
||||
G4int requestedDepthOfDescent;
|
||||
const char* s = newValue;
|
||||
istrstream is ((char*)s);
|
||||
G4std::istrstream is ((char*)s);
|
||||
is >> name >> copyNo >> requestedDepthOfDescent;
|
||||
G4VPhysicalVolume* world =
|
||||
G4TransportationManager::GetTransportationManager ()
|
||||
@@ -101,7 +97,7 @@ void G4VisCommandSceneAddVolume::SetNewValue (G4UIcommand* command,
|
||||
else {
|
||||
G4cerr << "G4VisCommandSceneAddVolume::SetNewValue: *** ERROR ***"
|
||||
<< "\n No world - shouldn't happen if G4ApplicationState is"
|
||||
<< " being properly handled!!" << endl;
|
||||
<< " being properly handled!!" << G4endl;
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -129,7 +125,7 @@ void G4VisCommandSceneAddVolume::SetNewValue (G4UIcommand* command,
|
||||
}
|
||||
else {
|
||||
G4cout << "Volume \"" << name << "\", copy no. " << copyNo
|
||||
<< " not found." << endl;
|
||||
<< " not found." << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -145,7 +141,7 @@ void G4VisCommandSceneAddVolume::SetNewValue (G4UIcommand* command,
|
||||
<< ",\n with further requested depth of descent "
|
||||
<< requestedDepthOfDescent
|
||||
<< ", has been added to scene \"" << currentSceneName << "\""
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -186,14 +182,14 @@ void G4VisCommandSceneAddLogicalVolume::SetNewValue (G4UIcommand* command,
|
||||
G4SceneList& sceneList = fpVisManager -> SetSceneList ();
|
||||
if (sceneList.isEmpty ()) {
|
||||
G4cout << "No scenes - please create one before adding anything."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
G4String name;
|
||||
G4int requestedDepthOfDescent;
|
||||
const char* s = newValue;
|
||||
istrstream is ((char*)s);
|
||||
G4std::istrstream is ((char*)s);
|
||||
is >> name >> requestedDepthOfDescent;
|
||||
|
||||
G4LogicalVolumeStore *pLVStore = G4LogicalVolumeStore::GetInstance();
|
||||
@@ -206,7 +202,7 @@ void G4VisCommandSceneAddLogicalVolume::SetNewValue (G4UIcommand* command,
|
||||
}
|
||||
if (iLV == nLV) {
|
||||
G4cout << "Logical volume " << name
|
||||
<< " not found in logical volume Store." << endl;
|
||||
<< " not found in logical volume Store." << G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -220,7 +216,7 @@ void G4VisCommandSceneAddLogicalVolume::SetNewValue (G4UIcommand* command,
|
||||
<< " with requested depth of descent "
|
||||
<< requestedDepthOfDescent
|
||||
<< ",\n has been added to scene \"" << currentSceneName << "\""
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -257,14 +253,14 @@ void G4VisCommandSceneAddGhosts::SetNewValue (G4UIcommand* command,
|
||||
G4SceneList& sceneList = fpVisManager -> SetSceneList ();
|
||||
if (sceneList.isEmpty ()) {
|
||||
G4cout << "No scenes - please create one before adding anything."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
G4VGlobalFastSimulationManager* theGlobalFastSimulationManager;
|
||||
if(!(theGlobalFastSimulationManager =
|
||||
G4VGlobalFastSimulationManager::GetConcreteInstance ())){
|
||||
G4cout<< "WARNING: no G4GlobalFastSimulationManager" << endl;
|
||||
G4cout<< "WARNING: no G4GlobalFastSimulationManager" << G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -283,7 +279,7 @@ void G4VisCommandSceneAddGhosts::SetNewValue (G4UIcommand* command,
|
||||
UpdateVisManagerScene ();
|
||||
if (successful) {
|
||||
G4cout << "Ghosts added to the Scene, refresh the view to see it."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -291,7 +287,7 @@ void G4VisCommandSceneAddGhosts::SetNewValue (G4UIcommand* command,
|
||||
G4ParticleDefinition* currentParticle =
|
||||
theParticleTable->FindParticle(newValue);
|
||||
if (currentParticle == NULL) {
|
||||
G4cout << "\"" << newValue << "\": not found this particle name!" << endl;
|
||||
G4cout << "\"" << newValue << "\": not found this particle name!" << G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -303,8 +299,8 @@ void G4VisCommandSceneAddGhosts::SetNewValue (G4UIcommand* command,
|
||||
UpdateVisManagerScene (currentSceneName);
|
||||
if (successful) {
|
||||
G4cout << "Ghosts added to the Scene, refresh the view to see it."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
else G4cout << "There are no ghosts for \""<<newValue<<"\""<<endl;
|
||||
else G4cout << "There are no ghosts for \""<<newValue<<"\""<<G4endl;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VisCommandsSceneHandler.cc,v 1.8.2.1 1999/12/07 20:54:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VisCommandsSceneHandler.cc,v 1.10 1999/12/16 17:19:33 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
|
||||
// /vis/sceneHandler commands - John Allison 10th October 1998
|
||||
|
||||
@@ -19,11 +19,7 @@
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
#include "G4ios.hh"
|
||||
#ifdef WIN32
|
||||
#include <strstrea.h>
|
||||
#else
|
||||
#include <strstream.h>
|
||||
#endif
|
||||
#include "g4std/strstream"
|
||||
|
||||
G4VVisCommandSceneHandler::G4VVisCommandSceneHandler () {}
|
||||
|
||||
@@ -34,31 +30,19 @@ void G4VVisCommandSceneHandler::UpdateCandidateLists () {
|
||||
const G4SceneHandlerList& list =
|
||||
fpVisManager -> GetAvailableSceneHandlers ();
|
||||
|
||||
fSceneHandlerNameList = G4String ();
|
||||
G4String sceneHandlerNameList;
|
||||
for (int iScene = 0; iScene < list.entries (); iScene++) {
|
||||
G4VSceneHandler* sceneHandler = list [iScene];
|
||||
fSceneHandlerNameList += sceneHandler -> GetName () + " ";
|
||||
sceneHandlerNameList += sceneHandler -> GetName () + " ";
|
||||
}
|
||||
fSceneHandlerNameList = fSceneHandlerNameList.strip ();
|
||||
|
||||
if (fpCommandSceneHandlerRemove) {
|
||||
fpCommandSceneHandlerRemove -> GetParameter (0) ->
|
||||
SetParameterCandidates (fSceneHandlerNameList);
|
||||
}
|
||||
|
||||
if (fpCommandSceneHandlerSelect) {
|
||||
fpCommandSceneHandlerSelect -> GetParameter (0) ->
|
||||
SetParameterCandidates (fSceneHandlerNameList);
|
||||
}
|
||||
|
||||
if (fpCommandViewerCreate) {
|
||||
fpCommandViewerCreate -> GetParameter (0) ->
|
||||
SetParameterCandidates (fSceneHandlerNameList);
|
||||
sceneHandlerNameList = sceneHandlerNameList.strip ();
|
||||
sceneHandlerNameCommandsIterator i;
|
||||
for (i = sceneHandlerNameCommands.begin ();
|
||||
i != sceneHandlerNameCommands.end (); ++i) {
|
||||
(*i)->GetParameter (0) -> SetParameterCandidates (sceneHandlerNameList);
|
||||
}
|
||||
}
|
||||
|
||||
G4String G4VVisCommandSceneHandler::fSceneHandlerNameList;
|
||||
|
||||
////////////// /vis/sceneHandler/attach ///////////////////////////////////////
|
||||
|
||||
G4VisCommandSceneHandlerAttach::G4VisCommandSceneHandlerAttach () {
|
||||
@@ -75,7 +59,7 @@ G4VisCommandSceneHandlerAttach::G4VisCommandSceneHandlerAttach () {
|
||||
fpCommand -> SetParameterName ("scene-name",
|
||||
omitable = true,
|
||||
currentAsDefault = true);
|
||||
fpCommandSceneHandlerAttach = fpCommand;
|
||||
sceneNameCommands.push_back (fpCommand);
|
||||
}
|
||||
|
||||
G4VisCommandSceneHandlerAttach::~G4VisCommandSceneHandlerAttach () {
|
||||
@@ -94,7 +78,7 @@ void G4VisCommandSceneHandlerAttach::SetNewValue (G4UIcommand* command,
|
||||
if (sceneName.length () == 0) {
|
||||
G4cout <<
|
||||
"Null string specified. Maybe there are no scenes available yet."
|
||||
"\n Please create one." << endl;
|
||||
"\n Please create one." << G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -102,7 +86,7 @@ void G4VisCommandSceneHandlerAttach::SetNewValue (G4UIcommand* command,
|
||||
if (!pSceneHandler) {
|
||||
G4cout <<
|
||||
"Current scene handler not defined. Please select or create one."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -112,7 +96,7 @@ void G4VisCommandSceneHandlerAttach::SetNewValue (G4UIcommand* command,
|
||||
if (sceneList.isEmpty ()) {
|
||||
G4cout <<
|
||||
"No valid scenes available yet. Please create one."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -126,12 +110,12 @@ void G4VisCommandSceneHandlerAttach::SetNewValue (G4UIcommand* command,
|
||||
fpVisManager -> SetCurrentScene (pScene);
|
||||
G4cout << "Scene \"" << sceneName
|
||||
<< "\" attached to scene handler \"" << pSceneHandler -> GetName ()
|
||||
<< "." << endl;
|
||||
<< "." << G4endl;
|
||||
}
|
||||
else {
|
||||
G4cout << "Scene \"" << sceneName
|
||||
<< "\" not found. Use \"/vis/scene/list\" to see possibilities."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -190,8 +174,8 @@ G4VisCommandSceneHandlerCreate::~G4VisCommandSceneHandlerCreate () {
|
||||
|
||||
G4String G4VisCommandSceneHandlerCreate::NextName () {
|
||||
char nextName [20];
|
||||
ostrstream ost (nextName, 20);
|
||||
ost << "scene-handler-" << fId << ends;
|
||||
G4std::ostrstream ost (nextName, 20);
|
||||
ost << "scene-handler-" << fId << G4std::ends;
|
||||
return nextName;
|
||||
}
|
||||
|
||||
@@ -230,7 +214,7 @@ G4String G4VisCommandSceneHandlerCreate::GetCurrentValue
|
||||
void G4VisCommandSceneHandlerCreate::SetNewValue (G4UIcommand* command,
|
||||
G4String newValue) {
|
||||
G4String graphicsSystem, newName, sceneName;
|
||||
istrstream is ((char*)newValue.data());
|
||||
G4std::istrstream is ((char*)newValue.data());
|
||||
is >> graphicsSystem >> newName >> sceneName;
|
||||
|
||||
const G4GraphicsSystemList& gsl =
|
||||
@@ -241,7 +225,7 @@ void G4VisCommandSceneHandlerCreate::SetNewValue (G4UIcommand* command,
|
||||
" no graphics systems available."
|
||||
"\n Did you instantiate any in"
|
||||
" YourVisManager::RegisterGraphicsSystems()?"
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
return;
|
||||
}
|
||||
int iGS; // Selector index.
|
||||
@@ -258,7 +242,7 @@ void G4VisCommandSceneHandlerCreate::SetNewValue (G4UIcommand* command,
|
||||
// This shouldn't happen!!!!!!
|
||||
G4cerr << "G4VisCommandSceneHandlerCreate::SetNewValue:"
|
||||
" invalid graphics system specified."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
return;
|
||||
}
|
||||
// Valid index. Set current graphics system in preparation for
|
||||
@@ -266,7 +250,7 @@ void G4VisCommandSceneHandlerCreate::SetNewValue (G4UIcommand* command,
|
||||
G4VGraphicsSystem* pSystem = gsl [iGS];
|
||||
fpVisManager -> SetCurrentGraphicsSystem (pSystem);
|
||||
if (fpVisManager -> GetVerboseLevel () > 0) {
|
||||
G4cout << "Graphics system set to " << pSystem -> GetName () << endl;
|
||||
G4cout << "Graphics system set to " << pSystem -> GetName () << G4endl;
|
||||
}
|
||||
|
||||
// Now deal with name of scene handler.
|
||||
@@ -281,14 +265,14 @@ void G4VisCommandSceneHandlerCreate::SetNewValue (G4UIcommand* command,
|
||||
for (iScene = 0; iScene < list.entries (); iScene++) {
|
||||
G4VSceneHandler* sceneHandler = list [iScene];
|
||||
if (sceneHandler -> GetName () == newName) {
|
||||
G4cout << "Scene handler \"" << newName << "\" already exists." << endl;
|
||||
G4cout << "Scene handler \"" << newName << "\" already exists." << G4endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//Create scene handler.
|
||||
fpVisManager -> CreateSceneHandler (newName);
|
||||
G4cout << "New scene handler \"" << newName << "\" created." << endl;
|
||||
G4cout << "New scene handler \"" << newName << "\" created." << G4endl;
|
||||
|
||||
// Attach scene.
|
||||
G4String commandString = "/vis/sceneHandler/attach " + sceneName;
|
||||
@@ -318,7 +302,7 @@ G4VisCommandSceneHandlerList::G4VisCommandSceneHandlerList () {
|
||||
omitable = true);
|
||||
parameter -> SetCurrentAsDefault (false);
|
||||
parameter -> SetDefaultValue (0);
|
||||
fpCommand -> SetParameter (parameter);
|
||||
sceneHandlerNameCommands.push_back (fpCommand);
|
||||
}
|
||||
|
||||
G4VisCommandSceneHandlerList::~G4VisCommandSceneHandlerList () {
|
||||
@@ -333,7 +317,7 @@ void G4VisCommandSceneHandlerList::SetNewValue (G4UIcommand* command,
|
||||
G4String newValue) {
|
||||
G4String name;
|
||||
G4int verbosity;
|
||||
istrstream is ((char*)newValue.data());
|
||||
G4std::istrstream is ((char*)newValue.data());
|
||||
is >> name >> verbosity;
|
||||
|
||||
const G4SceneHandlerList& list = fpVisManager -> GetAvailableSceneHandlers ();
|
||||
@@ -348,14 +332,14 @@ void G4VisCommandSceneHandlerList::SetNewValue (G4UIcommand* command,
|
||||
if (verbosity > 0) {
|
||||
G4cout << "\n " << *(list [iSH]);
|
||||
}
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
if (!found) {
|
||||
G4cout << "No scene handlers found";
|
||||
if (name != "all") {
|
||||
G4cout << " of name \"" << name << "\"";
|
||||
}
|
||||
G4cout << "." << endl;
|
||||
G4cout << "." << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -372,7 +356,7 @@ G4VisCommandSceneHandlerRemove::G4VisCommandSceneHandlerRemove () {
|
||||
fpCommand -> SetParameterName ("scene-handler-name",
|
||||
omitable = false,
|
||||
currentAsDefault = true);
|
||||
fpCommandSceneHandlerRemove = fpCommand;
|
||||
sceneHandlerNameCommands.push_back (fpCommand);
|
||||
}
|
||||
|
||||
G4VisCommandSceneHandlerRemove::~G4VisCommandSceneHandlerRemove () {
|
||||
@@ -408,17 +392,17 @@ void G4VisCommandSceneHandlerRemove::SetNewValue (G4UIcommand* command,
|
||||
if (iSH >= list.entries ()) {
|
||||
G4cout << "Scene handler \"" << removeName
|
||||
<< "\" not found - \"/vis/sceneHandler/list\" to see possibilities."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
G4cout << "Scene handler \"" << removeName << "\" removed." << endl;
|
||||
G4cout << "Scene handler \"" << removeName << "\" removed." << G4endl;
|
||||
if (removeName == currentName) {
|
||||
fpVisManager -> DeleteCurrentSceneHandler ();
|
||||
}
|
||||
else {
|
||||
list.remove (list [iSH]);
|
||||
G4cout << "Current scene handler unchanged." << endl;
|
||||
G4cout << "Current scene handler unchanged." << G4endl;
|
||||
}
|
||||
|
||||
UpdateCandidateLists ();
|
||||
@@ -437,7 +421,7 @@ G4VisCommandSceneHandlerSelect::G4VisCommandSceneHandlerSelect () {
|
||||
fpCommand -> SetParameterName ("scene-handler-name",
|
||||
omitable = true,
|
||||
currentAsDefault = true);
|
||||
fpCommandSceneHandlerSelect = fpCommand;
|
||||
sceneHandlerNameCommands.push_back (fpCommand);
|
||||
}
|
||||
|
||||
G4VisCommandSceneHandlerSelect::~G4VisCommandSceneHandlerSelect () {
|
||||
@@ -466,16 +450,16 @@ void G4VisCommandSceneHandlerSelect::SetNewValue (G4UIcommand* command,
|
||||
}
|
||||
if (iSH < list.entries ()) {
|
||||
if (fpVisManager -> GetCurrentSceneHandler () -> GetName () == selectName) {
|
||||
G4cout << " already selected." << endl;
|
||||
G4cout << " already selected." << G4endl;
|
||||
}
|
||||
else {
|
||||
G4cout << " being selected." << endl;
|
||||
G4cout << " being selected." << G4endl;
|
||||
fpVisManager -> SetCurrentSceneHandler (list [iSH]);
|
||||
}
|
||||
}
|
||||
else {
|
||||
G4cout << " not found - \"/vis/sceneHandler/list\""
|
||||
"\n to see possibilities."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VisCommandsSceneInclude.cc,v 1.3.8.1 1999/12/07 20:54:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VisCommandsSceneInclude.cc,v 1.4 1999/12/15 14:54:26 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
|
||||
// /vis/scene commands - John Allison 9th August 1998
|
||||
|
||||
@@ -42,7 +42,7 @@ void G4VisCommandSceneIncludeHits::SetNewValue (G4UIcommand* command,
|
||||
G4SceneList& list = fpVisManager -> SetSceneList ();
|
||||
if (list.isEmpty ()) {
|
||||
G4cout << "No scenes - please create one before adding anything."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ void G4VisCommandSceneIncludeHits::SetNewValue (G4UIcommand* command,
|
||||
pCurrentScene -> AddEndOfEventModel (model);
|
||||
G4cout << "Hits will be drawn in scene \""
|
||||
<< currentSceneName << "\"."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
////////////// /vis/scene/include/trajectories ///////////////////////////////////////
|
||||
@@ -81,7 +81,7 @@ void G4VisCommandSceneIncludeTrajectories::SetNewValue (G4UIcommand* command,
|
||||
G4SceneList& list = fpVisManager -> SetSceneList ();
|
||||
if (list.isEmpty ()) {
|
||||
G4cout << "No scenes - please create one before adding anything."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -91,5 +91,5 @@ void G4VisCommandSceneIncludeTrajectories::SetNewValue (G4UIcommand* command,
|
||||
pCurrentScene -> AddEndOfEventModel (model);
|
||||
G4cout << "Trajectories will be drawn in scene \""
|
||||
<< currentSceneName << "\"."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VisCommandsViewer.cc,v 1.7.4.1 1999/12/07 20:54:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VisCommandsViewer.cc,v 1.12 2000/01/17 10:29:37 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
|
||||
// /vis/viewer commands - John Allison 25th October 1998
|
||||
|
||||
@@ -18,11 +18,7 @@
|
||||
#include "G4UIcommand.hh"
|
||||
#include "G4UIcmdWithAString.hh"
|
||||
#include "G4ios.hh"
|
||||
#ifdef WIN32
|
||||
#include <strstrea.h>
|
||||
#else
|
||||
#include <strstream.h>
|
||||
#endif
|
||||
#include "g4std/strstream"
|
||||
|
||||
G4VVisCommandViewer::G4VVisCommandViewer () {}
|
||||
|
||||
@@ -38,38 +34,26 @@ G4String G4VVisCommandViewer::ShortName (const G4String& name) {
|
||||
|
||||
void G4VVisCommandViewer::UpdateCandidateLists () {
|
||||
|
||||
const G4SceneHandlerList& sceneHandlerList = fpVisManager -> GetAvailableSceneHandlers ();
|
||||
const G4SceneHandlerList& sceneHandlerList =
|
||||
fpVisManager -> GetAvailableSceneHandlers ();
|
||||
G4int nHandlers = sceneHandlerList.entries ();
|
||||
|
||||
fViewerNameList = G4String ();
|
||||
G4String viewerNameList;
|
||||
for (int iHandler = 0; iHandler < nHandlers; iHandler++) {
|
||||
G4VSceneHandler* sceneHandler = sceneHandlerList [iHandler];
|
||||
const G4ViewerList& viewerList = sceneHandler -> GetViewerList ();
|
||||
for (int iViewer = 0; iViewer < viewerList.entries (); iViewer++) {
|
||||
const G4String& viewerName = viewerList [iViewer] -> GetName ();
|
||||
fViewerNameList += ShortName (viewerName) + " ";
|
||||
viewerNameList += ShortName (viewerName) + " ";
|
||||
}
|
||||
}
|
||||
fViewerNameList = fViewerNameList.strip ();
|
||||
|
||||
if (fpCommandViewerRemove) {
|
||||
fpCommandViewerRemove -> GetParameter (0) ->
|
||||
SetParameterCandidates (fViewerNameList);
|
||||
}
|
||||
|
||||
if (fpCommandViewerSelect) {
|
||||
fpCommandViewerSelect -> GetParameter (0) ->
|
||||
SetParameterCandidates (fViewerNameList);
|
||||
}
|
||||
|
||||
if (fpCommandViewerUpdate) {
|
||||
fpCommandViewerUpdate -> GetParameter (0) ->
|
||||
SetParameterCandidates (fViewerNameList);
|
||||
viewerNameList = viewerNameList.strip ();
|
||||
viewerNameCommandsIterator i;
|
||||
for (i = viewerNameCommands.begin (); i != viewerNameCommands.end (); ++i) {
|
||||
(*i)->GetParameter (0) -> SetParameterCandidates (viewerNameList);
|
||||
}
|
||||
}
|
||||
|
||||
G4String G4VVisCommandViewer::fViewerNameList;
|
||||
|
||||
////////////// /vis/viewer/create ///////////////////////////////////////
|
||||
|
||||
G4VisCommandViewerCreate::G4VisCommandViewerCreate (): fId (0) {
|
||||
@@ -95,7 +79,7 @@ G4VisCommandViewerCreate::G4VisCommandViewerCreate (): fId (0) {
|
||||
parameter = new G4UIparameter ("viewer-name", 's', omitable = true);
|
||||
parameter -> SetCurrentAsDefault (true);
|
||||
fpCommand -> SetParameter (parameter);
|
||||
fpCommandViewerCreate = fpCommand;
|
||||
viewerNameCommands.push_back (fpCommand);
|
||||
}
|
||||
|
||||
G4VisCommandViewerCreate::~G4VisCommandViewerCreate () {
|
||||
@@ -105,7 +89,7 @@ G4VisCommandViewerCreate::~G4VisCommandViewerCreate () {
|
||||
G4String G4VisCommandViewerCreate::NextName () {
|
||||
const int charLength = 100;
|
||||
char nextName [charLength];
|
||||
ostrstream ost (nextName, charLength);
|
||||
G4std::ostrstream ost (nextName, charLength);
|
||||
G4VSceneHandler* sceneHandler = fpVisManager -> GetCurrentSceneHandler ();
|
||||
ost << "viewer-" << fId << " (";
|
||||
if (sceneHandler) {
|
||||
@@ -114,7 +98,7 @@ G4String G4VisCommandViewerCreate::NextName () {
|
||||
else {
|
||||
ost << "no_scene_handlers";
|
||||
}
|
||||
ost << ")" << ends;
|
||||
ost << ")" << G4std::ends;
|
||||
return nextName;
|
||||
}
|
||||
|
||||
@@ -151,7 +135,7 @@ G4String G4VisCommandViewerCreate::GetCurrentValue (G4UIcommand* command) {
|
||||
void G4VisCommandViewerCreate::SetNewValue (G4UIcommand* command,
|
||||
G4String newValue) {
|
||||
G4String sceneHandlerName, newName;
|
||||
istrstream is ((char*)newValue.data());
|
||||
G4std::istrstream is ((char*)newValue.data());
|
||||
is >> sceneHandlerName;
|
||||
// Now need to handle the possibility that the second string
|
||||
// contains embedded blanks within quotation marks.
|
||||
@@ -165,7 +149,7 @@ void G4VisCommandViewerCreate::SetNewValue (G4UIcommand* command,
|
||||
if (nHandlers <= 0) {
|
||||
G4cout << "G4VisCommandViewerCreate::SetNewValue: no scene handlers."
|
||||
"\n Create a scene handler with \"/vis/sceneHandler/create\""
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -179,7 +163,7 @@ void G4VisCommandViewerCreate::SetNewValue (G4UIcommand* command,
|
||||
// This shouldn't happen!!!!!!
|
||||
G4cerr << "G4VisCommandViewerCreate::SetNewValue:"
|
||||
" invalid scene handler specified."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -202,7 +186,7 @@ void G4VisCommandViewerCreate::SetNewValue (G4UIcommand* command,
|
||||
const G4ViewerList& viewerList = sceneHandler -> GetViewerList ();
|
||||
for (int iViewer = 0; iViewer < viewerList.entries (); iViewer++) {
|
||||
if (viewerList [iViewer] -> GetName () == newName ) {
|
||||
G4cout << "Viewer \"" << newName << "\" already exists." << endl;
|
||||
G4cout << "Viewer \"" << newName << "\" already exists." << G4endl;
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -210,7 +194,7 @@ void G4VisCommandViewerCreate::SetNewValue (G4UIcommand* command,
|
||||
|
||||
// Create viewer.
|
||||
fpVisManager -> CreateViewer (newName);
|
||||
G4cout << "New viewer \"" << newName << "\" created." << endl;
|
||||
G4cout << "New viewer \"" << newName << "\" created." << G4endl;
|
||||
|
||||
UpdateCandidateLists ();
|
||||
}
|
||||
@@ -251,7 +235,7 @@ void G4VisCommandViewerList::SetNewValue (G4UIcommand* command,
|
||||
G4String newValue) {
|
||||
G4String name;
|
||||
G4int verbosity;
|
||||
istrstream is ((char*)newValue.data());
|
||||
G4std::istrstream is ((char*)newValue.data());
|
||||
is >> name >> verbosity;
|
||||
G4String shortName = ShortName (name);
|
||||
|
||||
@@ -276,7 +260,7 @@ void G4VisCommandViewerList::SetNewValue (G4UIcommand* command,
|
||||
<< "\", scene \"" << pScene -> GetName () << "\":";
|
||||
G4int nViewers = viewerList.entries ();
|
||||
if (nViewers == 0) {
|
||||
G4cout << "\n No viewers for this scene handler." << endl;
|
||||
G4cout << "\n No viewers for this scene handler." << G4endl;
|
||||
}
|
||||
else {
|
||||
for (int iViewer = 0; iViewer < nViewers; iViewer++) {
|
||||
@@ -300,12 +284,12 @@ void G4VisCommandViewerList::SetNewValue (G4UIcommand* command,
|
||||
G4cout << "\n " << *thisViewer << '\n';
|
||||
}
|
||||
}
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
if (!foundCurrent) {
|
||||
G4cout << "No valid current viewer - please create or select one." << endl;
|
||||
G4cout << "No valid current viewer - please create or select one." << G4endl;
|
||||
}
|
||||
|
||||
if (!found) {
|
||||
@@ -313,10 +297,87 @@ void G4VisCommandViewerList::SetNewValue (G4UIcommand* command,
|
||||
if (name != "all") {
|
||||
G4cout << " of name \"" << name << "\"";
|
||||
}
|
||||
G4cout << " found." << endl;
|
||||
G4cout << " found." << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
////////////// /vis/viewer/refresh ///////////////////////////////////////
|
||||
|
||||
G4VisCommandViewerRefresh::G4VisCommandViewerRefresh () {
|
||||
G4bool omitable, currentAsDefault;
|
||||
fpCommand = new G4UIcmdWithAString ("/vis/viewer/refresh", this);
|
||||
fpCommand -> SetGuidance ("/vis/viewer/refresh [<viewer-name>]");
|
||||
fpCommand -> SetGuidance
|
||||
("Refreshes viewer.");
|
||||
fpCommand -> SetGuidance ("Viewer becomes current.");
|
||||
fpCommand -> SetGuidance
|
||||
("Specify viewer by name (\"/vis/viewer/list\""
|
||||
"\n to see possibilities).");
|
||||
fpCommand -> SetParameterName ("viewer-name",
|
||||
omitable = true,
|
||||
currentAsDefault = true);
|
||||
viewerNameCommands.push_back (fpCommand);
|
||||
}
|
||||
|
||||
G4VisCommandViewerRefresh::~G4VisCommandViewerRefresh () {
|
||||
delete fpCommand;
|
||||
}
|
||||
|
||||
G4String G4VisCommandViewerRefresh::GetCurrentValue
|
||||
(G4UIcommand* command) {
|
||||
G4VViewer* viewer = fpVisManager -> GetCurrentViewer ();
|
||||
if (viewer) {
|
||||
return viewer -> GetName ();
|
||||
}
|
||||
else {
|
||||
return "none";
|
||||
}
|
||||
}
|
||||
|
||||
void G4VisCommandViewerRefresh::SetNewValue (G4UIcommand* command,
|
||||
G4String newValue) {
|
||||
G4String& refreshName = newValue;
|
||||
G4String refreshShortName = ShortName (refreshName);
|
||||
|
||||
G4VViewer* viewer = fpVisManager -> GetCurrentViewer ();
|
||||
G4bool found = false;
|
||||
if (viewer && refreshShortName == ShortName (viewer -> GetName ())) {
|
||||
found = true;
|
||||
}
|
||||
else {
|
||||
const G4SceneHandlerList& sceneHandlerList =
|
||||
fpVisManager -> GetAvailableSceneHandlers ();
|
||||
G4int nHandlers = sceneHandlerList.entries ();
|
||||
for (G4int iHandler = 0; iHandler < nHandlers; iHandler++) {
|
||||
G4VSceneHandler* sceneHandler = sceneHandlerList [iHandler];
|
||||
const G4ViewerList& viewerList = sceneHandler -> GetViewerList ();
|
||||
for (G4int iViewer = 0; iViewer < viewerList.entries (); iViewer++) {
|
||||
viewer = viewerList [iViewer];
|
||||
if (refreshShortName == ShortName (viewer -> GetName ())) {
|
||||
found = true;
|
||||
fpVisManager -> SetCurrentViewer (viewer);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (found) break;
|
||||
}
|
||||
}
|
||||
|
||||
G4cout << "Viewer \"" << refreshName << "\"";
|
||||
if (found) {
|
||||
viewer -> ClearView ();
|
||||
viewer -> SetViewParameters (fpVisManager -> GetCurrentViewParameters ());
|
||||
viewer -> DrawView ();
|
||||
viewer -> ShowView ();
|
||||
G4cout << " refreshed.";
|
||||
}
|
||||
else {
|
||||
G4cout << " not found - \"/vis/viewer/list\""
|
||||
"\n to see possibilities.";
|
||||
}
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
////////////// /vis/viewer/remove ///////////////////////////////////////
|
||||
|
||||
G4VisCommandViewerRemove::G4VisCommandViewerRemove () {
|
||||
@@ -330,7 +391,7 @@ G4VisCommandViewerRemove::G4VisCommandViewerRemove () {
|
||||
fpCommand -> SetParameterName ("viewer-name",
|
||||
omitable = false,
|
||||
currentAsDefault = true);
|
||||
fpCommandViewerRemove = fpCommand;
|
||||
viewerNameCommands.push_back (fpCommand);
|
||||
}
|
||||
|
||||
G4VisCommandViewerRemove::~G4VisCommandViewerRemove () {
|
||||
@@ -383,17 +444,17 @@ void G4VisCommandViewerRemove::SetNewValue (G4UIcommand* command,
|
||||
if (!found) {
|
||||
G4cout << "Viewer \"" << removeName
|
||||
<< "\" not found - \"/vis/viewer/list\" to see possibilities."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
G4cout << "Viewer \"" << removeName << "\" removed." << endl;
|
||||
G4cout << "Viewer \"" << removeName << "\" removed." << G4endl;
|
||||
if (removeShortName == currentShortName) {
|
||||
fpVisManager -> DeleteCurrentViewer ();
|
||||
}
|
||||
else {
|
||||
sceneHandler -> SetViewerList ().remove (viewer);
|
||||
G4cout << "Current viewer unchanged." << endl;
|
||||
G4cout << "Current viewer unchanged." << G4endl;
|
||||
}
|
||||
|
||||
UpdateCandidateLists ();
|
||||
@@ -412,7 +473,7 @@ G4VisCommandViewerSelect::G4VisCommandViewerSelect () {
|
||||
fpCommand -> SetParameterName ("viewer-name",
|
||||
omitable = true,
|
||||
currentAsDefault = true);
|
||||
fpCommandViewerSelect = fpCommand;
|
||||
viewerNameCommands.push_back (fpCommand);
|
||||
}
|
||||
|
||||
G4VisCommandViewerSelect::~G4VisCommandViewerSelect () {
|
||||
@@ -460,28 +521,32 @@ void G4VisCommandViewerSelect::SetNewValue (G4UIcommand* command,
|
||||
G4VViewer* currentViewer = fpVisManager -> GetCurrentViewer ();
|
||||
if (currentViewer &&
|
||||
ShortName (currentViewer -> GetName ()) == selectShortName) {
|
||||
G4cout << " already selected." << endl;
|
||||
G4cout << " already selected." << G4endl;
|
||||
}
|
||||
else {
|
||||
G4cout << " being selected." << endl;
|
||||
G4cout << " being selected." << G4endl;
|
||||
fpVisManager -> SetCurrentViewer (viewer);
|
||||
}
|
||||
}
|
||||
else {
|
||||
G4cout << " not found - \"/vis/viewer/list\""
|
||||
"\n to see possibilities."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
////////////// /vis/viewer/update ///////////////////////////////////////
|
||||
////////////// /vis/viewer/show ///////////////////////////////////////
|
||||
// Synonym (deprecated): /vis/viewer/update ///////////////////////////
|
||||
|
||||
G4VisCommandViewerUpdate::G4VisCommandViewerUpdate () {
|
||||
G4VisCommandViewerShow::G4VisCommandViewerShow () {
|
||||
G4bool omitable, currentAsDefault;
|
||||
fpCommand = new G4UIcmdWithAString ("/vis/viewer/update", this);
|
||||
fpCommand -> SetGuidance ("/vis/viewer/update [<viewer-name>]");
|
||||
fpCommand = new G4UIcmdWithAString ("/vis/viewer/show", this);
|
||||
fpCommand -> SetGuidance ("/vis/viewer/show [<viewer-name>]");
|
||||
fpCommand -> SetGuidance
|
||||
("Updates viewer (necessary for graphical database post-processing.");
|
||||
("Triggers graphical database post-processing for viewers"
|
||||
" using that technique.");
|
||||
fpCommand -> SetGuidance
|
||||
("For such viewers the view only becomes visible with this command.");
|
||||
fpCommand -> SetGuidance ("Viewer becomes current.");
|
||||
fpCommand -> SetGuidance
|
||||
("Specify viewer by name (\"/vis/viewer/list\""
|
||||
@@ -489,14 +554,22 @@ G4VisCommandViewerUpdate::G4VisCommandViewerUpdate () {
|
||||
fpCommand -> SetParameterName ("viewer-name",
|
||||
omitable = true,
|
||||
currentAsDefault = true);
|
||||
fpCommandViewerUpdate = fpCommand;
|
||||
viewerNameCommands.push_back (fpCommand);
|
||||
fpCommand1 = new G4UIcmdWithAString ("/vis/viewer/update", this);
|
||||
fpCommand1 -> SetGuidance
|
||||
("Synonym for \"/vis/viewer/show\" - see that command for guidance.");
|
||||
fpCommand1 -> SetParameterName ("viewer-name",
|
||||
omitable = true,
|
||||
currentAsDefault = true);
|
||||
viewerNameCommands.push_back (fpCommand1);
|
||||
}
|
||||
|
||||
G4VisCommandViewerUpdate::~G4VisCommandViewerUpdate () {
|
||||
G4VisCommandViewerShow::~G4VisCommandViewerShow () {
|
||||
delete fpCommand;
|
||||
delete fpCommand1;
|
||||
}
|
||||
|
||||
G4String G4VisCommandViewerUpdate::GetCurrentValue
|
||||
G4String G4VisCommandViewerShow::GetCurrentValue
|
||||
(G4UIcommand* command) {
|
||||
G4VViewer* viewer = fpVisManager -> GetCurrentViewer ();
|
||||
if (viewer) {
|
||||
@@ -507,15 +580,17 @@ G4String G4VisCommandViewerUpdate::GetCurrentValue
|
||||
}
|
||||
}
|
||||
|
||||
void G4VisCommandViewerUpdate::SetNewValue (G4UIcommand* command,
|
||||
void G4VisCommandViewerShow::SetNewValue (G4UIcommand* command,
|
||||
G4String newValue) {
|
||||
G4String& updateName = newValue;
|
||||
G4String updateShortName = ShortName (updateName);
|
||||
G4String& showName = newValue;
|
||||
G4String showShortName = ShortName (showName);
|
||||
|
||||
G4VViewer* viewer = fpVisManager -> GetCurrentViewer ();
|
||||
G4bool found = true;
|
||||
if (updateShortName != ShortName (viewer -> GetName ())) {
|
||||
found = false;
|
||||
G4bool found = false;
|
||||
if (viewer && showShortName == ShortName (viewer -> GetName ())) {
|
||||
found = true;
|
||||
}
|
||||
else {
|
||||
const G4SceneHandlerList& sceneHandlerList =
|
||||
fpVisManager -> GetAvailableSceneHandlers ();
|
||||
G4int nHandlers = sceneHandlerList.entries ();
|
||||
@@ -524,12 +599,9 @@ void G4VisCommandViewerUpdate::SetNewValue (G4UIcommand* command,
|
||||
const G4ViewerList& viewerList = sceneHandler -> GetViewerList ();
|
||||
for (G4int iViewer = 0; iViewer < viewerList.entries (); iViewer++) {
|
||||
viewer = viewerList [iViewer];
|
||||
if (updateShortName == ShortName (viewer -> GetName ())) {
|
||||
if (showShortName == ShortName (viewer -> GetName ())) {
|
||||
found = true;
|
||||
fpVisManager -> SetCurrentViewer (viewer);
|
||||
fpVisManager -> SetCurrentSceneHandler (sceneHandler);
|
||||
fpVisManager -> SetCurrentGraphicsSystem
|
||||
(sceneHandler -> GetGraphicsSystem ());
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -537,14 +609,14 @@ void G4VisCommandViewerUpdate::SetNewValue (G4UIcommand* command,
|
||||
}
|
||||
}
|
||||
|
||||
G4cout << "Viewer \"" << updateName << "\"";
|
||||
G4cout << "Viewer \"" << showName << "\"";
|
||||
if (found) {
|
||||
viewer -> ShowView ();
|
||||
G4cout << " updated.";
|
||||
G4cout << " post-processing triggered.";
|
||||
}
|
||||
else {
|
||||
G4cout << " not found - \"/vis/viewer/list\""
|
||||
"\n to see possibilities.";
|
||||
}
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VisFeaturesOfDAWNFILE.cc,v 1.2.8.1 1999/12/07 20:54:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VisFeaturesOfDAWNFILE.cc,v 1.3 1999/12/15 14:54:26 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
#include "G4VisFeaturesOfDAWNFILE.hh"
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VisFeaturesOfFukuiRenderer.cc,v 1.2.8.1 1999/12/07 20:54:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VisFeaturesOfFukuiRenderer.cc,v 1.3 1999/12/15 14:54:26 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VisFeaturesOfOpenGL.cc,v 1.2.8.1 1999/12/07 20:54:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VisFeaturesOfOpenGL.cc,v 1.3 1999/12/15 14:54:26 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VisFeaturesOfOpenInventor.cc,v 1.2.8.1 1999/12/07 20:54:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VisFeaturesOfOpenInventor.cc,v 1.3 1999/12/15 14:54:26 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VisManMessCamera.cc,v 1.3.8.1 1999/12/07 20:54:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VisManMessCamera.cc,v 1.4 1999/12/15 14:54:26 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// GEANT4 Visualization Manager Messenger - John Allison 22nd July 1996.
|
||||
@@ -190,12 +190,12 @@ void G4VisManMessenger::DoCommandCamera (const G4String& commandPath,
|
||||
if (ViewValid ()) {
|
||||
G4double in;
|
||||
const char* aString = newValues;
|
||||
istrstream is((char*) aString) ; is >> in;
|
||||
G4cout << "Dolly " << in << " in." << endl;
|
||||
G4std::istrstream is((char*) aString) ; is >> in;
|
||||
G4cout << "Dolly " << in << " in." << G4endl;
|
||||
fpVMan -> SetCurrentViewParameters ().IncrementDolly (in);
|
||||
if (fpVMan -> GetVerboseLevel () > 0) {
|
||||
G4cout << "Dolly distance changed to "
|
||||
<< fpVMan -> GetCurrentViewParameters ().GetDolly () << endl;
|
||||
<< fpVMan -> GetCurrentViewParameters ().GetDolly () << G4endl;
|
||||
if (fpVMan -> GetVerboseLevel () > 1) {
|
||||
fpVMan -> PrintCurrentView ();
|
||||
}
|
||||
@@ -210,7 +210,7 @@ void G4VisManMessenger::DoCommandCamera (const G4String& commandPath,
|
||||
// Recalculate projection matrices, etc.
|
||||
pView -> SetView ();
|
||||
}
|
||||
G4cout << "Issue Draw or refresh to see effect." << endl;
|
||||
G4cout << "Issue Draw or refresh to see effect." << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,7 +220,7 @@ void G4VisManMessenger::DoCommandCamera (const G4String& commandPath,
|
||||
G4int nFrames;
|
||||
G4double dbeta;
|
||||
const char* aString = newValues;
|
||||
istrstream is((char*) aString) ; is >> nFrames >> dbeta;
|
||||
G4std::istrstream is((char*) aString) ; is >> nFrames >> dbeta;
|
||||
dbeta = dbeta * deg;
|
||||
fpVMan -> SetCurrentViewParameters ().SetLightsMoveWithCamera (false);
|
||||
for (int i = 0; i < nFrames; i++) {
|
||||
@@ -237,13 +237,13 @@ void G4VisManMessenger::DoCommandCamera (const G4String& commandPath,
|
||||
if (ViewValid ()) {
|
||||
G4double right, up;
|
||||
const char* aString = newValues;
|
||||
istrstream is((char*) aString);is >> right >> up;
|
||||
G4cout << "Pan " << right << " right, " << up << " up." << endl;
|
||||
G4std::istrstream is((char*) aString);is >> right >> up;
|
||||
G4cout << "Pan " << right << " right, " << up << " up." << G4endl;
|
||||
fpVMan -> SetCurrentViewParameters ().Pan (right, up);
|
||||
if (fpVMan -> GetVerboseLevel () > 0) {
|
||||
G4cout << "Current target point changed to "
|
||||
<< fpVMan -> GetCurrentViewParameters ().GetCurrentTargetPoint ()
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
if (fpVMan -> GetVerboseLevel () > 1) {
|
||||
fpVMan -> PrintCurrentView ();
|
||||
}
|
||||
@@ -258,7 +258,7 @@ void G4VisManMessenger::DoCommandCamera (const G4String& commandPath,
|
||||
// Recalculate projection matrices, etc.
|
||||
pView -> SetView ();
|
||||
}
|
||||
G4cout << "Issue Draw or refresh to see effect." << endl;
|
||||
G4cout << "Issue Draw or refresh to see effect." << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -267,14 +267,14 @@ void G4VisManMessenger::DoCommandCamera (const G4String& commandPath,
|
||||
G4int iStyle;
|
||||
G4double fieldHalfAngleDegrees;
|
||||
const char* aString = newValues;
|
||||
istrstream is((char*) aString) ; is >> iStyle >> fieldHalfAngleDegrees;
|
||||
G4std::istrstream is((char*) aString) ; is >> iStyle >> fieldHalfAngleDegrees;
|
||||
if (iStyle < 0 || iStyle > 1) {
|
||||
G4cout << "Available representation styles:";
|
||||
G4cout << "\n 0) orthogonal";
|
||||
G4cout << "\n 1) perspective (also specify field half angle in degrees)";
|
||||
G4cout << "\nChoose by specifying integer parameter and field half angle"
|
||||
" (if relevant).";
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
else {
|
||||
switch (iStyle) {
|
||||
@@ -282,18 +282,18 @@ void G4VisManMessenger::DoCommandCamera (const G4String& commandPath,
|
||||
case 0:
|
||||
fpVMan -> SetCurrentViewParameters ().SetFieldHalfAngle (0.);
|
||||
if (fpVMan -> GetVerboseLevel () > 0) {
|
||||
G4cout << "\nOrthogonal projection set." << endl;
|
||||
G4cout << "\nOrthogonal projection set." << G4endl;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
if (fieldHalfAngleDegrees == 0.0) {
|
||||
fieldHalfAngleDegrees = 30.;
|
||||
G4cout << "Field half angle defaulted to "
|
||||
<< fieldHalfAngleDegrees << " degrees." << endl;
|
||||
<< fieldHalfAngleDegrees << " degrees." << G4endl;
|
||||
}
|
||||
if (fieldHalfAngleDegrees > 89.5 || fieldHalfAngleDegrees <= 0.0) {
|
||||
G4cout << "Field half angle should be 0 < angle <= 89.5 degrees.";
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
else {
|
||||
fpVMan -> SetCurrentViewParameters ().
|
||||
@@ -303,7 +303,7 @@ void G4VisManMessenger::DoCommandCamera (const G4String& commandPath,
|
||||
G4cout << "\nField half angle set to " << fieldHalfAngleDegrees
|
||||
<< " degrees" << " ("
|
||||
<< fpVMan -> GetCurrentViewParameters ().GetFieldHalfAngle ()
|
||||
<< " radians)." << endl;
|
||||
<< " radians)." << G4endl;
|
||||
if (fpVMan -> GetVerboseLevel () > 1) {
|
||||
fpVMan -> PrintCurrentView ();
|
||||
}
|
||||
@@ -323,7 +323,7 @@ void G4VisManMessenger::DoCommandCamera (const G4String& commandPath,
|
||||
// Recalculate projection matrices, etc.
|
||||
pView -> SetView ();
|
||||
}
|
||||
G4cout << "Issue Draw or refresh to see effect." << endl;
|
||||
G4cout << "Issue Draw or refresh to see effect." << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -333,7 +333,7 @@ void G4VisManMessenger::DoCommandCamera (const G4String& commandPath,
|
||||
G4int nFrames;
|
||||
G4double dbeta;
|
||||
const char* aString = newValues;
|
||||
istrstream is((char*) aString) ; is >> nFrames >> dbeta;
|
||||
G4std::istrstream is((char*) aString) ; is >> nFrames >> dbeta;
|
||||
dbeta = dbeta * deg;
|
||||
fpVMan -> SetCurrentViewParameters ().SetLightsMoveWithCamera (true);
|
||||
for (int i = 0; i < nFrames; i++) {
|
||||
@@ -349,7 +349,7 @@ void G4VisManMessenger::DoCommandCamera (const G4String& commandPath,
|
||||
if (commandPath == "/vis~/camera/viewpoint") {
|
||||
G4double theta, phi ;
|
||||
const char* aString = newValues;
|
||||
istrstream is((char*) aString) ; is >> theta >> phi;
|
||||
G4std::istrstream is((char*) aString) ; is >> theta >> phi;
|
||||
theta = theta * deg;
|
||||
phi = phi * deg;
|
||||
G4double x = sin (theta) * cos (phi);
|
||||
@@ -359,10 +359,10 @@ void G4VisManMessenger::DoCommandCamera (const G4String& commandPath,
|
||||
fpVMan -> SetCurrentViewParameters().SetViewAndLights (vp);
|
||||
const G4ViewParameters& viewParams = fpVMan -> GetCurrentViewParameters ();
|
||||
if (fpVMan -> GetVerboseLevel () > 0) {
|
||||
G4cout << "Viewpoint direction set to " << vp << endl;
|
||||
G4cout << "Viewpoint direction set to " << vp << G4endl;
|
||||
if (viewParams.GetLightsMoveWithCamera ()) {
|
||||
G4cout << "Lightpoint direction set to "
|
||||
<< viewParams.GetLightpointDirection () << endl;
|
||||
<< viewParams.GetLightpointDirection () << G4endl;
|
||||
}
|
||||
if (fpVMan -> GetVerboseLevel () > 1) {
|
||||
fpVMan -> PrintCurrentView ();
|
||||
@@ -380,17 +380,17 @@ void G4VisManMessenger::DoCommandCamera (const G4String& commandPath,
|
||||
// Recalculate projection matrices, etc.
|
||||
pView -> SetView ();
|
||||
}
|
||||
G4cout << "Issue Draw or refresh to see effect." << endl;
|
||||
G4cout << "Issue Draw or refresh to see effect." << G4endl;
|
||||
}
|
||||
|
||||
/////////////////////////////////////// /vis~/camera/window_size_hint ////
|
||||
if (commandPath == "/vis~/camera/window_size_hint") {
|
||||
G4int size;
|
||||
const char* aString = newValues;
|
||||
istrstream is((char*) aString) ; is >> size;
|
||||
G4std::istrstream is((char*) aString) ; is >> size;
|
||||
fpVMan -> SetCurrentViewParameters ().SetWindowSizeHint (size, size);
|
||||
if (fpVMan -> GetVerboseLevel () > 0) {
|
||||
G4cout << "Window size hint set to " << size << " x " << size << endl;
|
||||
G4cout << "Window size hint set to " << size << " x " << size << G4endl;
|
||||
if (fpVMan -> GetVerboseLevel () > 1) {
|
||||
fpVMan -> PrintCurrentView ();
|
||||
}
|
||||
@@ -402,11 +402,11 @@ void G4VisManMessenger::DoCommandCamera (const G4String& commandPath,
|
||||
if (ViewValid ()) {
|
||||
G4double zoomBy;
|
||||
const char* aString = newValues;
|
||||
istrstream is((char*) aString) ; is >> zoomBy;
|
||||
G4std::istrstream is((char*) aString) ; is >> zoomBy;
|
||||
fpVMan -> SetCurrentViewParameters ().MultiplyZoomFactor (zoomBy);
|
||||
if (fpVMan -> GetVerboseLevel () > 0) {
|
||||
G4cout << "Zoom factor changed to "
|
||||
<< fpVMan -> GetCurrentViewParameters ().GetZoomFactor () << endl;
|
||||
<< fpVMan -> GetCurrentViewParameters ().GetZoomFactor () << G4endl;
|
||||
if (fpVMan -> GetVerboseLevel () > 1) {
|
||||
fpVMan -> PrintCurrentView ();
|
||||
}
|
||||
@@ -421,7 +421,7 @@ void G4VisManMessenger::DoCommandCamera (const G4String& commandPath,
|
||||
// Recalculate projection matrices, etc.
|
||||
pView -> SetView ();
|
||||
}
|
||||
G4cout << "Issue Draw or refresh to see effect." << endl;
|
||||
G4cout << "Issue Draw or refresh to see effect." << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VisManMessCreateView.cc,v 1.4.2.1 1999/12/07 20:54:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VisManMessCreateView.cc,v 1.5 1999/12/15 14:54:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// GEANT4 Visualization Manager Messenger - John Allison 22nd July 1996.
|
||||
@@ -65,7 +65,7 @@ void G4VisManMessenger::DoCommandCreateView (const G4String& commandPath,
|
||||
if (commandPath == "/vis~/create_view/new_graphics_system") {
|
||||
G4String selector;
|
||||
const char* aString = newValues;
|
||||
istrstream is ((char*) aString) ; is >> selector;
|
||||
G4std::istrstream is ((char*) aString) ; is >> selector;
|
||||
const G4GraphicsSystemList& gsl = fpVMan -> GetAvailableGraphicsSystems ();
|
||||
int nSystems = gsl.entries ();
|
||||
if (nSystems > 0) {
|
||||
@@ -135,14 +135,14 @@ void G4VisManMessenger::DoCommandCreateView (const G4String& commandPath,
|
||||
G4cout <<
|
||||
"\nChoose by specifying class name or nickname, if any, or help.";
|
||||
}
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
if (iGS >=0 && iGS < nSystems) {
|
||||
// Valid index. Create view.
|
||||
G4VGraphicsSystem* pSystem = gsl [iGS];;
|
||||
fpVMan -> SetCurrentGraphicsSystemAndCreateViewer (pSystem);
|
||||
if (fpVMan -> GetVerboseLevel () > 0) {
|
||||
G4cout << "Graphics system set to " << pSystem -> GetName () << endl;
|
||||
G4cout << "Graphics system set to " << pSystem -> GetName () << G4endl;
|
||||
if (fpVMan -> GetVerboseLevel () > 1) {
|
||||
fpVMan -> PrintCurrentSystem ();
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VisManMessDraw.cc,v 1.4.8.1 1999/12/07 20:54:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VisManMessDraw.cc,v 1.5 1999/12/15 14:54:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// GEANT4 Visualization Manager Messenger - John Allison 22nd July 1996.
|
||||
@@ -147,7 +147,7 @@ void G4VisManMessenger::DoCommandDraw (const G4String& commandPath,
|
||||
G4double length ;
|
||||
G4String unitString;
|
||||
const char* aString = newValues;
|
||||
istrstream is((char*) aString);
|
||||
G4std::istrstream is((char*) aString);
|
||||
is >> x0 >> y0 >> z0 >> length >> unitString;
|
||||
|
||||
G4double unit = G4UnitDefinition::GetValueOf (unitString);
|
||||
@@ -195,7 +195,7 @@ void G4VisManMessenger::DoCommandDraw (const G4String& commandPath,
|
||||
G4double font_size, x_offset, y_offset;
|
||||
G4String unitString, textString;
|
||||
const char* aString = newValues;
|
||||
istrstream is((char*) aString);
|
||||
G4std::istrstream is((char*) aString);
|
||||
is >> x >> y >> z >> unitString
|
||||
>> font_size >> x_offset >> y_offset >> textString;
|
||||
G4double unit = G4UnitDefinition::GetValueOf (unitString);
|
||||
@@ -212,24 +212,24 @@ void G4VisManMessenger::DoCommandDraw (const G4String& commandPath,
|
||||
// Find physical_volume.
|
||||
G4String name;
|
||||
const char* aString = newValues;
|
||||
istrstream is((char*) aString) ; is >> name;
|
||||
G4std::istrstream is((char*) aString) ; is >> name;
|
||||
|
||||
G4cout << "/vis~/draw/volume: requested name is " << name;
|
||||
G4cout << "\n...but this command is \"UNDER DEVELOPMENT\"!";
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
////////////////////////// /vis~/draw/ghosts /////
|
||||
if (commandPath == "/vis~/draw/ghosts") {
|
||||
// preliminaries
|
||||
G4VisManager* theVisManager;
|
||||
if(!(theVisManager= G4VisManager::GetInstance())) {
|
||||
G4cout<< "grafic system not yet avaliable." << endl;
|
||||
G4cout<< "grafic system not yet avaliable." << G4endl;
|
||||
return;
|
||||
}
|
||||
G4VGlobalFastSimulationManager* theGlobalFastSimulationManager;
|
||||
if(!(theGlobalFastSimulationManager =
|
||||
G4VGlobalFastSimulationManager::GetConcreteInstance ())){
|
||||
G4cout<< "WARNING: none G4GlobalFastSimulationManager" << endl;
|
||||
G4cout<< "WARNING: none G4GlobalFastSimulationManager" << G4endl;
|
||||
return;
|
||||
}
|
||||
G4ParticleTable* theParticleTable=G4ParticleTable::GetParticleTable();
|
||||
@@ -246,13 +246,13 @@ void G4VisManMessenger::DoCommandDraw (const G4String& commandPath,
|
||||
currentScene -> AddRunDurationModel
|
||||
(new G4FlavoredParallelWorldModel (CurrentFlavoredWorld));
|
||||
G4cout << "Ghosts added to the Scene, refresh the view to see it."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
return;
|
||||
}
|
||||
G4ParticleDefinition* currentParticle =
|
||||
theParticleTable->FindParticle(newValues);
|
||||
if (currentParticle == NULL) {
|
||||
G4cout << newValues << ": not found this particle name!" << endl;
|
||||
G4cout << newValues << ": not found this particle name!" << G4endl;
|
||||
return;
|
||||
}
|
||||
G4VFlavoredParallelWorld* worldForThis;
|
||||
@@ -261,8 +261,8 @@ void G4VisManMessenger::DoCommandDraw (const G4String& commandPath,
|
||||
currentScene -> AddRunDurationModel
|
||||
(new G4FlavoredParallelWorldModel (worldForThis));
|
||||
G4cout << "Ghosts added to the Scene, refresh the view to see it."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
else G4cout << "There are no ghosts for "<<newValues<<endl;
|
||||
else G4cout << "There are no ghosts for "<<newValues<<G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VisManMessExpert.cc,v 1.3.8.1 1999/12/07 20:54:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VisManMessExpert.cc,v 1.4 1999/12/15 14:54:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// GEANT4 Visualization Manager Messenger - John Allison 22nd July 1996.
|
||||
@@ -201,7 +201,7 @@ void G4VisManMessenger::DoCommandExpert (const G4String& commandPath,
|
||||
if (ViewValid ()) {
|
||||
G4double x, y, z, worldSize;
|
||||
const char* aString = newValues;
|
||||
istrstream is((char*) aString); is >> x >> y >> z >> worldSize;
|
||||
G4std::istrstream is((char*) aString); is >> x >> y >> z >> worldSize;
|
||||
G4Circle circle = G4Circle(G4Point3D(x,y,z));
|
||||
circle.SetWorldSize (worldSize);
|
||||
G4Colour c(0.0, 1.0, 1.0 );
|
||||
@@ -217,7 +217,7 @@ void G4VisManMessenger::DoCommandExpert (const G4String& commandPath,
|
||||
G4double x0, y0, z0;
|
||||
G4double x1, y1, z1;
|
||||
const char* aString = newValues;
|
||||
istrstream is((char*) aString); is >> x0 >> y0 >> z0 >> x1 >> y1 >> z1 ;
|
||||
G4std::istrstream is((char*) aString); is >> x0 >> y0 >> z0 >> x1 >> y1 >> z1 ;
|
||||
|
||||
G4Polyline line;
|
||||
G4Colour c(1.0, 0.0, 0.0);
|
||||
@@ -242,7 +242,7 @@ void G4VisManMessenger::DoCommandExpert (const G4String& commandPath,
|
||||
if (ViewValid ()) {
|
||||
G4double x, y, z, worldSize;
|
||||
const char* aString = newValues;
|
||||
istrstream is((char*) aString); is >> x >> y >> z >> worldSize;
|
||||
G4std::istrstream is((char*) aString); is >> x >> y >> z >> worldSize;
|
||||
|
||||
// Draw squares
|
||||
xx = x ; yy = y; zz = z ;
|
||||
@@ -331,7 +331,7 @@ void G4VisManMessenger::DoCommandExpert (const G4String& commandPath,
|
||||
if (ViewValid ()) {
|
||||
int nPolyMarkers, type;
|
||||
const char* aString = newValues;
|
||||
istrstream is((char*) aString) ;is >> nPolyMarkers >> type;
|
||||
G4std::istrstream is((char*) aString) ;is >> nPolyMarkers >> type;
|
||||
G4Polymarker::MarkerType realType;
|
||||
switch (type) {
|
||||
default:
|
||||
@@ -388,7 +388,7 @@ void G4VisManMessenger::DoCommandExpert (const G4String& commandPath,
|
||||
if (ViewValid ()) {
|
||||
int nSpirals;
|
||||
const char* aString = newValues;
|
||||
istrstream is((char*) aString) ; is >> nSpirals;
|
||||
G4std::istrstream is((char*) aString) ; is >> nSpirals;
|
||||
G4int i;
|
||||
G4double a, fa, z, dz, t, dt = M_PI / 50.;
|
||||
G4Polyline line;
|
||||
@@ -419,7 +419,7 @@ void G4VisManMessenger::DoCommandExpert (const G4String& commandPath,
|
||||
if (ViewValid ()) {
|
||||
G4double x, y, z, worldSize;
|
||||
const char* aString = newValues;
|
||||
istrstream is((char*) aString); is >> x >> y >> z >> worldSize;
|
||||
G4std::istrstream is((char*) aString); is >> x >> y >> z >> worldSize;
|
||||
G4Square Square = G4Square (G4Point3D (x, y, z));
|
||||
// Set attributes - begin snippet.
|
||||
Square.SetWorldSize (worldSize);
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VisManMessLights.cc,v 1.3.8.1 1999/12/07 20:54:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VisManMessLights.cc,v 1.4 1999/12/15 14:54:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// GEANT4 Visualization Manager Messenger - John Allison 22nd July 1996.
|
||||
@@ -54,7 +54,7 @@ void G4VisManMessenger::DoCommandLights (const G4String& commandPath,
|
||||
if (commandPath == "/vis~/lights/direction") {
|
||||
G4double theta, phi ;
|
||||
const char* aString = newValues;
|
||||
istrstream is((char*) aString) ; is >> theta >> phi;
|
||||
G4std::istrstream is((char*) aString) ; is >> theta >> phi;
|
||||
theta = theta * deg;
|
||||
phi = phi * deg;
|
||||
G4double x = sin (theta) * cos (phi);
|
||||
@@ -64,7 +64,7 @@ void G4VisManMessenger::DoCommandLights (const G4String& commandPath,
|
||||
G4ViewParameters& viewParams = fpVMan -> SetCurrentViewParameters();
|
||||
viewParams.SetLightpointDirection (lightpointDirection);
|
||||
if (fpVMan -> GetVerboseLevel () > 0) {
|
||||
G4cout << "Lightpoint direction set to " << lightpointDirection << endl;
|
||||
G4cout << "Lightpoint direction set to " << lightpointDirection << G4endl;
|
||||
if (fpVMan -> GetVerboseLevel () > 1) {
|
||||
fpVMan -> PrintCurrentView ();
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VisManMessSet.cc,v 1.5.2.1 1999/12/07 20:54:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VisManMessSet.cc,v 1.6 1999/12/15 14:54:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// GEANT4 Visualization Manager Messenger - John Allison 22nd July 1996.
|
||||
@@ -203,19 +203,19 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
G4String choice;
|
||||
G4double density; // Units in this section are g / cm3 - WARNING!!!
|
||||
const char* t = newValues;
|
||||
istrstream is ((char*)t); is >> choice >> density;
|
||||
G4std::istrstream is ((char*)t); is >> choice >> density;
|
||||
G4int iSelector = -1;
|
||||
if (choice.compareTo ("off",G4String::ignoreCase) == 0) iSelector = 0;
|
||||
if (choice.compareTo ("on",G4String::ignoreCase) == 0) iSelector = 1;
|
||||
if (iSelector < 0) {
|
||||
G4cout << "Choice not recognised (on/off)." << endl;
|
||||
G4cout << "Choice not recognised (on/off)." << G4endl;
|
||||
const G4ViewParameters& getVP = fpVMan -> GetCurrentViewParameters ();
|
||||
G4cout << "Culling by density is currently: ";
|
||||
if (getVP.IsDensityCulling ()) G4cout << "on";
|
||||
else G4cout << "off";
|
||||
G4cout << "\nDensity cut is currently: "
|
||||
<< getVP.GetVisibleDensity () * cm3 / g << " g/cm3.";
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
else {
|
||||
G4ViewParameters& setVP = fpVMan -> SetCurrentViewParameters ();
|
||||
@@ -235,7 +235,7 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
else G4cout << "off";
|
||||
G4cout << "\nDensity cut is now: "
|
||||
<< getVP.GetVisibleDensity () * cm3 / g << " g/cm3.";
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
G4VViewer* pView = fpVMan -> GetCurrentViewer ();
|
||||
if (pView) {
|
||||
// Copy current view parameters into current view.
|
||||
@@ -243,7 +243,7 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
// Recalculate projection matrices, etc.
|
||||
pView -> SetView ();
|
||||
}
|
||||
G4cout << "Issue Draw or refresh to see effect." << endl;
|
||||
G4cout << "Issue Draw or refresh to see effect." << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
if (commandPath == "/vis~/set/drawing_style") {
|
||||
G4int iStyle;
|
||||
const char* aString = newValues;
|
||||
istrstream is((char*) aString) ; is >> iStyle;
|
||||
G4std::istrstream is((char*) aString) ; is >> iStyle;
|
||||
if (iStyle < 0 || iStyle > 3) {
|
||||
G4cout << "Available drawing styles:";
|
||||
G4cout << "\n 0) wireframe";
|
||||
@@ -284,13 +284,13 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
"\n/vis~/set/cull_invisible_objects on/off."
|
||||
"\nTo reset density culling, /vis~/set/cull_by_density off."
|
||||
"\nTo set density culling, e.g., /vis~/set/cull_by_density on 0.01."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
if (fpVMan -> GetVerboseLevel () > 1) {
|
||||
fpVMan -> PrintCurrentView ();
|
||||
}
|
||||
//}
|
||||
G4cout << "\nChoose by specifying integer parameter.";
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
else {
|
||||
G4ViewParameters& setVP = fpVMan -> SetCurrentViewParameters ();
|
||||
@@ -335,7 +335,7 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
"\n/vis~/set/cull_invisible_objects on/off."
|
||||
"\nTo reset density culling, /vis~/set/cull_by_density off."
|
||||
"\nTo set density culling, e.g., /vis~/set/cull_by_density on 0.01."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
if (fpVMan -> GetVerboseLevel () > 1) {
|
||||
fpVMan -> PrintCurrentView ();
|
||||
}
|
||||
@@ -347,7 +347,7 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
// Recalculate projection matrices, etc.
|
||||
pView -> SetView ();
|
||||
}
|
||||
G4cout << "Issue Draw or refresh to see effect." << endl;
|
||||
G4cout << "Issue Draw or refresh to see effect." << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -355,7 +355,7 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
if (commandPath == "/vis~/set/marker_choices") {
|
||||
G4int iChoice;
|
||||
const char* aString = newValues;
|
||||
istrstream is((char*) aString) ; is >> iChoice;
|
||||
G4std::istrstream is((char*) aString) ; is >> iChoice;
|
||||
if (iChoice < 0 || iChoice > 1) {
|
||||
G4cout << "Available marker choices:";
|
||||
G4cout << "\n 0) not hidden";
|
||||
@@ -367,7 +367,7 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
G4cout << " hidden by surfaces.";
|
||||
//}
|
||||
G4cout << "\nChoose by specifying integer parameter.";
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
else {
|
||||
G4ViewParameters& setVP = fpVMan -> SetCurrentViewParameters ();
|
||||
@@ -384,7 +384,7 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
//if (fpVMan -> GetVerboseLevel () > 0) {
|
||||
G4cout << "Marker choice is now: ";
|
||||
if (getVP.IsMarkerNotHidden ()) G4cout << "not";
|
||||
G4cout << " hidden by surfaces." << endl;
|
||||
G4cout << " hidden by surfaces." << G4endl;
|
||||
//}
|
||||
G4VViewer* pView = fpVMan -> GetCurrentViewer ();
|
||||
if (pView) {
|
||||
@@ -393,7 +393,7 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
// Recalculate projection matrices, etc.
|
||||
pView -> SetView ();
|
||||
}
|
||||
G4cout << "Issue Draw or refresh to see effect." << endl;
|
||||
G4cout << "Issue Draw or refresh to see effect." << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -403,20 +403,20 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
G4String choice, unit;
|
||||
G4double x, y, z, nx, ny, nz;
|
||||
const char* t = newValues;
|
||||
istrstream is ((char*)t); is >> choice >> x >> y >> z >> unit
|
||||
G4std::istrstream is ((char*)t); is >> choice >> x >> y >> z >> unit
|
||||
>> nx >> ny >> nz;
|
||||
G4int iSelector = -1;
|
||||
if (choice.compareTo ("off",G4String::ignoreCase) == 0) iSelector = 0;
|
||||
if (choice.compareTo ("on",G4String::ignoreCase) == 0) iSelector = 1;
|
||||
if (iSelector < 0) {
|
||||
G4cout << "Choice not recognised (on/off)." << endl;
|
||||
G4cout << "Choice not recognised (on/off)." << G4endl;
|
||||
const G4ViewParameters& getVP = fpVMan -> GetCurrentViewParameters ();
|
||||
G4cout << "Section drawing is currently: ";
|
||||
if (getVP.IsSection ()) G4cout << "on";
|
||||
else G4cout << "off";
|
||||
G4cout << "\nSection plane is currently: "
|
||||
<< getVP.GetSectionPlane ();
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
else {
|
||||
G4ViewParameters& setVP = fpVMan -> SetCurrentViewParameters ();
|
||||
@@ -440,7 +440,7 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
else G4cout << "off";
|
||||
G4cout << "\nSection plane is now: "
|
||||
<< getVP.GetSectionPlane ();
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
G4VViewer* pView = fpVMan -> GetCurrentViewer ();
|
||||
if (pView) {
|
||||
// Copy current view parameters into current view.
|
||||
@@ -448,7 +448,7 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
// Recalculate projection matrices, etc.
|
||||
pView -> SetView ();
|
||||
}
|
||||
G4cout << "Issue Draw or refresh to see effect." << endl;
|
||||
G4cout << "Issue Draw or refresh to see effect." << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -456,9 +456,9 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
if (commandPath == "/vis~/set/sides") {
|
||||
G4int nSides;
|
||||
const char* t = newValues;
|
||||
istrstream is ((char*)t); is >> nSides;
|
||||
G4std::istrstream is ((char*)t); is >> nSides;
|
||||
G4cout << "Number of sides per circle in polygon approximation is "
|
||||
<< nSides << endl;
|
||||
<< nSides << G4endl;
|
||||
fpVMan -> SetCurrentViewParameters ().SetNoOfSides (nSides);
|
||||
}
|
||||
|
||||
@@ -466,13 +466,13 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
if (commandPath == "/vis~/set/rep_style") {
|
||||
G4int iStyle;
|
||||
const char* aString = newValues;
|
||||
istrstream is((char*) aString) ; is >> iStyle;
|
||||
G4std::istrstream is((char*) aString) ; is >> iStyle;
|
||||
if (iStyle < 0 || iStyle > 1) {
|
||||
G4cout << "Available representation styles:";
|
||||
G4cout << "\n 0) polyhedron";
|
||||
G4cout << "\n 1) NURBS";
|
||||
G4cout << "\nChoose by specifying integer parameter.";
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
else {
|
||||
G4ViewParameters::RepStyle repStyle;
|
||||
@@ -483,7 +483,7 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
}
|
||||
fpVMan -> SetCurrentViewParameters ().SetRepStyle (repStyle);
|
||||
if (fpVMan -> GetVerboseLevel () > 0) {
|
||||
G4cout << "Representation style changed to " << repStyle << endl;
|
||||
G4cout << "Representation style changed to " << repStyle << G4endl;
|
||||
if (fpVMan -> GetVerboseLevel () > 1) {
|
||||
fpVMan -> PrintCurrentView ();
|
||||
}
|
||||
@@ -495,7 +495,7 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
// Recalculate projection matrices, etc.
|
||||
pView -> SetView ();
|
||||
}
|
||||
G4cout << "Issue Draw or refresh to see effect." << endl;
|
||||
G4cout << "Issue Draw or refresh to see effect." << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -505,7 +505,7 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
static G4int nOptions = 2;
|
||||
G4int iSelector;
|
||||
const char* aString = newValues;
|
||||
istrstream is((char*) aString) ; is >> iSelector;
|
||||
G4std::istrstream is((char*) aString) ; is >> iSelector;
|
||||
switch (iState) {
|
||||
case 0:
|
||||
if (iSelector < 0 || iSelector > nOptions) {
|
||||
@@ -513,18 +513,18 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
G4cout << "\n 0) reset selection algorithm";
|
||||
G4cout << "\n 1) select physical volume";
|
||||
G4cout << "\nChoose by specifying integer parameter.";
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
else {
|
||||
switch (iSelector) {
|
||||
default:
|
||||
case 0:
|
||||
G4cout << "Resetting from state " << iState << endl;
|
||||
G4cout << "Resetting from state " << iState << G4endl;
|
||||
iState = 0; nOptions = 2;
|
||||
break;
|
||||
case 1:
|
||||
G4cout << "Option " << iSelector
|
||||
<< " selected from state " << iState << endl;
|
||||
<< " selected from state " << iState << G4endl;
|
||||
iState = 1; nOptions = 1;
|
||||
break;
|
||||
}
|
||||
@@ -535,13 +535,13 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
G4cout << "Available options:";
|
||||
G4cout << "\n 0) reset selection algorithm";
|
||||
G4cout << "\nChoose by specifying integer parameter.";
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
else {
|
||||
switch (iSelector) {
|
||||
default:
|
||||
case 0:
|
||||
G4cout << "Resetting from state " << iState << endl;
|
||||
G4cout << "Resetting from state " << iState << G4endl;
|
||||
iState = 0; nOptions = 2;
|
||||
break;
|
||||
}
|
||||
@@ -549,16 +549,16 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
break;
|
||||
}
|
||||
/****************************************************
|
||||
cin.tie (&G4cout); // Tie streams together so output is
|
||||
G4cin.tie (&G4cout); // Tie streams together so output is
|
||||
// flushed before any input.
|
||||
G4cout << "Temporary algorithm..." << endl;
|
||||
G4cout << "Temporary algorithm..." << G4endl;
|
||||
|
||||
G4VPhysicalVolume* pVPV =
|
||||
fpVMan -> GetCurrentScene ().GetPhysicalVolume ();
|
||||
G4VPhysicalVolume* pNewVPV = 0;
|
||||
|
||||
if (pVPV) {
|
||||
G4cout << "Current volume is " << pVPV -> GetName () << endl;
|
||||
G4cout << "Current volume is " << pVPV -> GetName () << G4endl;
|
||||
|
||||
G4VPhysicalVolume* pMother = pVPV -> GetMother ();
|
||||
if (pMother) {
|
||||
@@ -566,8 +566,8 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
do {
|
||||
G4cout << "Its mother is " << pMother -> GetName ()
|
||||
<< ". Select? [y/n]: ";
|
||||
c = cin.get ();
|
||||
if (c != '\n') while (cin.get () != '\n'); // Read on to newline.
|
||||
c = G4cin.get ();
|
||||
if (c != '\n') while (G4cin.get () != '\n'); // Read on to newline.
|
||||
} while (c != 'y' && c != 'Y' &&
|
||||
c != 'n' && c != 'N');
|
||||
if (c == 'y' || c == 'Y') {
|
||||
@@ -582,8 +582,8 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
do {
|
||||
G4cout << "It has " << nDaughters << " daughters. Select [0-"
|
||||
<< nDaughters - 1 << "] (<0 to abandon): ";
|
||||
cin >> iDaughter;
|
||||
while (cin.get () != '\n'); // Read on to newline.
|
||||
G4cin >> iDaughter;
|
||||
while (G4cin.get () != '\n'); // Read on to newline.
|
||||
} while (iDaughter >= nDaughters);
|
||||
if (iDaughter >= 0) {
|
||||
G4VPhysicalVolume* pDaughter =
|
||||
@@ -601,12 +601,12 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
}
|
||||
else {
|
||||
if (fpVMan -> GetVerboseLevel () > 0) {
|
||||
G4cout << "Nothing selected; nothing changed." << endl;
|
||||
G4cout << "Nothing selected; nothing changed." << G4endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
G4cerr << "No physical volume available." << endl;
|
||||
G4cerr << "No physical volume available." << G4endl;
|
||||
}
|
||||
if (fpVMan -> GetVerboseLevel () > 1) {
|
||||
fpVMan -> PrintCurrentScene ();
|
||||
@@ -618,13 +618,13 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
if (commandPath == "/vis~/set/verbose") {
|
||||
G4int vLevel;
|
||||
const char* t = newValues;
|
||||
istrstream is ((char*)t); is >> vLevel;
|
||||
G4std::istrstream is ((char*)t); is >> vLevel;
|
||||
if (vLevel < 0 ) {
|
||||
G4cout << "Verbosity is " << fpVMan -> GetVerboseLevel () << endl;
|
||||
G4cout << "Verbosity is " << fpVMan -> GetVerboseLevel () << G4endl;
|
||||
}
|
||||
else {
|
||||
fpVMan -> SetVerboseLevel (vLevel);
|
||||
G4cout << "Verbosity set to " << fpVMan -> GetVerboseLevel () << endl;
|
||||
G4cout << "Verbosity set to " << fpVMan -> GetVerboseLevel () << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -645,13 +645,13 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
}
|
||||
}
|
||||
if (nViewTotal == 0) {
|
||||
G4cerr << "No views to select." << endl;
|
||||
G4cerr << "No views to select." << G4endl;
|
||||
}
|
||||
else {
|
||||
// Select view and make it current.
|
||||
G4int iSelect;
|
||||
const char* aString = newValues;
|
||||
istrstream is((char*) aString) ; is >> iSelect;
|
||||
G4std::istrstream is((char*) aString) ; is >> iSelect;
|
||||
if (iSelect < 0 || iSelect >= nViewTotal) {
|
||||
G4cout << "Available views:";
|
||||
for (int iView = 0; iView < nViewTotal; iView++) {
|
||||
@@ -661,13 +661,13 @@ void G4VisManMessenger::DoCommandSet (const G4String& commandPath,
|
||||
G4cout << "\n " << iView << ") " << pView -> GetName ();
|
||||
}
|
||||
G4cout << "\nChoose by specifying integer parameter.";
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
else {
|
||||
G4VViewer* pView = vList[iSelect];
|
||||
fpVMan -> SetCurrentViewer (pView);
|
||||
if (fpVMan -> GetVerboseLevel () > 0) {
|
||||
G4cout << "Current view now " << pView -> GetName () << endl;
|
||||
G4cout << "Current view now " << pView -> GetName () << G4endl;
|
||||
if (fpVMan -> GetVerboseLevel () > 1) {
|
||||
fpVMan -> PrintCurrentView ();
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VisManMessenger.cc,v 1.2.8.1 1999/12/07 20:54:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VisManMessenger.cc,v 1.3 1999/12/15 14:54:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// GEANT4 Visualization Manager Messenger - John Allison 22nd July 1996.
|
||||
@@ -113,7 +113,7 @@ G4bool G4VisManMessenger::ViewValid () {
|
||||
return true;
|
||||
}
|
||||
else {
|
||||
G4cerr << "Invalid view (have you selected a graphics system?)" << endl;
|
||||
G4cerr << "Invalid view (have you selected a graphics system?)" << G4endl;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VisManager.cc,v 1.12.2.1 1999/12/07 20:54:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VisManager.cc,v 1.13 1999/12/15 14:54:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// GEANT4 Visualization Manager - John Allison 02/Jan/1996.
|
||||
@@ -63,7 +63,7 @@ G4VisManager::G4VisManager ():
|
||||
fpStateDependent = new G4VisStateDependent (this);
|
||||
// No need to delete this; G4StateManager does this.
|
||||
|
||||
G4cout << "Constructing Visualization Manager...." << endl;
|
||||
G4cout << "Constructing Visualization Manager...." << G4endl;
|
||||
// Note: You might think that we could register graphics systems
|
||||
// and messengers here but we have to give the subclass time to
|
||||
// instantiate. So the user has to invoke Initialise().
|
||||
@@ -75,8 +75,8 @@ G4VisManager::~G4VisManager () {
|
||||
fSceneList.clearAndDestroy ();
|
||||
fAvailableSceneHandlers.clearAndDestroy ();
|
||||
fAvailableGraphicsSystems.clearAndDestroy ();
|
||||
G4cout << "Graphics systems deleted." << endl;
|
||||
G4cout << "VisManager deleting." << endl;
|
||||
G4cout << "Graphics systems deleted." << G4endl;
|
||||
G4cout << "VisManager deleting." << G4endl;
|
||||
fMessengerList.clearAndDestroy ();
|
||||
delete fpMessenger;
|
||||
}
|
||||
@@ -91,7 +91,7 @@ G4VisManager* G4VisManager::GetInstance () {
|
||||
|
||||
void G4VisManager::Initialise () {
|
||||
|
||||
G4cout << "Initialising Visualization Manager...." << endl;
|
||||
G4cout << "Initialising Visualization Manager...." << G4endl;
|
||||
|
||||
if (fVerbose > 0) {
|
||||
PrintAllGraphicsSystems ();
|
||||
@@ -132,10 +132,10 @@ void G4VisManager::Initialise () {
|
||||
"\n G4VisManager* visManager = new MyVisManager;"
|
||||
"\n visManager -> Initialize ();"
|
||||
"\n (Don't forget to delete visManager;)"
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
G4cout << "Registering graphics systems...." << endl;
|
||||
G4cout << "Registering graphics systems...." << G4endl;
|
||||
|
||||
RegisterGraphicsSystems ();
|
||||
|
||||
@@ -162,7 +162,7 @@ const G4GraphicsSystemList& G4VisManager::GetAvailableGraphicsSystems () {
|
||||
"\n 3) You can register your own graphics system, e.g.,"
|
||||
"\n G4VisManager::GetInstance () ->"
|
||||
"\n RegisterGraphicsSystem (new MyGraphicsSystem);)"
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
return fAvailableGraphicsSystems;
|
||||
}
|
||||
@@ -177,7 +177,7 @@ G4bool G4VisManager::RegisterGraphicsSystem (G4VGraphicsSystem* pSystem) {
|
||||
if (pSystem -> GetNickname () != "") {
|
||||
G4cout << " (" << pSystem -> GetNickname () << ")";
|
||||
}
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
@@ -188,7 +188,7 @@ G4bool G4VisManager::RegisterGraphicsSystem (G4VGraphicsSystem* pSystem) {
|
||||
if (pSystem -> GetNickname () != "") {
|
||||
G4cout << " (" << pSystem -> GetNickname () << ")";
|
||||
}
|
||||
G4cout << " registered." << endl;
|
||||
G4cout << " registered." << G4endl;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -439,7 +439,7 @@ void G4VisManager::CreateSceneHandler (G4String name) {
|
||||
G4cout << "Error in G4VisManager::CreateSceneHandler during "
|
||||
<< fpGraphicsSystem -> GetName ()
|
||||
<< " scene creation."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
fpSceneHandler = 0;
|
||||
fpViewer = 0;
|
||||
// Make it impossible for user action code to Draw.
|
||||
@@ -486,7 +486,7 @@ void G4VisManager::CreateViewer (G4String name) {
|
||||
}
|
||||
if (warnings) {
|
||||
G4cout << "\n Also see other \"/vis~/set\" commands."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -537,7 +537,7 @@ void G4VisManager::DeleteCurrentSceneHandler () {
|
||||
"\n to select a scene handler and /vis/viewer/select to select"
|
||||
"\n a viewer, or maybe you will have to create some.";
|
||||
}
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
void G4VisManager::DeleteCurrentViewer () {
|
||||
@@ -569,18 +569,18 @@ void G4VisManager::DeleteCurrentViewer () {
|
||||
"\n and /vis/viewer/select to select a viewer, or maybe you will"
|
||||
"\n have to create some.";
|
||||
}
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
void G4VisManager::GeometryHasChanged () {
|
||||
G4cout << "G4VisManager::GeometryHasChanged() called." << endl;
|
||||
G4cout << "G4VisManager::GeometryHasChanged() called." << G4endl;
|
||||
|
||||
// Change the world...
|
||||
G4VPhysicalVolume* pWorld =
|
||||
G4TransportationManager::GetTransportationManager ()
|
||||
-> GetNavigatorForTracking () -> GetWorldVolume ();
|
||||
if (!pWorld) {
|
||||
G4cout << " The world has ended!!! (Is this serious?)" << endl;
|
||||
G4cout << " The world has ended!!! (Is this serious?)" << G4endl;
|
||||
}
|
||||
|
||||
// Check scenes.
|
||||
@@ -604,7 +604,7 @@ void G4VisManager::GeometryHasChanged () {
|
||||
<<
|
||||
"\" is no longer valid - being removed\n from scene \""
|
||||
<< pScene -> GetName () << "\""
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
modelList.removeAt (iModel);
|
||||
break;
|
||||
}
|
||||
@@ -616,7 +616,7 @@ void G4VisManager::GeometryHasChanged () {
|
||||
G4cout << " No models left in this scene \""
|
||||
<< pScene -> GetName ()
|
||||
<< "\"."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -625,7 +625,7 @@ void G4VisManager::GeometryHasChanged () {
|
||||
G4cout << " The current scene \""
|
||||
<< fpScene -> GetName ()
|
||||
<< "\" has no models left."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -641,7 +641,7 @@ void G4VisManager::SetCurrentGraphicsSystemAndCreateViewer
|
||||
fSceneList.append (fpScene);
|
||||
G4cout << "G4VisManager::SetCurrentGraphicsSystemAndCreateViewer:"
|
||||
"\n Empty scene \"scene-vis~\" created."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
CreateSceneHandler ();
|
||||
CreateViewer ();
|
||||
@@ -683,7 +683,7 @@ void G4VisManager::SetCurrentGraphicsSystem (G4VGraphicsSystem* pSystem) {
|
||||
fpConcreteInstance = 0;
|
||||
}
|
||||
}
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
void G4VisManager::SetCurrentSceneHandler (G4VSceneHandler* pSceneHandler) {
|
||||
@@ -714,14 +714,14 @@ void G4VisManager::SetCurrentSceneHandler (G4VSceneHandler* pSceneHandler) {
|
||||
fpConcreteInstance = 0;
|
||||
G4cout << "\n No viewers for this scene handler - please create one.";
|
||||
}
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
void G4VisManager::SetCurrentViewer (G4VViewer* pViewer) {
|
||||
fpViewer = pViewer;
|
||||
G4cout << "G4VisManager::SetCurrentViewer: viewer now "
|
||||
<< pViewer -> GetName ()
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
fpSceneHandler = fpViewer -> GetScene ();
|
||||
fpSceneHandler -> SetCurrentViewer (pViewer);
|
||||
fpGraphicsSystem = fpSceneHandler -> GetGraphicsSystem ();
|
||||
@@ -732,7 +732,7 @@ void G4VisManager::PrintCurrentSystems () const {
|
||||
if (fpGraphicsSystem && fpSceneHandler && fpViewer) {
|
||||
G4int nSystems = fAvailableGraphicsSystems.entries ();
|
||||
if (nSystems <= 0) {
|
||||
G4cout << "No graphics systems available yet." << endl;
|
||||
G4cout << "No graphics systems available yet." << G4endl;
|
||||
}
|
||||
else {
|
||||
PrintAvailableGraphicsSystems ();
|
||||
@@ -744,7 +744,7 @@ void G4VisManager::PrintCurrentSystems () const {
|
||||
void G4VisManager::PrintCurrentSystem () const {
|
||||
if (fpGraphicsSystem && fpSceneHandler && fpViewer) {
|
||||
G4cout << "Current graphics system is: " << *fpGraphicsSystem;
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
else PrintInvalidPointers ();
|
||||
}
|
||||
@@ -753,7 +753,7 @@ void G4VisManager::PrintCurrentScene () const {
|
||||
if (fpGraphicsSystem && fpSceneHandler && fpViewer) {
|
||||
G4cout << "Current Scene is: " << fpSceneHandler -> GetName ();
|
||||
G4cout << '\n' << *fpSceneHandler;
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
else PrintInvalidPointers ();
|
||||
}
|
||||
@@ -773,7 +773,7 @@ void G4VisManager::PrintCurrentView () const {
|
||||
}
|
||||
else {
|
||||
G4cout << " are same."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
else PrintInvalidPointers ();
|
||||
@@ -799,7 +799,7 @@ void G4VisManager::PrintAllGraphicsSystems () const {
|
||||
<< "\n\n VRML1File (produces VRML 1 file locally )"
|
||||
<< "\n\n VRML2 (produces VRML 2 file over network), in preparation"
|
||||
<< "\n\n VRML2File (produces VRML 2 file locally ), in preparation"
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
void G4VisManager::PrintInstalledGraphicsSystems () const {
|
||||
@@ -836,7 +836,7 @@ void G4VisManager::PrintInstalledGraphicsSystems () const {
|
||||
<< "\n VRML1File (produces VRML 1 file locally)"
|
||||
<< "\n VRML2File (produces VRML 2 file locally), in preparation"
|
||||
#endif
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
|
||||
void G4VisManager::PrintAvailableGraphicsSystems () const {
|
||||
@@ -854,7 +854,7 @@ void G4VisManager::PrintAvailableGraphicsSystems () const {
|
||||
else {
|
||||
G4cout << "\n NONE!!! None registered - yet! Mmmmm!";
|
||||
}
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
void G4VisManager::PrintInvalidPointers () const {
|
||||
@@ -869,7 +869,7 @@ void G4VisManager::PrintInvalidPointers () const {
|
||||
if (!fpSceneHandler) G4cout << "\nNull scene handler pointer. ";
|
||||
if (!fpViewer ) G4cout << "\nNull viewer pointer. ";
|
||||
}
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
void G4VisManager::RefreshCurrentView () { // Soft clear, then redraw.
|
||||
@@ -911,7 +911,7 @@ G4bool G4VisManager::IsValidView () {
|
||||
if ((!fpScene) || (!fpSceneHandler) || (!fpViewer)) {
|
||||
G4cout << "G4VisManager::IsValidView ():"
|
||||
"\n Current view is not valid.";
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
PrintInvalidPointers ();
|
||||
return false;
|
||||
}
|
||||
@@ -937,14 +937,14 @@ G4bool G4VisManager::IsValidView () {
|
||||
"\n (b) create a new scene handler with "
|
||||
"\n /vis/sceneHandler/create <graphics-system>,"
|
||||
"\n in which case it should pick up the the new scene."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
else {
|
||||
G4cout << "\n Scene handler \""
|
||||
<< fpSceneHandler -> GetName ()
|
||||
<< "\" has null scene pointer."
|
||||
"\n Attach a scene with /vis/sceneHandler/attach [<scene-name>]"
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -954,7 +954,7 @@ G4bool G4VisManager::IsValidView () {
|
||||
G4cout << "G4VisManager::IsValidView (): the current scene handler\n \""
|
||||
<< fpSceneHandler -> GetName ()
|
||||
<< "\" has no viewers. Do /vis/viewer/create."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -968,7 +968,7 @@ G4bool G4VisManager::IsValidView () {
|
||||
"\n Attempt at some drawing operation when scene is empty."
|
||||
"\n Maybe the geometry has not yet been defined."
|
||||
" Try /run/initialize."
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
isValid = false;
|
||||
fpConcreteInstance = 0; // Users must not use!
|
||||
}
|
||||
@@ -977,7 +977,7 @@ G4bool G4VisManager::IsValidView () {
|
||||
G4cout <<
|
||||
"G4VisManager: the scene was empty, \"world\" has been added"
|
||||
"\n and the view parameters have been reset.";
|
||||
G4cout << endl;
|
||||
G4cout << G4endl;
|
||||
}
|
||||
}
|
||||
return isValid;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VisManagerRegisterMessengers.cc,v 1.8.4.1 1999/12/07 20:54:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VisManagerRegisterMessengers.cc,v 1.11 2000/01/11 17:22:32 johna Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// G4VisManager::RegisterMessengers - John Allison 30/July/1998.
|
||||
@@ -106,13 +106,15 @@ clicks, spawn other windows, change viewpoint, etc.).
|
||||
/vis/viewer/create [<scene-handler>] [<viewer-name>]
|
||||
/vis/viewer/list
|
||||
/vis/viewer/select [<viewer-name>]
|
||||
/vis/viewer/refresh [<viewer-name>]
|
||||
/vis/viewer/remove <viewer-name>
|
||||
* /vis/viewer/set/style wireframe|surface|logical
|
||||
* /vis/viewer/set/viewpoint
|
||||
* /vis/viewer/set/notifyOption immediate|delayed
|
||||
* /vis/viewer/notifyHandler
|
||||
* /vis/viewer/clone
|
||||
/vis/viewer/update [<viewer-name>]
|
||||
/vis/viewer/show [<viewer-name>]
|
||||
/vis/viewer/update - synonym for /vis/viewer/show.
|
||||
|
||||
|
||||
Global Commands
|
||||
@@ -141,7 +143,7 @@ would be
|
||||
|
||||
/vis/scene/add/volume $1
|
||||
/vis/scene/notifyHandlers
|
||||
/vis/viewer/update
|
||||
/vis/viewer/show
|
||||
|
||||
or some such.
|
||||
|
||||
@@ -204,9 +206,10 @@ or some such.
|
||||
command -> SetGuidance ("Operations on Geant4 viewers.");
|
||||
fMessengerList.append (new G4VisCommandViewerCreate);
|
||||
fMessengerList.append (new G4VisCommandViewerList);
|
||||
fMessengerList.append (new G4VisCommandViewerSelect);
|
||||
fMessengerList.append (new G4VisCommandViewerRefresh);
|
||||
fMessengerList.append (new G4VisCommandViewerRemove);
|
||||
fMessengerList.append (new G4VisCommandViewerUpdate);
|
||||
fMessengerList.append (new G4VisCommandViewerSelect);
|
||||
fMessengerList.append (new G4VisCommandViewerShow);
|
||||
|
||||
// Camera - OLD STYLE!!
|
||||
fMessengerList.append
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VisStateDependent.cc,v 1.1.2.1 1999/12/07 20:54:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VisStateDependent.cc,v 1.2 1999/12/15 14:54:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
|
||||
#include "G4VisStateDependent.hh"
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
// based on the Program) you indicate your acceptance of this statement,
|
||||
// and all its terms.
|
||||
//
|
||||
// $Id: G4VisToOldVisCommands.cc,v 1.3.8.1 1999/12/07 20:54:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-00 $
|
||||
// $Id: G4VisToOldVisCommands.cc,v 1.4 1999/12/15 14:54:27 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-01-01 $
|
||||
//
|
||||
//
|
||||
// Implements some /vis/ commands as /vis~/ temporarily.
|
||||
@@ -29,16 +29,16 @@ G4VisToOldVisCommands::G4VisToOldVisCommands () {
|
||||
G4String subTreeName = subTree -> GetPathName ();
|
||||
G4String newDirectoryName = subTreeName.replace (0, 6, "/vis/");
|
||||
newDirectoryName = newDirectoryName (0, newDirectoryName.last ('/') + 1);
|
||||
// G4cout << "NewDirectoryName: " << newDirectoryName << endl;
|
||||
// G4cout << "NewDirectoryName: " << newDirectoryName << G4endl;
|
||||
new G4UIdirectory (newDirectoryName);
|
||||
G4int nCommands = subTree -> GetCommandEntry ();
|
||||
int j;
|
||||
for (j = 1; j <= nCommands; j++) {
|
||||
G4UIcommand* command = subTree -> GetCommand (j);
|
||||
G4String commandPath = command -> GetCommandPath ();
|
||||
// G4cout << "SubCommandPath: " << commandPath << endl;
|
||||
// G4cout << "SubCommandPath: " << commandPath << G4endl;
|
||||
G4String newCommandPath = commandPath.replace (0, 6, "/vis/");
|
||||
// G4cout << "NewSubCommandPath: " << newCommandPath << endl;
|
||||
// G4cout << "NewSubCommandPath: " << newCommandPath << G4endl;
|
||||
G4UIcommand* newCommand = new G4UIcommand (newCommandPath, this);
|
||||
newCommand -> SetRange (command -> GetRange ());
|
||||
G4int nGuidances = command -> GetGuidanceEntries ();
|
||||
@@ -69,7 +69,7 @@ void G4VisToOldVisCommands::SetNewValue
|
||||
"\n sub-detector components. (The command is still available"
|
||||
"\n as \"/vis~/create_view/new_graphics_system " << newValues <<
|
||||
"\".)"
|
||||
<< endl;
|
||||
<< G4endl;
|
||||
}
|
||||
else {
|
||||
G4String oldCommandPath = commandPath.replace (0, 5, "/vis~/");
|
||||
|
||||
Reference in New Issue
Block a user