ECCE @ EIC Software
Reference for
ECCE @ EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4VVisCommand.hh
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4VVisCommand.hh
1
//
2
// ********************************************************************
3
// * License and Disclaimer *
4
// * *
5
// * The Geant4 software is copyright of the Copyright Holders of *
6
// * the Geant4 Collaboration. It is provided under the terms and *
7
// * conditions of the Geant4 Software License, included in the file *
8
// * LICENSE and available at http://cern.ch/geant4/license . These *
9
// * include a list of copyright holders. *
10
// * *
11
// * Neither the authors of this software system, nor their employing *
12
// * institutes,nor the agencies providing financial support for this *
13
// * work make any representation or warranty, express or implied, *
14
// * regarding this software system or assume any liability for its *
15
// * use. Please see the license in the file LICENSE and URL above *
16
// * for the full disclaimer and the limitation of liability. *
17
// * *
18
// * This code implementation is the result of the scientific and *
19
// * technical work of the GEANT4 collaboration. *
20
// * By using, copying, modifying or distributing the software (or *
21
// * any work based on the software) you agree to acknowledge its *
22
// * use in resulting scientific publications, and indicate your *
23
// * acceptance of all terms of the Geant4 Software license. *
24
// ********************************************************************
25
//
26
//
27
28
// Base class for visualization commands - John Allison 9th August 1998
29
// It is really a messenger - we have one command per messenger.
30
31
#ifndef G4VVISCOMMAND_HH
32
#define G4VVISCOMMAND_HH
33
34
#include "
G4VisManager.hh
"
35
#include "
G4UImessenger.hh
"
36
#include "
G4ThreeVector.hh
"
37
#include "
G4Text.hh
"
38
#include "
G4VisAttributes.hh
"
39
#include "
G4VMarker.hh
"
40
#include "
G4ModelingParameters.hh
"
41
#include "
G4PhysicalVolumesSearchScene.hh
"
42
#include <vector>
43
44
class
G4UIcommand
;
45
class
G4UIcmdWithAString
;
46
47
class
G4VVisCommand
:
public
G4UImessenger
48
{
49
public
:
50
51
// Uses compiler defaults for copy constructor and assignment.
52
G4VVisCommand
();
53
virtual
~G4VVisCommand
();
54
55
static
void
SetVisManager
(
G4VisManager
* pVisManager)
56
{
fpVisManager
= pVisManager;}
57
58
static
const
G4Colour
&
GetCurrentTextColour
()
59
{
return
fCurrentTextColour
;}
60
61
protected
:
62
63
// Utility functions
64
65
void
SetViewParameters
(
G4VViewer
* viewer,
const
G4ViewParameters
& viewParams);
66
67
void
RefreshIfRequired
(
G4VViewer
* viewer);
68
69
void
InterpolateViews
70
(
G4VViewer
* currentViewer,
71
std::vector<G4ViewParameters> viewVector,
72
const
G4int
nInterpolationPoints = 50,
73
const
G4int
waitTimePerPointmilliseconds = 20,
74
const
G4String
exportString =
""
);
75
76
void
InterpolateToNewView
77
(
G4VViewer
* currentViewer,
78
const
G4ViewParameters
& oldVP,
79
const
G4ViewParameters
& newVP,
80
const
G4int
nInterpolationPoints = 50,
81
const
G4int
waitTimePerPointmilliseconds = 20,
82
const
G4String
exportString =
""
);
83
84
// Conversion routines augmenting those in G4UIcommand.
85
86
static
G4String
ConvertToString
(
G4double
x
,
G4double
y
,
87
const
char
* unitName);
88
89
static
G4bool
ConvertToDoublePair
(
const
G4String
& paramString,
90
G4double
& xval,
91
G4double
& yval);
92
// Return false if problem parsing paramString.
93
94
const
G4String
&
ConvertToColourGuidance
();
95
void
ConvertToColour
96
(
G4Colour
& colour,
97
const
G4String
& redOrString,
98
G4double
green,
99
G4double
blue,
100
G4double
opacity);
101
// Note: colour is supplied by the caller and becomes the default if the
102
// remaining parameters cannot be parsed.
103
// Note: redOrString is either a number or string. If a string it must be
104
// one of the recognised colours.
105
// Thus the arguments can be, for example:
106
// (colour,"red",...,...,0.5): will give the colour red with opacity 0.5 (the
107
// third and fourth arguments are ignored), or
108
// (1.,0.,0.,0.5): this also will be red with opacity 0.5.
109
110
G4bool
ProvideValueOfUnit
111
(
const
G4String
& where,
112
const
G4String
& unit,
113
const
G4String
& category,
114
G4double
&
value
);
115
// Return false if there's a problem
116
117
// Other utilities
118
119
void
CheckSceneAndNotifyHandlers
(
G4Scene
* =
nullptr
);
120
121
void
G4VisCommandsSceneAddUnsuccessful
(
G4VisManager::Verbosity
verbosity);
122
123
void
CopyGuidanceFrom
124
(
const
G4UIcommand
* fromCmd,
G4UIcommand
* toCmd,
G4int
startLine = 0);
125
126
void
CopyParametersFrom
127
(
const
G4UIcommand
* fromCmd,
G4UIcommand
* toCmd);
128
129
void
DrawExtent
(
const
G4VisExtent
&);
130
131
// Data members
132
133
static
G4VisManager
*
fpVisManager
;
134
135
static
G4int
fErrorCode
;
136
137
// Current quantities for use in appropriate commands
138
static
G4int
fCurrentArrow3DLineSegmentsPerCircle
;
139
static
G4Colour
fCurrentColour
;
140
static
G4double
fCurrentLineWidth
;
141
//static G4VisAttributes::LineStyle fCurrentLineStyle; Not yet used.
142
//static G4VMarker::FillStyle fCurrentFillStyle; Not yet used.
143
//static G4VMarker::SizeType fCurrentSizeType; Not yet used.
144
static
G4Colour
fCurrentTextColour
;
145
static
G4Text::Layout
fCurrentTextLayout
;
146
static
G4double
fCurrentTextSize
;
147
static
G4PhysicalVolumeModel::TouchableProperties
fCurrentTouchableProperties
;
148
static
G4VisExtent
fCurrentExtentForField
;
149
static
std::vector<G4PhysicalVolumesSearchScene::Findings>
fCurrrentPVFindingsForField
;
150
};
151
152
#endif
geant4
tree
geant4-10.6-release
source
visualization
management
include
G4VVisCommand.hh
Built by
Jin Huang
. updated:
Wed Jun 29 2022 17:25:55
using
1.8.2 with
ECCE GitHub integration