Import Geant4 10.7.0.beta source tree
This commit is contained in:
@@ -1,19 +1,6 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# CMakeLists.txt
|
||||
# Module : G4vis_management
|
||||
# Package: Geant4.src.G4visualization.G4vis_management
|
||||
#
|
||||
# CMakeLists.txt for single level library that may be build global or granular
|
||||
#
|
||||
# Generated on : 24/9/2010
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
include(Geant4MacroLibraryTargets)
|
||||
if(GEANT4_BUILD_GRANULAR_LIBS)
|
||||
GEANT4_GRANULAR_LIBRARY_TARGET(COMPONENT sources.cmake)
|
||||
else()
|
||||
GEANT4_GLOBAL_LIBRARY_TARGET(COMPONENTS sources.cmake)
|
||||
endif()
|
||||
|
||||
geant4_global_library_target(COMPONENTS sources.cmake)
|
||||
|
||||
@@ -25,6 +25,47 @@ committal in the CVS repository !
|
||||
History file for visualization management sub-category
|
||||
------------------------------------------------------
|
||||
|
||||
18 June 2020 John Allison (visman-V10-06-06)
|
||||
* G4VisCommandsSceneAdd.cc:
|
||||
/vis/scene/add/*Field: Correct guidance (red->green->blue).
|
||||
|
||||
19 May 2020 John Allison (visman-V10-06-05)
|
||||
* G4VVisCommand: Add CheckView for future utility.
|
||||
* G4VisCommandsScene.cc: /vis/scene/showExtents: Improve output layout.
|
||||
|
||||
22 April 2020 Frederick Jones (visman-V10-06-04)
|
||||
* G4VisExecutive.icc: Support for OIQT Vis driver, via "OIQT"
|
||||
or "OI" keywords, provided the G4OpenInventor library has
|
||||
been built with the OIQT driver included.
|
||||
|
||||
07 April 2020 John Allison (visman-V10-06-03)
|
||||
* G4Scene.cc:
|
||||
* Bug fix: Models with no extent do not contribute to scene's extent.
|
||||
* G4VisCommandsSceneHandler.cc: /vis/sceneHandler/create:
|
||||
* Trap infinite loop when looking for a fallback graphics system.
|
||||
|
||||
04 March 2020. John Allison (visman-V10-06-02)
|
||||
- G4VisCommandsListManager.hh:
|
||||
o Bug fix: Notify handlers after /vis/filtering/*/mode command.
|
||||
. Causes rebuild of graphics database.
|
||||
- G4VisManager.cc: Improve printing of available systems and models.
|
||||
|
||||
13 February 2020. John Allison (visman-V10-06-01)
|
||||
- G4VisCommandsGeometrySet: /vis/geometry/set/forceCloud:
|
||||
o New command (not previously available due to oversight.
|
||||
o Set the default value of number of cloud points to 0 (<= 0 means
|
||||
under control of the viewer, i.e., the value in the view parameters
|
||||
- see G4VSceneHandler::RequestPrimitives.
|
||||
- G4VisCommandsTouchableSet:
|
||||
o Clarify the meaning of the default value of number of cloud points.
|
||||
o Correct guidance for /vis/touchable/set/numberOfCloudPoints.
|
||||
o Tidy.
|
||||
- G4VisManager.cc: Instantiate /vis/geometry/set/forceCloud.
|
||||
|
||||
12 December 2019 Ben Morgan (visman-V10-06-00)
|
||||
- Cleanup CMake build, removing obsolete granular library option and
|
||||
explicit include_directories.
|
||||
|
||||
29 October 2019 Gabriele Cosmo (visman-V10-05-14)
|
||||
- G4VisCommandsViewer.cc:
|
||||
o Replaced use of std::experimental::filesystem with std::filesystem
|
||||
|
||||
@@ -118,6 +118,8 @@ protected:
|
||||
|
||||
void CheckSceneAndNotifyHandlers (G4Scene* = nullptr);
|
||||
|
||||
G4bool CheckView(); // False if not valid
|
||||
|
||||
void G4VisCommandsSceneAddUnsuccessful(G4VisManager::Verbosity verbosity);
|
||||
|
||||
void CopyGuidanceFrom
|
||||
|
||||
@@ -83,6 +83,23 @@ private:
|
||||
G4bool fForce;
|
||||
};
|
||||
|
||||
class G4VisCommandGeometrySetForceCloudFunction:
|
||||
public G4VVisCommandGeometrySetFunction {
|
||||
public:
|
||||
virtual ~G4VisCommandGeometrySetForceCloudFunction() {}
|
||||
G4VisCommandGeometrySetForceCloudFunction
|
||||
(G4bool force, G4int nPoints)
|
||||
:fForce(force)
|
||||
,fNPoints(nPoints) {}
|
||||
void operator() (G4VisAttributes* visAtts) const {
|
||||
visAtts->SetForceCloud(fForce);
|
||||
visAtts->SetForceNumberOfCloudPoints(fNPoints);
|
||||
}
|
||||
private:
|
||||
G4bool fForce;
|
||||
G4int fNPoints;
|
||||
};
|
||||
|
||||
class G4VisCommandGeometrySetForceLineSegmentsPerCircleFunction:
|
||||
public G4VVisCommandGeometrySetFunction {
|
||||
public:
|
||||
@@ -217,6 +234,21 @@ private:
|
||||
G4UIcommand* fpCommand;
|
||||
};
|
||||
|
||||
class G4VisCommandGeometrySetForceCloud:
|
||||
public G4VVisCommandGeometrySet {
|
||||
public:
|
||||
G4VisCommandGeometrySetForceCloud ();
|
||||
virtual ~G4VisCommandGeometrySetForceCloud ();
|
||||
G4String GetCurrentValue (G4UIcommand* command);
|
||||
void SetNewValue (G4UIcommand* command, G4String newValue);
|
||||
private:
|
||||
G4VisCommandGeometrySetForceCloud
|
||||
(const G4VisCommandGeometrySetForceCloud&);
|
||||
G4VisCommandGeometrySetForceCloud& operator=
|
||||
(const G4VisCommandGeometrySetForceCloud&);
|
||||
G4UIcommand* fpCommand;
|
||||
};
|
||||
|
||||
class G4VisCommandGeometrySetForceSolid:
|
||||
public G4VVisCommandGeometrySet {
|
||||
public:
|
||||
|
||||
@@ -214,6 +214,8 @@ void G4VisCommandManagerMode<Manager>::SetNewValue(G4UIcommand*, G4String name)
|
||||
{
|
||||
assert (0 != fpManager);
|
||||
fpManager->SetMode(name);
|
||||
G4VVisManager* visManager = G4VVisManager::GetConcreteInstance();
|
||||
if (visManager) visManager->NotifyHandlers();
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -216,7 +216,9 @@ G4VisExecutive::RegisterGraphicsSystems () {
|
||||
G4VGraphicsSystem* oi = 0;
|
||||
#ifdef G4VIS_USE_OIX
|
||||
oi = new G4OpenInventorX;
|
||||
#elif G4VIS_USE_OIWIN32
|
||||
#elif defined(G4VIS_USE_OIQT)
|
||||
oi = new G4OpenInventorQt;
|
||||
#elif defined(G4VIS_USE_OIWIN32)
|
||||
oi = new G4OpenInventorWin32;
|
||||
#endif
|
||||
if (oi) {
|
||||
@@ -230,10 +232,6 @@ G4VisExecutive::RegisterGraphicsSystems () {
|
||||
RegisterGraphicsSystem (new G4OpenInventorXtExtended);
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_OIQT
|
||||
RegisterGraphicsSystem(new G4OpenInventorQt);
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_USE_RAYTRACERX
|
||||
RegisterGraphicsSystem (new G4RayTracerX);
|
||||
#endif
|
||||
|
||||
@@ -1,162 +1,117 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# sources.cmake
|
||||
# Module : G4vis_management
|
||||
# Package: Geant4.src.G4visualization.G4vis_management
|
||||
#
|
||||
# Sources description for a library.
|
||||
# Lists the sources and headers of the code explicitely.
|
||||
# Lists include paths needed.
|
||||
# Lists the internal granular and global dependencies of the library.
|
||||
# Source specific properties should be added at the end.
|
||||
#
|
||||
# Generated on : 24/9/2010
|
||||
#
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# List external includes needed.
|
||||
include_directories(${CLHEP_INCLUDE_DIRS})
|
||||
include_directories(${USOLIDS_INCLUDE_DIRS})
|
||||
|
||||
# List internal includes needed.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/digits_hits/digits/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/digits_hits/hits/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/digits_hits/utils/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/event/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/magneticfield/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/navigation/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/solids/Boolean/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/solids/CSG/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/solids/specific/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/geometry/volumes/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPGeometry/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPRandom/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/HEPNumerics/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/global/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/graphics_reps/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/intercoms/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/materials/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/particles/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/processes/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/run/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/track/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/tracking/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/visualization/management/include)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/source/visualization/modeling/include)
|
||||
|
||||
#
|
||||
# Define the Geant4 Module.
|
||||
#
|
||||
include(Geant4MacroDefineModule)
|
||||
GEANT4_DEFINE_MODULE(NAME G4vis_management
|
||||
HEADERS
|
||||
G4GraphicsSystemList.hh
|
||||
G4Scene.hh
|
||||
G4Scene.icc
|
||||
G4SceneHandlerList.hh
|
||||
G4SceneList.hh
|
||||
G4VGraphicsSystem.hh
|
||||
G4VSceneHandler.hh
|
||||
G4VSceneHandler.icc
|
||||
G4VUserVisAction.hh
|
||||
G4VViewer.hh
|
||||
G4VViewer.icc
|
||||
G4VVisCommand.hh
|
||||
G4ViewParameters.hh
|
||||
G4ViewParameters.icc
|
||||
G4ViewerList.hh
|
||||
G4VisCommandModelCreate.hh
|
||||
G4VisCommands.hh
|
||||
G4VisCommandsCompound.hh
|
||||
G4VisCommandsGeometry.hh
|
||||
G4VisCommandsGeometrySet.hh
|
||||
G4VisCommandsListManager.hh
|
||||
G4VisCommandsMultithreading.hh
|
||||
G4VisCommandsSet.hh
|
||||
G4VisCommandsScene.hh
|
||||
G4VisCommandsSceneAdd.hh
|
||||
G4VisCommandsSceneHandler.hh
|
||||
G4VisCommandsTouchable.hh
|
||||
G4VisCommandsTouchableSet.hh
|
||||
G4VisCommandsViewer.hh
|
||||
G4VisCommandsViewerDefault.hh
|
||||
G4VisCommandsViewerSet.hh
|
||||
G4VisExecutive.hh
|
||||
G4VisExecutive.icc
|
||||
G4VisFilterManager.hh
|
||||
G4VisListManager.hh
|
||||
G4VisManager.hh
|
||||
G4VisManager.icc
|
||||
G4VisModelManager.hh
|
||||
G4VisStateDependent.hh
|
||||
SOURCES
|
||||
G4GraphicsSystemList.cc
|
||||
G4Scene.cc
|
||||
G4SceneHandlerList.cc
|
||||
G4SceneList.cc
|
||||
G4VGraphicsSystem.cc
|
||||
G4VSceneHandler.cc
|
||||
G4VViewer.cc
|
||||
G4VVisCommand.cc
|
||||
G4ViewParameters.cc
|
||||
G4ViewerList.cc
|
||||
G4VisCommands.cc
|
||||
G4VisCommandsCompound.cc
|
||||
G4VisCommandsGeometry.cc
|
||||
G4VisCommandsGeometrySet.cc
|
||||
G4VisCommandsMultithreading.cc
|
||||
G4VisCommandsSet.cc
|
||||
G4VisCommandsScene.cc
|
||||
G4VisCommandsSceneAdd.cc
|
||||
G4VisCommandsSceneHandler.cc
|
||||
G4VisCommandsTouchable.cc
|
||||
G4VisCommandsTouchableSet.cc
|
||||
G4VisCommandsViewer.cc
|
||||
G4VisCommandsViewerDefault.cc
|
||||
G4VisCommandsViewerSet.cc
|
||||
G4VisManager.cc
|
||||
G4VisStateDependent.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4csg
|
||||
G4detutils
|
||||
G4digits
|
||||
G4event
|
||||
G4geomBoolean
|
||||
G4geometrymng
|
||||
G4globman
|
||||
G4graphics_reps
|
||||
G4hepnumerics
|
||||
G4hits
|
||||
G4intercoms
|
||||
G4magneticfield
|
||||
G4materials
|
||||
G4modeling
|
||||
G4navigation
|
||||
G4partman
|
||||
G4procman
|
||||
G4run
|
||||
G4specsolids
|
||||
G4track
|
||||
G4tracking
|
||||
G4vis_management
|
||||
G4volumes
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4digits_hits
|
||||
G4event
|
||||
G4geometry
|
||||
G4global
|
||||
G4graphics_reps
|
||||
G4intercoms
|
||||
G4materials
|
||||
G4modeling
|
||||
G4particles
|
||||
G4processes
|
||||
G4run
|
||||
G4track
|
||||
G4tracking
|
||||
LINK_LIBRARIES
|
||||
geant4_define_module(NAME G4vis_management
|
||||
HEADERS
|
||||
G4GraphicsSystemList.hh
|
||||
G4Scene.hh
|
||||
G4Scene.icc
|
||||
G4SceneHandlerList.hh
|
||||
G4SceneList.hh
|
||||
G4VGraphicsSystem.hh
|
||||
G4VSceneHandler.hh
|
||||
G4VSceneHandler.icc
|
||||
G4VUserVisAction.hh
|
||||
G4VViewer.hh
|
||||
G4VViewer.icc
|
||||
G4VVisCommand.hh
|
||||
G4ViewParameters.hh
|
||||
G4ViewParameters.icc
|
||||
G4ViewerList.hh
|
||||
G4VisCommandModelCreate.hh
|
||||
G4VisCommands.hh
|
||||
G4VisCommandsCompound.hh
|
||||
G4VisCommandsGeometry.hh
|
||||
G4VisCommandsGeometrySet.hh
|
||||
G4VisCommandsListManager.hh
|
||||
G4VisCommandsMultithreading.hh
|
||||
G4VisCommandsSet.hh
|
||||
G4VisCommandsScene.hh
|
||||
G4VisCommandsSceneAdd.hh
|
||||
G4VisCommandsSceneHandler.hh
|
||||
G4VisCommandsTouchable.hh
|
||||
G4VisCommandsTouchableSet.hh
|
||||
G4VisCommandsViewer.hh
|
||||
G4VisCommandsViewerDefault.hh
|
||||
G4VisCommandsViewerSet.hh
|
||||
G4VisExecutive.hh
|
||||
G4VisExecutive.icc
|
||||
G4VisFilterManager.hh
|
||||
G4VisListManager.hh
|
||||
G4VisManager.hh
|
||||
G4VisManager.icc
|
||||
G4VisModelManager.hh
|
||||
G4VisStateDependent.hh
|
||||
SOURCES
|
||||
G4GraphicsSystemList.cc
|
||||
G4Scene.cc
|
||||
G4SceneHandlerList.cc
|
||||
G4SceneList.cc
|
||||
G4VGraphicsSystem.cc
|
||||
G4VSceneHandler.cc
|
||||
G4VViewer.cc
|
||||
G4VVisCommand.cc
|
||||
G4ViewParameters.cc
|
||||
G4ViewerList.cc
|
||||
G4VisCommands.cc
|
||||
G4VisCommandsCompound.cc
|
||||
G4VisCommandsGeometry.cc
|
||||
G4VisCommandsGeometrySet.cc
|
||||
G4VisCommandsMultithreading.cc
|
||||
G4VisCommandsSet.cc
|
||||
G4VisCommandsScene.cc
|
||||
G4VisCommandsSceneAdd.cc
|
||||
G4VisCommandsSceneHandler.cc
|
||||
G4VisCommandsTouchable.cc
|
||||
G4VisCommandsTouchableSet.cc
|
||||
G4VisCommandsViewer.cc
|
||||
G4VisCommandsViewerDefault.cc
|
||||
G4VisCommandsViewerSet.cc
|
||||
G4VisManager.cc
|
||||
G4VisStateDependent.cc
|
||||
GRANULAR_DEPENDENCIES
|
||||
G4csg
|
||||
G4detutils
|
||||
G4digits
|
||||
G4event
|
||||
G4geomBoolean
|
||||
G4geometrymng
|
||||
G4globman
|
||||
G4graphics_reps
|
||||
G4hepnumerics
|
||||
G4hits
|
||||
G4intercoms
|
||||
G4magneticfield
|
||||
G4materials
|
||||
G4modeling
|
||||
G4navigation
|
||||
G4partman
|
||||
G4procman
|
||||
G4run
|
||||
G4specsolids
|
||||
G4track
|
||||
G4tracking
|
||||
G4vis_management
|
||||
G4volumes
|
||||
GLOBAL_DEPENDENCIES
|
||||
G4digits_hits
|
||||
G4event
|
||||
G4geometry
|
||||
G4global
|
||||
G4graphics_reps
|
||||
G4intercoms
|
||||
G4materials
|
||||
G4modeling
|
||||
G4particles
|
||||
G4processes
|
||||
G4run
|
||||
G4track
|
||||
G4tracking
|
||||
)
|
||||
|
||||
# List any source specific properties here
|
||||
|
||||
|
||||
@@ -115,7 +115,9 @@ void G4Scene::CalculateExtent ()
|
||||
G4VModel* model = fRunDurationModelList[i].fpModel;
|
||||
if (model -> Validate()) { // Validates and also recomputes extent.
|
||||
const G4VisExtent& thisExtent = model -> GetTransformedExtent ();
|
||||
boundingExtentScene.AccrueBoundingExtent(thisExtent);
|
||||
if (thisExtent != G4VisExtent::GetNullExtent()) {
|
||||
boundingExtentScene.AccrueBoundingExtent(thisExtent);
|
||||
}
|
||||
} else {
|
||||
PrintInvalidModel(model);
|
||||
}
|
||||
@@ -127,7 +129,9 @@ void G4Scene::CalculateExtent ()
|
||||
G4VModel* model = fEndOfEventModelList[i].fpModel;
|
||||
if (model -> Validate()) { // Validates and also recomputes extent.
|
||||
const G4VisExtent& thisExtent = model -> GetTransformedExtent ();
|
||||
boundingExtentScene.AccrueBoundingExtent(thisExtent);
|
||||
if (thisExtent != G4VisExtent::GetNullExtent()) {
|
||||
boundingExtentScene.AccrueBoundingExtent(thisExtent);
|
||||
}
|
||||
} else {
|
||||
PrintInvalidModel(model);
|
||||
}
|
||||
@@ -139,7 +143,9 @@ void G4Scene::CalculateExtent ()
|
||||
G4VModel* model = fEndOfRunModelList[i].fpModel;
|
||||
if (model -> Validate()) { // Validates and also recomputes extent.
|
||||
const G4VisExtent& thisExtent = model -> GetTransformedExtent ();
|
||||
boundingExtentScene.AccrueBoundingExtent(thisExtent);
|
||||
if (thisExtent != G4VisExtent::GetNullExtent()) {
|
||||
boundingExtentScene.AccrueBoundingExtent(thisExtent);
|
||||
}
|
||||
} else {
|
||||
PrintInvalidModel(model);
|
||||
}
|
||||
|
||||
@@ -219,6 +219,23 @@ void G4VVisCommand::CheckSceneAndNotifyHandlers(G4Scene* pScene)
|
||||
|
||||
}
|
||||
|
||||
G4bool G4VVisCommand::CheckView ()
|
||||
{
|
||||
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
|
||||
G4VViewer* viewer = fpVisManager -> GetCurrentViewer ();
|
||||
|
||||
if (!viewer) {
|
||||
if (verbosity >= G4VisManager::errors) {
|
||||
G4cerr <<
|
||||
"ERROR: No current viewer - \"/vis/viewer/list\" to see possibilities."
|
||||
<< G4endl;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void G4VVisCommand::G4VisCommandsSceneAddUnsuccessful
|
||||
(G4VisManager::Verbosity verbosity) {
|
||||
// Some frequently used error printing...
|
||||
|
||||
@@ -282,6 +282,61 @@ void G4VisCommandGeometrySetForceAuxEdgeVisible::SetNewValue
|
||||
Set(name, setForceAuxEdgeVisible, requestedDepth);
|
||||
}
|
||||
|
||||
////////////// /vis/geometry/set/forceCloud /////////////////////////
|
||||
|
||||
G4VisCommandGeometrySetForceCloud::G4VisCommandGeometrySetForceCloud()
|
||||
{
|
||||
G4bool omitable;
|
||||
fpCommand = new G4UIcommand("/vis/geometry/set/forceCloud", this);
|
||||
fpCommand->SetGuidance
|
||||
("Forces logical volume(s) always to be drawn as a cloud of points,"
|
||||
"\nregardless of the view parameters.");
|
||||
fpCommand->SetGuidance("\"all\" sets all logical volumes.");
|
||||
fpCommand->SetGuidance
|
||||
("Optionally propagates down hierarchy to given depth.");
|
||||
G4UIparameter* parameter;
|
||||
parameter = new G4UIparameter ("logical-volume-name", 's', omitable = true);
|
||||
parameter->SetDefaultValue("all");
|
||||
fpCommand->SetParameter(parameter);
|
||||
parameter = new G4UIparameter("depth", 'd', omitable = true);
|
||||
parameter->SetDefaultValue(0);
|
||||
parameter->SetGuidance
|
||||
("Depth of propagation (-1 means unlimited depth).");
|
||||
fpCommand->SetParameter(parameter);
|
||||
parameter = new G4UIparameter("forceCloud", 'b', omitable = true);
|
||||
parameter->SetDefaultValue(true);
|
||||
fpCommand->SetParameter(parameter);
|
||||
parameter = new G4UIparameter("nPoints", 'd', omitable = true);
|
||||
parameter->SetGuidance
|
||||
("<= 0 means under control of viewer.");
|
||||
parameter->SetDefaultValue(0);
|
||||
fpCommand->SetParameter(parameter);
|
||||
}
|
||||
|
||||
G4VisCommandGeometrySetForceCloud::~G4VisCommandGeometrySetForceCloud()
|
||||
{
|
||||
delete fpCommand;
|
||||
}
|
||||
|
||||
G4String
|
||||
G4VisCommandGeometrySetForceCloud::GetCurrentValue(G4UIcommand*)
|
||||
{
|
||||
return "";
|
||||
}
|
||||
|
||||
void G4VisCommandGeometrySetForceCloud::SetNewValue
|
||||
(G4UIcommand*, G4String newValue)
|
||||
{
|
||||
G4String name, forceCloudString;
|
||||
G4int requestedDepth, nPoints;
|
||||
std::istringstream iss(newValue);
|
||||
iss >> name >> requestedDepth >> forceCloudString >> nPoints;
|
||||
G4bool forceCloud = G4UIcommand::ConvertToBool(forceCloudString);;
|
||||
|
||||
G4VisCommandGeometrySetForceCloudFunction setForceCloud(forceCloud,nPoints);
|
||||
Set(name, setForceCloud, requestedDepth);
|
||||
}
|
||||
|
||||
////////////// /vis/geometry/set/forceLineSegmentsPerCircle /////////////////////////
|
||||
|
||||
G4VisCommandGeometrySetForceLineSegmentsPerCircle::G4VisCommandGeometrySetForceLineSegmentsPerCircle()
|
||||
@@ -331,7 +386,8 @@ void G4VisCommandGeometrySetForceLineSegmentsPerCircle::SetNewValue
|
||||
std::istringstream iss(newValue);
|
||||
iss >> name >> requestedDepth >> lineSegmentsPerCircle;
|
||||
|
||||
G4VisCommandGeometrySetForceLineSegmentsPerCircleFunction setForceLineSegmentsPerCircle(lineSegmentsPerCircle);
|
||||
G4VisCommandGeometrySetForceLineSegmentsPerCircleFunction
|
||||
setForceLineSegmentsPerCircle(lineSegmentsPerCircle);
|
||||
Set(name, setForceLineSegmentsPerCircle, requestedDepth);
|
||||
}
|
||||
|
||||
|
||||
@@ -912,7 +912,7 @@ void G4VisCommandSceneShowExtents::SetNewValue (G4UIcommand*, G4String) {
|
||||
<< "\n" << transformedExtent;
|
||||
DrawExtent(transformedExtent);
|
||||
}
|
||||
G4cout << "Overall extent:\n";
|
||||
G4cout << "\n Overall extent:\n";
|
||||
DrawExtent(pCurrentScene->GetExtent());
|
||||
G4cout << G4endl;
|
||||
}
|
||||
|
||||
@@ -553,7 +553,7 @@ G4VisCommandSceneAddElectricField::G4VisCommandSceneAddElectricField () {
|
||||
fpCommand -> SetGuidance
|
||||
("In the arrow representation, the length of the arrow is proportional"
|
||||
"\nto the magnitude of the field and the colour is mapped onto the range"
|
||||
"\nas a fraction of the maximum magnitude: 0->0.5->1 is blue->green->red.");
|
||||
"\nas a fraction of the maximum magnitude: 0->0.5->1 is red->green->blue.");
|
||||
G4UIparameter* parameter;
|
||||
parameter = new G4UIparameter ("nDataPointsPerHalfScene", 'i', omitable = true);
|
||||
parameter -> SetDefaultValue (10);
|
||||
|
||||
@@ -256,7 +256,9 @@ void G4VisCommandSceneHandlerCreate::SetNewValue (G4UIcommand*,
|
||||
|
||||
// Check UI session compatibility.
|
||||
G4bool fallback = false;
|
||||
G4int loopCounter = 0;
|
||||
while (!gsl[iGS]->IsUISessionCompatible()) {
|
||||
G4int iGSBeingTested = iGS;
|
||||
// Not compatible, search for a fallback
|
||||
fallback = false;
|
||||
G4String fallbackNickname = gsl[iGS]->GetNickname() + "_FALLBACK";
|
||||
@@ -273,18 +275,19 @@ void G4VisCommandSceneHandlerCreate::SetNewValue (G4UIcommand*,
|
||||
break; // Match found
|
||||
}
|
||||
}
|
||||
if (iGS < 0 || iGS >= nSystems) {
|
||||
if (iGS < 0 || iGS >= nSystems || loopCounter >=3) {
|
||||
if (verbosity >= G4VisManager::errors) {
|
||||
G4cerr <<
|
||||
"ERROR: G4VisCommandSceneHandlerCreate::SetNewValue:"
|
||||
" could not find fallback graphics system for \""
|
||||
<< graphicsSystem
|
||||
<< "\"."
|
||||
"ERROR: G4VisCommandSceneHandlerCreate::SetNewValue: \""
|
||||
<< gsl[iGSBeingTested]->GetNickname()
|
||||
<< "\" is not compatible with your chosen session,"
|
||||
" and no fallback system found."
|
||||
<< G4endl;
|
||||
}
|
||||
return;
|
||||
}
|
||||
// A fallback system found...but go back and check this too.
|
||||
++loopCounter;
|
||||
}
|
||||
|
||||
// A graphics system has been found
|
||||
|
||||
@@ -82,18 +82,6 @@ G4VisCommandsTouchableSet::G4VisCommandsTouchableSet()
|
||||
fpCommandSetForceAuxEdgeVisible->SetParameterName("forceAuxEdgeVisible", omitable = true);
|
||||
fpCommandSetForceAuxEdgeVisible->SetDefaultValue(true);
|
||||
|
||||
fpCommandSetLineSegmentsPerCircle = new G4UIcmdWithAnInteger
|
||||
("/vis/touchable/set/lineSegmentsPerCircle", this);
|
||||
fpCommandSetLineSegmentsPerCircle->SetGuidance
|
||||
("For current touchable, set number of line segments per circle, the"
|
||||
"\nprecision with which a curved line or surface is represented by a"
|
||||
"\npolygon or polyhedron, regardless of the view parameters."
|
||||
"\nNegative to pick up G4Polyhedron default value.");
|
||||
fpCommandSetLineSegmentsPerCircle->SetGuidance
|
||||
("Use \"/vis/set/touchable\" to set current touchable.");
|
||||
fpCommandSetLineSegmentsPerCircle->SetParameterName("lineSegmentsPerCircle", omitable = true);
|
||||
fpCommandSetLineSegmentsPerCircle->SetDefaultValue(0);
|
||||
|
||||
fpCommandSetForceCloud = new G4UIcmdWithABool
|
||||
("/vis/touchable/set/forceCloud", this);
|
||||
fpCommandSetForceCloud->SetGuidance
|
||||
@@ -121,6 +109,18 @@ G4VisCommandsTouchableSet::G4VisCommandsTouchableSet()
|
||||
fpCommandSetForceWireframe->SetParameterName("forceWireframe", omitable = true);
|
||||
fpCommandSetForceWireframe->SetDefaultValue(true);
|
||||
|
||||
fpCommandSetLineSegmentsPerCircle = new G4UIcmdWithAnInteger
|
||||
("/vis/touchable/set/lineSegmentsPerCircle", this);
|
||||
fpCommandSetLineSegmentsPerCircle->SetGuidance
|
||||
("For current touchable, set number of line segments per circle, the"
|
||||
"\nprecision with which a curved line or surface is represented by a"
|
||||
"\npolygon or polyhedron, regardless of the view parameters."
|
||||
"\nNegative to pick up G4Polyhedron default value.");
|
||||
fpCommandSetLineSegmentsPerCircle->SetGuidance
|
||||
("Use \"/vis/set/touchable\" to set current touchable.");
|
||||
fpCommandSetLineSegmentsPerCircle->SetParameterName("lineSegmentsPerCircle", omitable = true);
|
||||
fpCommandSetLineSegmentsPerCircle->SetDefaultValue(0);
|
||||
|
||||
fpCommandSetLineStyle = new G4UIcmdWithAString
|
||||
("/vis/touchable/set/lineStyle", this);
|
||||
fpCommandSetLineStyle->SetGuidance("Set line style of current touchable drawing.");
|
||||
@@ -141,13 +141,11 @@ G4VisCommandsTouchableSet::G4VisCommandsTouchableSet()
|
||||
fpCommandSetNumberOfCloudPoints = new G4UIcmdWithAnInteger
|
||||
("/vis/touchable/set/numberOfCloudPoints", this);
|
||||
fpCommandSetNumberOfCloudPoints->SetGuidance
|
||||
("For current touchable, set number of line segments per circle, the"
|
||||
"\nprecision with which a curved line or surface is represented by a"
|
||||
"\npolygon or polyhedron, regardless of the view parameters."
|
||||
"\nNegative to pick up G4Polyhedron default value.");
|
||||
("For current touchable, set number of cloud points for cloud drawing."
|
||||
"\n<= 0 means under control of viewer.");
|
||||
fpCommandSetNumberOfCloudPoints->SetGuidance
|
||||
("Use \"/vis/set/touchable\" to set current touchable.");
|
||||
fpCommandSetNumberOfCloudPoints->SetParameterName("lineSegmentsPerCircle", omitable = true);
|
||||
fpCommandSetNumberOfCloudPoints->SetParameterName("numberOfCloudPoints", omitable = true);
|
||||
fpCommandSetNumberOfCloudPoints->SetDefaultValue(0);
|
||||
|
||||
fpCommandSetVisibility = new G4UIcmdWithABool
|
||||
|
||||
@@ -479,6 +479,7 @@ void G4VisManager::RegisterMessengers () {
|
||||
RegisterMessenger(new G4VisCommandGeometrySetLineStyle);
|
||||
RegisterMessenger(new G4VisCommandGeometrySetLineWidth);
|
||||
RegisterMessenger(new G4VisCommandGeometrySetForceAuxEdgeVisible);
|
||||
RegisterMessenger(new G4VisCommandGeometrySetForceCloud);
|
||||
RegisterMessenger(new G4VisCommandGeometrySetForceLineSegmentsPerCircle);
|
||||
RegisterMessenger(new G4VisCommandGeometrySetForceSolid);
|
||||
RegisterMessenger(new G4VisCommandGeometrySetForceWireframe);
|
||||
@@ -691,7 +692,8 @@ void G4VisManager::Disable() {
|
||||
"\n \"/tracking/storeTrajectory 0\""
|
||||
"\nbut don't forget to re-enable with"
|
||||
"\n \"/vis/enable\""
|
||||
"\n \"/tracking/storeTrajectory " << currentTrajectoryType << '\"'
|
||||
"\n \"/tracking/storeTrajectory " << currentTrajectoryType
|
||||
<< "\"\n and maybe \"/vis/viewer/rebuild\""
|
||||
<< G4endl;
|
||||
}
|
||||
}
|
||||
@@ -1613,14 +1615,14 @@ void G4VisManager::SetCurrentViewer (G4VViewer* pViewer) {
|
||||
|
||||
void G4VisManager::PrintAvailableGraphicsSystems (Verbosity verbosity) const
|
||||
{
|
||||
G4cout << "Current available graphics systems are:\n";
|
||||
G4cout << "Registered graphics systems are:\n";
|
||||
if (fAvailableGraphicsSystems.size ()) {
|
||||
for (const auto& gs: fAvailableGraphicsSystems) {
|
||||
const G4String& name = gs->GetName();
|
||||
const std::vector<G4String>& nicknames = gs->GetNicknames();
|
||||
if (verbosity <= warnings) {
|
||||
// Brief output
|
||||
G4cout << name << " (";
|
||||
G4cout << " " << name << " (";
|
||||
for (size_t i = 0; i < nicknames.size(); ++i) {
|
||||
if (i != 0) {
|
||||
G4cout << ", ";
|
||||
@@ -1635,7 +1637,7 @@ void G4VisManager::PrintAvailableGraphicsSystems (Verbosity verbosity) const
|
||||
G4cout << G4endl;
|
||||
}
|
||||
} else {
|
||||
G4cout << "\n NONE!!! None registered - yet! Mmmmm!" << G4endl;
|
||||
G4cout << " NONE!!! None registered - yet! Mmmmm!" << G4endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1649,15 +1651,17 @@ void G4VisManager::PrintAvailableModels (Verbosity verbosity) const
|
||||
if (factoryList.empty()) G4cout << " None" << G4endl;
|
||||
else {
|
||||
std::vector<G4VModelFactory<G4VTrajectoryModel>*>::const_iterator i;
|
||||
for (i = factoryList.begin(); i != factoryList.end(); ++i)
|
||||
(*i)->Print(G4cout);
|
||||
for (i = factoryList.begin(); i != factoryList.end(); ++i) {
|
||||
(*i)->Print(G4cout);
|
||||
}
|
||||
}
|
||||
G4cout << "\nRegistered models:" << G4endl;
|
||||
const G4VisListManager<G4VTrajectoryModel>* listManager =
|
||||
fpTrajDrawModelMgr->ListManager();
|
||||
const std::map<G4String, G4VTrajectoryModel*>& modelMap =
|
||||
listManager->Map();
|
||||
if (!modelMap.empty()) {
|
||||
G4cout << "\nRegistered models:" << G4endl;
|
||||
if (modelMap.empty()) G4cout << " None" << G4endl;
|
||||
else {
|
||||
std::map<G4String, G4VTrajectoryModel*>::const_iterator i;
|
||||
for (i = modelMap.begin(); i != modelMap.end(); ++i) {
|
||||
G4cout << " " << i->second->Name();
|
||||
@@ -1678,13 +1682,16 @@ void G4VisManager::PrintAvailableModels (Verbosity verbosity) const
|
||||
if (factoryList.empty()) G4cout << " None" << G4endl;
|
||||
else {
|
||||
std::vector<G4VModelFactory<G4VFilter<G4VTrajectory> >*>::const_iterator i;
|
||||
for (i = factoryList.begin(); i != factoryList.end(); ++i)
|
||||
(*i)->Print(G4cout);
|
||||
for (i = factoryList.begin(); i != factoryList.end(); ++i) {
|
||||
(*i)->Print(G4cout);
|
||||
}
|
||||
}
|
||||
|
||||
G4cout << "\nRegistered filters:" << G4endl;
|
||||
const std::vector<G4VFilter<G4VTrajectory>*>&
|
||||
filterList = fpTrajFilterMgr->FilterList();
|
||||
if (!filterList.empty()) {
|
||||
G4cout << "\nRegistered filters:" << G4endl;
|
||||
if (filterList.empty()) G4cout << " None" << G4endl;
|
||||
else {
|
||||
std::vector<G4VFilter<G4VTrajectory>*>::const_iterator i;
|
||||
for (i = filterList.begin(); i != filterList.end(); ++i) {
|
||||
G4cout << " " << (*i)->GetName() << G4endl;
|
||||
|
||||
Reference in New Issue
Block a user