38fDaughtersInvisible (false),
42fForceDrawingStyle (false),
43fForcedStyle (wireframe),
44fForcedNumberOfCloudPoints (0),
45fForceAuxEdgeVisible (false),
46fForcedAuxEdgeVisible(false),
47fForcedLineSegmentsPerCircle (0),
48fStartTime (-fVeryLongTime),
49fEndTime (fVeryLongTime),
56fDaughtersInvisible (false),
60fForceDrawingStyle (false),
61fForcedStyle (wireframe),
62fForcedNumberOfCloudPoints (0),
63fForceAuxEdgeVisible (false),
64fForcedAuxEdgeVisible(false),
65fForcedLineSegmentsPerCircle (0),
66fStartTime (-fVeryLongTime),
67fEndTime (fVeryLongTime),
74fDaughtersInvisible (false),
78fForceDrawingStyle (false),
79fForcedStyle (wireframe),
80fForcedNumberOfCloudPoints (0),
81fForceAuxEdgeVisible (false),
82fForcedAuxEdgeVisible(false),
83fForcedLineSegmentsPerCircle (0),
84fStartTime (-fVeryLongTime),
85fEndTime (fVeryLongTime),
93fDaughtersInvisible (false),
97fForceDrawingStyle (false),
98fForcedStyle (wireframe),
99fForcedNumberOfCloudPoints (0),
100fForceAuxEdgeVisible (false),
101fForcedAuxEdgeVisible(false),
102fForcedLineSegmentsPerCircle (0),
103fStartTime (-fVeryLongTime),
104fEndTime (fVeryLongTime),
110fVisible (va.fVisible),
111fDaughtersInvisible (va.fDaughtersInvisible),
113fLineStyle (va.fLineStyle),
114fLineWidth (va.fLineWidth),
115fForceDrawingStyle (va.fForceDrawingStyle),
116fForcedStyle (va.fForcedStyle),
117fForcedNumberOfCloudPoints (va.fForcedNumberOfCloudPoints),
118fForceAuxEdgeVisible (va.fForceAuxEdgeVisible),
119fForcedAuxEdgeVisible(va.fForcedAuxEdgeVisible),
120fForcedLineSegmentsPerCircle (va.fForcedLineSegmentsPerCircle),
121fStartTime (va.fStartTime),
122fEndTime (va.fEndTime),
126fAttValues (va.fAttValues),
129fAttDefs (va.fAttDefs)
137 if (&rhs ==
this)
return *
this;
138 fVisible = rhs.fVisible;
139 fDaughtersInvisible = rhs.fDaughtersInvisible;
140 fColour = rhs.fColour;
141 fLineStyle = rhs.fLineStyle;
142 fLineWidth = rhs.fLineWidth;
143 fForceDrawingStyle = rhs.fForceDrawingStyle;
144 fForcedStyle = rhs.fForcedStyle;
145 fForcedNumberOfCloudPoints = rhs.fForcedNumberOfCloudPoints;
146 fForceAuxEdgeVisible = rhs.fForceAuxEdgeVisible;
147 fForcedAuxEdgeVisible = rhs.fForcedAuxEdgeVisible;
148 fForcedLineSegmentsPerCircle = rhs.fForcedLineSegmentsPerCircle;
149 fStartTime = rhs.fStartTime;
150 fEndTime = rhs.fEndTime;
154 fAttValues = rhs.fAttValues;
157 fAttDefs = rhs.fAttDefs;
173 fForceDrawingStyle =
true;
176 fForceDrawingStyle =
false;
182 fForceDrawingStyle =
true;
185 fForceDrawingStyle =
false;
191 fForceDrawingStyle =
true;
194 fForceDrawingStyle =
false;
199 fForcedNumberOfCloudPoints = nPoints;
202 "G4VisAttributes::SetForceNumberOfCloudPoints: number of cloud points"
203 "set to " << fForcedNumberOfCloudPoints
204 <<
". This means the viewer default will be used."
210 fForceAuxEdgeVisible =
true;
211 fForcedAuxEdgeVisible = visibility;
216 if (fForceDrawingStyle)
return fForcedStyle;
221 if (fForceAuxEdgeVisible)
return fForcedAuxEdgeVisible;
227 return new std::vector<G4AttValue>(*fAttValues);
232 if (nSegments > 0 && nSegments < nSegmentsMin) {
233 nSegments = nSegmentsMin;
235 "G4VisAttributes::SetForcedLineSegmentsPerCircle: attempt to set the"
236 "\nnumber of line segments per circle < " << nSegmentsMin
237 <<
"; forced to " << nSegments <<
G4endl;
239 fForcedLineSegmentsPerCircle = nSegments;
244 os <<
"G4VisAttributes: ";
245 if (!a.fVisible) os <<
"in";
246 os <<
"visible, daughters ";
247 if (a.fDaughtersInvisible) os <<
"in";
248 os <<
"visible, colour: " << a.fColour;
249 os <<
"\n linestyle: ";
250 switch (a.fLineStyle) {
252 os <<
"solid";
break;
254 os <<
"dashed";
break;
256 default: os <<
"unrecognised";
break;
258 os <<
", line width: " << a.fLineWidth;
260 os <<
"\n drawing style: ";
261 if (a.fForceDrawingStyle) {
263 switch (a.fForcedStyle) {
265 os <<
"wireframe";
break;
267 os <<
"solid";
break;
268 default: os <<
"unrecognised";
break;
274 os <<
", auxiliary edge visibility: ";
275 if (a.fForceAuxEdgeVisible) {
277 if (!a.fForcedAuxEdgeVisible) {
284 os <<
"\n line segments per circle: ";
285 if (a.fForcedLineSegmentsPerCircle > 0) {
286 os <<
"forced to " << a.fForcedLineSegmentsPerCircle;
290 os <<
"\n time range: (" << a.fStartTime <<
',' << a.fEndTime <<
')';
291 os <<
"\n G4AttValue pointer is ";
296 os <<
", G4AttDef pointer is ";
307 (fVisible != a.fVisible) ||
308 (fDaughtersInvisible != a.fDaughtersInvisible) ||
309 (fColour != a.fColour) ||
310 (fLineStyle != a.fLineStyle) ||
311 (fLineWidth != a.fLineWidth) ||
312 (fForceDrawingStyle != a.fForceDrawingStyle) ||
313 (fForceAuxEdgeVisible!= a.fForceAuxEdgeVisible) ||
314 (fForcedLineSegmentsPerCircle != a.fForcedLineSegmentsPerCircle) ||
315 (fStartTime != a.fStartTime) ||
316 (fEndTime != a.fEndTime) ||
317 (fAttValues != a.fAttValues) ||
318 (fAttDefs != a.fAttDefs)
322 if (fForceDrawingStyle) {
323 if (fForcedStyle != a.fForcedStyle)
return true;
326 if (fForceAuxEdgeVisible) {
327 if (fForcedAuxEdgeVisible != a.fForcedAuxEdgeVisible)
return true;
std::ostream & operator<<(std::ostream &os, const G4VisAttributes &a)
G4GLOB_DLL std::ostream G4cout
void SetForceAuxEdgeVisible(G4bool=true)
void SetForceCloud(G4bool=true)
void SetForceWireframe(G4bool=true)
const std::vector< G4AttValue > * CreateAttValues() const
static constexpr G4int fMinLineSegmentsPerCircle
G4bool IsForcedAuxEdgeVisible() const
static const G4VisAttributes & GetInvisible()
G4bool operator!=(const G4VisAttributes &a) const
ForcedDrawingStyle GetForcedDrawingStyle() const
static G4int GetMinLineSegmentsPerCircle()
void SetForceSolid(G4bool=true)
void SetForceLineSegmentsPerCircle(G4int nSegments)
G4VisAttributes & operator=(const G4VisAttributes &)
static const G4VisAttributes Invisible
G4bool operator==(const G4VisAttributes &a) const
void SetForceNumberOfCloudPoints(G4int nPoints)