Import Geant4 10.5.0.beta source tree
This commit is contained in:
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VViewer.hh 99668 2016-09-30 08:02:13Z gcosmo $
|
||||
// $Id: G4VViewer.hh 108859 2018-03-12 07:44:53Z gcosmo $
|
||||
//
|
||||
//
|
||||
// John Allison 27th March 1996
|
||||
@@ -102,17 +102,32 @@ public: // With description
|
||||
std::vector<G4ThreeVector> ComputeFlyThrough(G4Vector3D*);
|
||||
|
||||
#ifdef G4MULTITHREADED
|
||||
// In MT mode these functions are called in the following order for each run:
|
||||
// Note: the order of calling of MovingToVisSubThread and SwitchToVisSubThread
|
||||
// is undefined, so you may need to implement mutexes to ensure your preferred
|
||||
// order - see, e.g., G4OpenGLQtViewer. To summarise, the order of calling is
|
||||
// as follows - see G4VisManager.cc.
|
||||
// DoneWithMasterThread
|
||||
// MovingToVisSubThread ) or ( SwitchToVisSubThread
|
||||
// SwitchToVisSubThread ) ( MovingToVisSubThread
|
||||
// DoneWithVisSubThread
|
||||
// MovingToMasterThread
|
||||
// SwitchToMasterThread
|
||||
|
||||
// Called on the master thread before starting the vis sub-thread.
|
||||
virtual void DoneWithMasterThread ();
|
||||
|
||||
// Called on the master thread after starting the vis sub-thread.
|
||||
virtual void MovingToVisSubThread ();
|
||||
// Called on the vis sub-thread when waiting for events.
|
||||
|
||||
// Called on the vis sub-thread at start of vis sub-thread.
|
||||
virtual void SwitchToVisSubThread ();
|
||||
|
||||
// Called on the vis sub-thread when all events have been processed.
|
||||
virtual void DoneWithVisSubThread ();
|
||||
|
||||
// Called on the vis sub-thread when all events have been processed.
|
||||
virtual void MovingToMasterThread ();
|
||||
|
||||
// Called on the master thread after the vis sub-thread has terminated.
|
||||
virtual void SwitchToMasterThread ();
|
||||
#endif
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VVisCommand.hh 105349 2017-07-21 12:23:24Z gcosmo $
|
||||
// $Id: G4VVisCommand.hh 109186 2018-04-03 07:22:18Z gcosmo $
|
||||
|
||||
// Base class for visualization commands - John Allison 9th August 1998
|
||||
// It is really a messenger - we have one command per messenger.
|
||||
@@ -87,6 +87,13 @@ protected:
|
||||
// third and fourth arguments are ignored), or
|
||||
// (1.,0.,0.,0.5): this also will be red with opacity 0.5.
|
||||
|
||||
G4bool ProvideValueOfUnit
|
||||
(const G4String& where,
|
||||
const G4String& unit,
|
||||
const G4String& category,
|
||||
G4double& value);
|
||||
// Return false if there's a problem
|
||||
|
||||
// Other utilities.
|
||||
void UpdateVisManagerScene (const G4String& sceneName = "");
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ViewParameters.hh 99418 2016-09-21 09:18:42Z gcosmo $
|
||||
// $Id: G4ViewParameters.hh 109510 2018-04-26 07:15:57Z gcosmo $
|
||||
//
|
||||
//
|
||||
// John Allison 19th July 1996
|
||||
@@ -129,6 +129,8 @@ public: // With description
|
||||
G4bool IsDensityCulling () const;
|
||||
G4double GetVisibleDensity () const;
|
||||
G4bool IsCullingCovered () const;
|
||||
G4int GetCBDAlgorithmNumber () const;
|
||||
const std::vector<G4double>& GetCBDParameters () const;
|
||||
G4bool IsSection () const;
|
||||
const G4Plane3D& GetSectionPlane () const;
|
||||
G4bool IsCutaway () const;
|
||||
@@ -179,7 +181,25 @@ public: // With description
|
||||
RotationStyle GetRotationStyle () const;
|
||||
const std::vector<G4ModelingParameters::VisAttributesModifier>&
|
||||
GetVisAttributesModifiers () const;
|
||||
|
||||
G4double GetStartTime () const;
|
||||
G4double GetEndTime () const;
|
||||
G4double GetFadeFactor () const;
|
||||
G4bool IsDisplayHeadTime () const;
|
||||
G4double GetDisplayHeadTimeX () const;
|
||||
G4double GetDisplayHeadTimeY () const;
|
||||
G4double GetDisplayHeadTimeSize () const;
|
||||
G4double GetDisplayHeadTimeRed () const;
|
||||
G4double GetDisplayHeadTimeGreen () const;
|
||||
G4double GetDisplayHeadTimeBlue () const;
|
||||
G4bool IsDisplayLightFront () const;
|
||||
G4double GetDisplayLightFrontX () const;
|
||||
G4double GetDisplayLightFrontY () const;
|
||||
G4double GetDisplayLightFrontZ () const;
|
||||
G4double GetDisplayLightFrontT () const;
|
||||
G4double GetDisplayLightFrontRed () const;
|
||||
G4double GetDisplayLightFrontGreen () const;
|
||||
G4double GetDisplayLightFrontBlue () const;
|
||||
|
||||
// Here Follow functions to evaluate useful quantities as a
|
||||
// function of the radius of the Bounding Sphere of the object being
|
||||
// viewed. Call them in the order given - for efficiency, later
|
||||
@@ -200,6 +220,8 @@ public: // With description
|
||||
void SetDensityCulling (G4bool);
|
||||
void SetVisibleDensity (G4double visibleDensity);
|
||||
void SetCullingCovered (G4bool);
|
||||
void SetCBDAlgorithmNumber (G4int);
|
||||
void SetCBDParameters (const std::vector<G4double>&);
|
||||
void SetSectionPlane (const G4Plane3D& sectionPlane);
|
||||
void UnsetSectionPlane ();
|
||||
void SetCutawayMode (CutawayMode);
|
||||
@@ -250,6 +272,24 @@ public: // With description
|
||||
void SetRotationStyle (RotationStyle);
|
||||
void ClearVisAttributesModifiers ();
|
||||
void AddVisAttributesModifier(const G4ModelingParameters::VisAttributesModifier&);
|
||||
void SetStartTime (G4double);
|
||||
void SetEndTime (G4double);
|
||||
void SetFadeFactor (G4double);
|
||||
void SetDisplayHeadTime (G4bool);
|
||||
void SetDisplayHeadTimeX (G4double);
|
||||
void SetDisplayHeadTimeY (G4double);
|
||||
void SetDisplayHeadTimeSize (G4double);
|
||||
void SetDisplayHeadTimeRed (G4double);
|
||||
void SetDisplayHeadTimeGreen (G4double);
|
||||
void SetDisplayHeadTimeBlue (G4double);
|
||||
void SetDisplayLightFront (G4bool);
|
||||
void SetDisplayLightFrontX (G4double);
|
||||
void SetDisplayLightFrontY (G4double);
|
||||
void SetDisplayLightFrontZ (G4double);
|
||||
void SetDisplayLightFrontT (G4double);
|
||||
void SetDisplayLightFrontRed (G4double);
|
||||
void SetDisplayLightFrontGreen (G4double);
|
||||
void SetDisplayLightFrontBlue (G4double);
|
||||
|
||||
// Command dumping functions.
|
||||
// For camera commands we need to provide the standard target point from
|
||||
@@ -258,7 +298,8 @@ public: // With description
|
||||
G4String DrawingStyleCommands () const;
|
||||
G4String SceneModifyingCommands() const;
|
||||
G4String TouchableCommands () const;
|
||||
|
||||
G4String TimeWindowCommands () const;
|
||||
|
||||
// Other functions.
|
||||
void PrintDifferences (const G4ViewParameters& v) const;
|
||||
|
||||
@@ -287,6 +328,8 @@ private:
|
||||
G4bool fDensityCulling; // Density culling requested. If so...
|
||||
G4double fVisibleDensity; // ...density lower than this not drawn.
|
||||
G4bool fCullCovered; // Cull daughters covered by opaque mothers.
|
||||
G4int fCBDAlgorithmNumber; // Colour by density algorithm number.
|
||||
std::vector<G4double> fCBDParameters; // Colour by density parameters.
|
||||
G4bool fSection; // Section drawing requested (DCUT in GEANT3).
|
||||
G4Plane3D fSectionPlane; // Cut plane for section drawing (DCUT).
|
||||
CutawayMode fCutawayMode; // Cutaway mode.
|
||||
@@ -329,6 +372,16 @@ private:
|
||||
G4bool fPicking; // Request picking.
|
||||
RotationStyle fRotationStyle; // Rotation style.
|
||||
std::vector<G4ModelingParameters::VisAttributesModifier> fVisAttributesModifiers;
|
||||
G4double fStartTime, fEndTime; // Time range (e.g., for trajectory steps).
|
||||
G4double fFadeFactor; // 0: no fade; 1: maximum fade with time within range.
|
||||
G4bool fDisplayHeadTime; // Display head time (fEndTime) in 2D text.
|
||||
G4double fDisplayHeadTimeX, fDisplayHeadTimeY; // 2D screen coords.
|
||||
G4double fDisplayHeadTimeSize; // Screen size.
|
||||
G4double fDisplayHeadTimeRed, fDisplayHeadTimeGreen, fDisplayHeadTimeBlue;
|
||||
G4bool fDisplayLightFront;// Display light front at head time originating at
|
||||
G4double fDisplayLightFrontX, fDisplayLightFrontY, fDisplayLightFrontZ,
|
||||
fDisplayLightFrontT;
|
||||
G4double fDisplayLightFrontRed, fDisplayLightFrontGreen, fDisplayLightFrontBlue;
|
||||
|
||||
enum { // Constants for geometry mask in ParseGeometry and related functions.
|
||||
fNoValue = 0,
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ViewParameters.icc 99418 2016-09-21 09:18:42Z gcosmo $
|
||||
// $Id: G4ViewParameters.icc 109510 2018-04-26 07:15:57Z gcosmo $
|
||||
//
|
||||
//
|
||||
// John Allison 20th October 1996
|
||||
@@ -59,6 +59,14 @@ inline G4bool G4ViewParameters::IsCullingCovered () const {
|
||||
return fCullCovered;
|
||||
}
|
||||
|
||||
inline G4int G4ViewParameters::GetCBDAlgorithmNumber () const {
|
||||
return fCBDAlgorithmNumber;
|
||||
}
|
||||
|
||||
inline const std::vector<G4double>& G4ViewParameters::GetCBDParameters () const {
|
||||
return fCBDParameters;
|
||||
}
|
||||
|
||||
inline G4bool G4ViewParameters::IsSection () const {
|
||||
return fSection;
|
||||
}
|
||||
@@ -212,6 +220,78 @@ G4ViewParameters::GetVisAttributesModifiers() const {
|
||||
return fVisAttributesModifiers;
|
||||
}
|
||||
|
||||
inline G4double G4ViewParameters::GetStartTime () const {
|
||||
return fStartTime;
|
||||
}
|
||||
|
||||
inline G4double G4ViewParameters::GetEndTime () const {
|
||||
return fEndTime;
|
||||
}
|
||||
|
||||
inline G4double G4ViewParameters::GetFadeFactor () const {
|
||||
return fFadeFactor;
|
||||
}
|
||||
|
||||
inline G4bool G4ViewParameters::IsDisplayHeadTime () const {
|
||||
return fDisplayHeadTime;
|
||||
}
|
||||
|
||||
inline G4double G4ViewParameters::GetDisplayHeadTimeX () const {
|
||||
return fDisplayHeadTimeX;
|
||||
}
|
||||
|
||||
inline G4double G4ViewParameters::GetDisplayHeadTimeY () const {
|
||||
return fDisplayHeadTimeY;
|
||||
}
|
||||
|
||||
inline G4double G4ViewParameters::GetDisplayHeadTimeSize () const {
|
||||
return fDisplayHeadTimeSize;
|
||||
}
|
||||
|
||||
inline G4double G4ViewParameters::GetDisplayHeadTimeRed () const {
|
||||
return fDisplayHeadTimeRed;
|
||||
}
|
||||
|
||||
inline G4double G4ViewParameters::GetDisplayHeadTimeGreen () const {
|
||||
return fDisplayHeadTimeGreen;
|
||||
}
|
||||
|
||||
inline G4double G4ViewParameters::GetDisplayHeadTimeBlue () const {
|
||||
return fDisplayHeadTimeBlue;
|
||||
}
|
||||
|
||||
inline G4bool G4ViewParameters::IsDisplayLightFront () const {
|
||||
return fDisplayLightFront;
|
||||
}
|
||||
|
||||
inline G4double G4ViewParameters::GetDisplayLightFrontX () const {
|
||||
return fDisplayLightFrontX;
|
||||
}
|
||||
|
||||
inline G4double G4ViewParameters::GetDisplayLightFrontY () const {
|
||||
return fDisplayLightFrontY;
|
||||
}
|
||||
|
||||
inline G4double G4ViewParameters::GetDisplayLightFrontZ () const {
|
||||
return fDisplayLightFrontZ;
|
||||
}
|
||||
|
||||
inline G4double G4ViewParameters::GetDisplayLightFrontT () const {
|
||||
return fDisplayLightFrontT;
|
||||
}
|
||||
|
||||
inline G4double G4ViewParameters::GetDisplayLightFrontRed () const {
|
||||
return fDisplayLightFrontRed;
|
||||
}
|
||||
|
||||
inline G4double G4ViewParameters::GetDisplayLightFrontGreen () const {
|
||||
return fDisplayLightFrontGreen;
|
||||
}
|
||||
|
||||
inline G4double G4ViewParameters::GetDisplayLightFrontBlue () const {
|
||||
return fDisplayLightFrontBlue;
|
||||
}
|
||||
|
||||
inline void
|
||||
G4ViewParameters::SetDrawingStyle (G4ViewParameters::DrawingStyle style) {
|
||||
fDrawingStyle = style;
|
||||
@@ -237,6 +317,14 @@ inline void G4ViewParameters::SetCullingCovered (G4bool value) {
|
||||
fCullCovered = value;
|
||||
}
|
||||
|
||||
inline void G4ViewParameters::SetCBDAlgorithmNumber (G4int n) {
|
||||
fCBDAlgorithmNumber = n;
|
||||
}
|
||||
|
||||
inline void G4ViewParameters::SetCBDParameters (const std::vector<G4double>& p) {
|
||||
fCBDParameters = p;
|
||||
}
|
||||
|
||||
inline void G4ViewParameters::SetSectionPlane (const G4Plane3D& sectionPlane) {
|
||||
fSection = true;
|
||||
fSectionPlane = sectionPlane;
|
||||
@@ -391,3 +479,74 @@ inline void G4ViewParameters::ClearVisAttributesModifiers () {
|
||||
fVisAttributesModifiers.clear ();
|
||||
}
|
||||
|
||||
inline void G4ViewParameters::SetStartTime (G4double startTime) {
|
||||
fStartTime = startTime;
|
||||
}
|
||||
|
||||
inline void G4ViewParameters::SetEndTime (G4double endTime) {
|
||||
fEndTime = endTime;
|
||||
}
|
||||
|
||||
inline void G4ViewParameters::SetFadeFactor (G4double fadeFactor) {
|
||||
fFadeFactor = fadeFactor;
|
||||
}
|
||||
|
||||
inline void G4ViewParameters::SetDisplayHeadTime (G4bool displayHeadTime) {
|
||||
fDisplayHeadTime = displayHeadTime;
|
||||
}
|
||||
|
||||
inline void G4ViewParameters::SetDisplayHeadTimeX (G4double displayHeadTimeX) {
|
||||
fDisplayHeadTimeX = displayHeadTimeX;
|
||||
}
|
||||
|
||||
inline void G4ViewParameters::SetDisplayHeadTimeY (G4double displayHeadTimeY) {
|
||||
fDisplayHeadTimeY = displayHeadTimeY;
|
||||
}
|
||||
|
||||
inline void G4ViewParameters::SetDisplayHeadTimeSize (G4double displayHeadTimeSize) {
|
||||
fDisplayHeadTimeSize = displayHeadTimeSize;
|
||||
}
|
||||
|
||||
inline void G4ViewParameters::SetDisplayHeadTimeRed (G4double displayHeadTimeRed) {
|
||||
fDisplayHeadTimeRed = displayHeadTimeRed;
|
||||
}
|
||||
|
||||
inline void G4ViewParameters::SetDisplayHeadTimeGreen (G4double displayHeadTimeGreen) {
|
||||
fDisplayHeadTimeGreen = displayHeadTimeGreen;
|
||||
}
|
||||
|
||||
inline void G4ViewParameters::SetDisplayHeadTimeBlue (G4double displayHeadTimeBlue) {
|
||||
fDisplayHeadTimeBlue = displayHeadTimeBlue;
|
||||
}
|
||||
|
||||
inline void G4ViewParameters::SetDisplayLightFront (G4bool displayLightFront) {
|
||||
fDisplayLightFront = displayLightFront;
|
||||
}
|
||||
|
||||
inline void G4ViewParameters::SetDisplayLightFrontX (G4double displayLightFrontX) {
|
||||
fDisplayLightFrontX = displayLightFrontX;
|
||||
}
|
||||
|
||||
inline void G4ViewParameters::SetDisplayLightFrontY (G4double displayLightFrontY) {
|
||||
fDisplayLightFrontY = displayLightFrontY;
|
||||
}
|
||||
|
||||
inline void G4ViewParameters::SetDisplayLightFrontZ (G4double displayLightFrontZ) {
|
||||
fDisplayLightFrontZ = displayLightFrontZ;
|
||||
}
|
||||
|
||||
inline void G4ViewParameters::SetDisplayLightFrontT (G4double displayLightFrontT) {
|
||||
fDisplayLightFrontT = displayLightFrontT;
|
||||
}
|
||||
|
||||
inline void G4ViewParameters::SetDisplayLightFrontRed (G4double displayLightFrontRed) {
|
||||
fDisplayLightFrontRed = displayLightFrontRed;
|
||||
}
|
||||
|
||||
inline void G4ViewParameters::SetDisplayLightFrontGreen (G4double displayLightFrontGreen) {
|
||||
fDisplayLightFrontGreen = displayLightFrontGreen;
|
||||
}
|
||||
|
||||
inline void G4ViewParameters::SetDisplayLightFrontBlue (G4double displayLightFrontBlue) {
|
||||
fDisplayLightFrontBlue = displayLightFrontBlue;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommandsCompound.hh 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
// $Id: G4VisCommandsCompound.hh 110513 2018-05-28 07:37:38Z gcosmo $
|
||||
|
||||
// Compound /vis/ commands - John Allison 15th May 2000
|
||||
|
||||
@@ -55,7 +55,18 @@ private:
|
||||
G4UIcommand* fpCommand;
|
||||
};
|
||||
|
||||
class G4VisCommandDrawVolume: public G4VVisCommand {
|
||||
class G4VisCommandDrawLogicalVolume: public G4VVisCommand {
|
||||
public:
|
||||
G4VisCommandDrawLogicalVolume ();
|
||||
virtual ~G4VisCommandDrawLogicalVolume ();
|
||||
void SetNewValue (G4UIcommand* command, G4String newValue);
|
||||
private:
|
||||
G4VisCommandDrawLogicalVolume (const G4VisCommandDrawLogicalVolume&);
|
||||
G4VisCommandDrawLogicalVolume& operator = (const G4VisCommandDrawLogicalVolume&);
|
||||
G4UIcommand* fpCommand;
|
||||
};
|
||||
|
||||
class G4VisCommandDrawVolume: public G4VVisCommand {
|
||||
public:
|
||||
G4VisCommandDrawVolume ();
|
||||
virtual ~G4VisCommandDrawVolume ();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommandsViewer.hh 102234 2017-01-13 15:59:41Z gcosmo $
|
||||
// $Id: G4VisCommandsViewer.hh 109510 2018-04-26 07:15:57Z gcosmo $
|
||||
|
||||
// /vis/viewer commands - John Allison 25th October 1998
|
||||
|
||||
@@ -140,6 +140,18 @@ private:
|
||||
G4UIcommand* fpCommand;
|
||||
};
|
||||
|
||||
class G4VisCommandViewerColourByDensity: public G4VVisCommandViewer {
|
||||
public:
|
||||
G4VisCommandViewerColourByDensity ();
|
||||
virtual ~G4VisCommandViewerColourByDensity ();
|
||||
G4String GetCurrentValue (G4UIcommand* command);
|
||||
void SetNewValue (G4UIcommand* command, G4String newValue);
|
||||
private:
|
||||
G4VisCommandViewerColourByDensity (const G4VisCommandViewerColourByDensity&);
|
||||
G4VisCommandViewerColourByDensity& operator = (const G4VisCommandViewerColourByDensity&);
|
||||
G4UIcommand* fpCommand;
|
||||
};
|
||||
|
||||
class G4VisCommandViewerCopyViewFrom: public G4VVisCommandViewer {
|
||||
public:
|
||||
G4VisCommandViewerCopyViewFrom ();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommandsViewerSet.hh 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
// $Id: G4VisCommandsViewerSet.hh 108131 2018-01-09 13:23:26Z gcosmo $
|
||||
|
||||
// /vis/viewer/set commands - John Allison 16th May 2000
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
class G4UIdirectory;
|
||||
class G4UIcommand;
|
||||
class G4UIcmdWithAString;
|
||||
class G4UIcmdWithABool;
|
||||
@@ -82,6 +83,12 @@ private:
|
||||
G4UIcommand* fpCommandViewpointThetaPhi;
|
||||
G4UIcommand* fpCommandViewpointVector;
|
||||
G4ThreeVector fViewpointVector;
|
||||
G4UIdirectory* fpTimeWindowDirectory;
|
||||
G4UIcommand* fpCommandTimeWindowDisplayHeadTime;
|
||||
G4UIcommand* fpCommandTimeWindowDisplayLightFront;
|
||||
G4UIcommand* fpCommandTimeWindowEndTime;
|
||||
G4UIcmdWithADouble* fpCommandTimeWindowFadeFactor;
|
||||
G4UIcommand* fpCommandTimeWindowStartTime;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user