Import Geant4 11.4.0 source tree

This commit is contained in:
Gabriele Cosmo
2025-12-05 08:54:02 +01:00
parent a499fb82e9
commit b4a16de652
6484 changed files with 232674 additions and 221097 deletions
@@ -188,6 +188,13 @@ public: // With description
const G4SceneTreeItem& GetSceneTree() {return fSceneTree;}
G4SceneTreeItem& AccessSceneTree() {return fSceneTree;}
void UpdateGUISceneTree(); // A utility
//GUI update functions
void UpdateGUIControlWidgets();
void UpdateGUIDrawingStyle();
void UpdateGUIProjectionStyle();
void UpdateGUITransparencySlider();
const G4int fMaxAllTouchables = 10000; // Limits memory to about 50 MB per PV model
G4bool fCurtailDescent = false; // Flag to curtail descent into PV model for scene tree
@@ -230,6 +237,11 @@ public: // With description
void ProcessTransients ();
// Re-draws transients only
void ZoomFromMouseWheel(G4double delta, G4bool shift = false, G4double xPos = 0, G4double yPos = 0);
virtual G4bool GetWindowSize(unsigned int& a_w,unsigned int& a_h) {a_w = 0; a_h = 0; return false;}
virtual G4double GetSceneNearWidth() {return 0;}
protected:
//////////////////////////////////////////////////////////////
@@ -201,6 +201,9 @@ public: // With description
const std::vector<G4ModelingParameters::PVNameCopyNo>& GetSpecialMeshVolumes () const;
G4double GetTransparencyByDepth () const;
G4int GetTransparencyByDepthOption () const;
G4bool IsZoomToCursor () const;
G4bool IsDotsSmooth () const;
G4double GetDotsSize () const;
// Here Follow functions to evaluate useful quantities as a
// function of the radius of the Bounding Extent of the object being
@@ -281,6 +284,9 @@ public: // With description
void SetSpecialMeshVolumes (const std::vector<G4ModelingParameters::PVNameCopyNo>&);
void SetTransparencyByDepth (G4double);
void SetTransparencyByDepthOption (G4int);
void SetZoomToCursor (G4bool);
void SetDotsSmooth (G4bool);
void SetDotsSize (G4double);
// Command dumping functions.
// For camera commands we need to provide the standard target point from
@@ -371,6 +377,9 @@ private:
std::vector<G4ModelingParameters::PVNameCopyNo> fSpecialMeshVolumes; // If empty, all meshes.
G4double fTransparencyByDepth; // Transparency ~= (geometry depth) - fTransparencyByDepth
G4int fTransparencyByDepthOption; // Its option
G4bool fZoomToCursor; // If possible zoom to cursor with mouse wheel
G4bool fDotsSmooth; // Use glEnable(GL_POINT_SMOOTH) or equivalent for dots if available
G4double fDotsSize; // Size of G4Polymarker::dots
enum { // Constants for geometry mask in ParseGeometry and related functions.
fNoValue = 0,
@@ -253,6 +253,18 @@ inline G4int G4ViewParameters::GetTransparencyByDepthOption () const {
return fTransparencyByDepthOption;
}
inline G4bool G4ViewParameters::IsZoomToCursor () const {
return fZoomToCursor;
}
inline G4bool G4ViewParameters::IsDotsSmooth () const {
return fDotsSmooth;
}
inline G4double G4ViewParameters:: GetDotsSize () const {
return fDotsSize;
}
inline void
G4ViewParameters::SetDrawingStyle (G4ViewParameters::DrawingStyle style) {
fDrawingStyle = style;
@@ -462,3 +474,15 @@ inline void G4ViewParameters::SetTransparencyByDepth (G4double transparencyByDep
inline void G4ViewParameters::SetTransparencyByDepthOption (G4int transparencyByDepthOption) {
fTransparencyByDepthOption = transparencyByDepthOption;
}
inline void G4ViewParameters::SetZoomToCursor (G4bool zoomToCursor){
fZoomToCursor = zoomToCursor;
}
inline void G4ViewParameters::SetDotsSmooth (G4bool dotsSmooth){
fDotsSmooth = dotsSmooth;
}
inline void G4ViewParameters::SetDotsSize (G4double dotsSize){
fDotsSize = dotsSize;
}
@@ -60,6 +60,8 @@ private:
G4UIcmdWithAString* fpCommandCutawayMode;
G4UIcommand* fpCommandDefaultColour;
G4UIcommand* fpCommandDefaultTextColour;
G4UIcmdWithADouble* fpCommandDotsSize;
G4UIcmdWithABool* fpCommandDotsSmooth;
G4UIcmdWithABool* fpCommandEdge;
G4UIcommand* fpCommandExplodeFactor;
G4UIcmdWithADouble* fpCommandGlobalMarkerScale;
@@ -95,6 +97,7 @@ private:
G4UIcommand* fpCommandTimeWindowEndTime;
G4UIcmdWithADouble* fpCommandTimeWindowFadeFactor;
G4UIcommand* fpCommandTimeWindowStartTime;
G4UIcmdWithABool* fpCommandZoomToCursor;
};
#endif
@@ -41,7 +41,6 @@
// Not needing external packages or libraries...
#include "G4ASCIITree.hh" // no_geant4_module_check
#include "G4DAWNFILE.hh" // no_geant4_module_check
#include "G4HepRepFile.hh" // no_geant4_module_check
#include "G4RayTracer.hh" // no_geant4_module_check
#include "G4VRML2File.hh" // no_geant4_module_check
#include "G4GMocrenFile.hh" // no_geant4_module_check
@@ -89,10 +88,6 @@
#include "G4RayTracerQt.hh" // no_geant4_module_check
#endif
#ifdef G4VIS_USE_QT3D
#include "G4Qt3D.hh" // no_geant4_module_check
#endif
#ifdef G4VIS_USE_TOOLSSG_X11_GLES
#include "G4ToolsSGX11GLES.hh" // no_geant4_module_check
#endif
@@ -128,10 +123,6 @@
#ifdef G4VIS_USE_VTK
#include "G4Vtk.hh" // no_geant4_module_check
#include "G4VtkOffscreen.hh" // no_geant4_module_check
#undef G4VIS_USE_TOOLSSG_X11_GLES
#undef G4VIS_USE_TOOLSSG_XT_GLES
#undef G4VIS_USE_TOOLSSG_QT_GLES
#undef G4VIS_USE_TOOLSSG_WINDOWS_GLES
#undef G4VIS_USE_OPENGLQT
#undef G4VIS_USE_OPENGLXM
#undef G4VIS_USE_OPENGLX
@@ -326,8 +317,6 @@ void G4VisExecutive::SetDefaultsByBuildFlags()
#elif defined G4VIS_USE_TOOLSSG_QT_ZB || G4VIS_USE_TOOLSSG_X11_ZB ||\
G4VIS_USE_TOOLSSG_XT_ZB || G4VIS_USE_TOOLSSG_WINDOWS_ZB
fDefaultGraphicsSystemName = "TSG";
#elif defined G4VIS_USE_QT3D
fDefaultGraphicsSystemName = "Qt3D";
#else
// Choose a graphics system not needing external packages or libraries
fDefaultGraphicsSystemName = "TSG_OFFSCREEN";
@@ -342,7 +331,6 @@ void G4VisExecutive::RegisterGraphicsSystems () {
// Graphics Systems not needing external packages or libraries...
RegisterGraphicsSystem (new G4ASCIITree);
RegisterGraphicsSystem (new G4DAWNFILE);
RegisterGraphicsSystem (new G4HepRepFile);
RegisterGraphicsSystem (new G4RayTracer);
RegisterGraphicsSystem (new G4VRML2File);
RegisterGraphicsSystem (new G4GMocrenFile);
@@ -441,10 +429,6 @@ void G4VisExecutive::RegisterGraphicsSystems () {
RegisterGraphicsSystem(new G4RayTracerQt);
#endif
#ifdef G4VIS_USE_QT3D
RegisterGraphicsSystem(new G4Qt3D);
#endif
#ifdef G4VIS_USE_TOOLSSG_X11_GLES
G4VGraphicsSystem* tsg_x11_gles = new G4ToolsSGX11GLES;
RegisterGraphicsSystem(tsg_x11_gles);
@@ -505,15 +489,27 @@ void G4VisExecutive::RegisterGraphicsSystems () {
#ifdef G4VIS_USE_TOOLSSG_QT_GLES
tsg_qt_gles->AddNickname("TSG");
tsg_qt_gles->AddNickname("OGL");
#ifdef G4VIS_USE_TOOLSSG_QT_ZB
tsg_qt_zb->AddNickname("TSGZB");
#endif
#elif defined(G4VIS_USE_TOOLSSG_XT_GLES)
tsg_xt_gles->AddNickname("TSG");
tsg_xt_gles->AddNickname("OGL");
#ifdef G4VIS_USE_TOOLSSG_XT_ZB
tsg_xt_zb->AddNickname("TSGZB");
#endif
#elif defined(G4VIS_USE_TOOLSSG_X11_GLES)
tsg_x11_gles->AddNickname("TSG");
tsg_x11_gles->AddNickname("OGL");
#ifdef G4VIS_USE_TOOLSSG_X11_ZB
tsg_x11_zb->AddNickname("TSGZB");
#endif
#elif defined(G4VIS_USE_TOOLSSG_WINDOWS_GLES)
tsg_windows_gles->AddNickname("TSG");
tsg_windows_gles->AddNickname("OGL");
#ifdef G4VIS_USE_TOOLSSG_WINDOWS_ZB
tsg_windows_zb->AddNickname("TSGZB");
#endif
#else
#ifdef G4VIS_USE_TOOLSSG_QT_ZB
tsg_qt_zb->AddNickname("TSG");