File indexing completed on 2025-01-18 09:59:28
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031 #ifndef G4VVISCOMMAND_HH
0032 #define G4VVISCOMMAND_HH
0033
0034 #include "G4VisManager.hh"
0035 #include "G4UImessenger.hh"
0036 #include "G4ThreeVector.hh"
0037 #include "G4Text.hh"
0038 #include "G4VisAttributes.hh"
0039 #include "G4VMarker.hh"
0040 #include "G4ModelingParameters.hh"
0041 #include "G4PhysicalVolumesSearchScene.hh"
0042 #include "G4SceneTreeItem.hh"
0043
0044 #include <vector>
0045
0046 class G4UIcommand;
0047 class G4UIcmdWithAString;
0048
0049 class G4VVisCommand: public G4UImessenger
0050 {
0051 public:
0052
0053
0054 G4VVisCommand ();
0055 virtual ~G4VVisCommand ();
0056
0057 static G4VisManager* GetVisManager ();
0058
0059 static void SetVisManager (G4VisManager* pVisManager);
0060
0061 static const G4Colour& GetCurrentTextColour();
0062
0063 protected:
0064
0065
0066
0067 void SetViewParameters(G4VViewer* viewer, const G4ViewParameters& viewParams);
0068
0069 void RefreshIfRequired(G4VViewer* viewer);
0070
0071 void InterpolateViews
0072 (G4VViewer* currentViewer,
0073 std::vector<G4ViewParameters> viewVector,
0074 const G4int nInterpolationPoints = 50,
0075 const G4int waitTimePerPointmilliseconds = 20,
0076 const G4String exportString = "");
0077
0078 void InterpolateToNewView
0079 (G4VViewer* currentViewer,
0080 const G4ViewParameters& oldVP,
0081 const G4ViewParameters& newVP,
0082 const G4int nInterpolationPoints = 50,
0083 const G4int waitTimePerPointmilliseconds = 20,
0084 const G4String exportString = "");
0085
0086 void Twinkle
0087
0088
0089 (G4VViewer* currentViewer,
0090 const G4ViewParameters& baseVP,
0091 const std::vector<std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>>& paths);
0092
0093
0094
0095 static G4String ConvertToString(G4double x, G4double y,
0096 const char * unitName);
0097
0098 static G4bool ConvertToDoublePair(const G4String& paramString,
0099 G4double& xval,
0100 G4double& yval);
0101
0102
0103 const G4String& ConvertToColourGuidance();
0104 void ConvertToColour
0105 (G4Colour& colour,
0106 const G4String& redOrString,
0107 G4double green,
0108 G4double blue,
0109 G4double opacity);
0110
0111
0112
0113
0114
0115
0116
0117
0118
0119 G4bool ProvideValueOfUnit
0120 (const G4String& where,
0121 const G4String& unit,
0122 const G4String& category,
0123 G4double& value);
0124
0125
0126 void CopyCameraParameters
0127 (G4ViewParameters& target, const G4ViewParameters& from);
0128
0129
0130
0131
0132 void CheckSceneAndNotifyHandlers (G4Scene* = nullptr);
0133
0134 G4bool CheckView();
0135
0136 void G4VisCommandsSceneAddUnsuccessful(G4VisManager::Verbosity verbosity);
0137
0138 void CopyGuidanceFrom
0139 (const G4UIcommand* fromCmd, G4UIcommand* toCmd, G4int startLine = 0);
0140
0141 void CopyParametersFrom
0142 (const G4UIcommand* fromCmd, G4UIcommand* toCmd);
0143
0144 void DrawExtent(const G4VisExtent&);
0145
0146
0147
0148 static G4VisManager* fpVisManager;
0149
0150
0151 static G4int fCurrentArrow3DLineSegmentsPerCircle;
0152 static G4Colour fCurrentColour;
0153 static G4double fCurrentLineWidth;
0154
0155
0156
0157 static G4Colour fCurrentTextColour;
0158 static G4Text::Layout fCurrentTextLayout;
0159 static G4double fCurrentTextSize;
0160 static G4PhysicalVolumeModel::TouchableProperties fCurrentTouchableProperties;
0161 static G4VisExtent fCurrentExtentForField;
0162 static std::vector<G4PhysicalVolumesSearchScene::Findings> fCurrrentPVFindingsForField;
0163
0164
0165
0166
0167
0168 static G4bool fThereWasAViewer;
0169 static G4ViewParameters fExistingVP;
0170 static G4SceneTreeItem fExistingSceneTree;
0171 };
0172
0173 #endif