39 fDaughtersInvisible (false),
41 fLineStyle (unbroken),
43 fForceDrawingStyle (false),
44 fForcedStyle (wireframe),
45 fForceAuxEdgeVisible (false),
46 fForcedAuxEdgeVisible(false),
47 fForcedLineSegmentsPerCircle (0),
55 fVisible (visibility),
56 fDaughtersInvisible (false),
58 fLineStyle (unbroken),
60 fForceDrawingStyle (false),
61 fForcedStyle (wireframe),
62 fForceAuxEdgeVisible (false),
63 fForcedAuxEdgeVisible(false),
64 fForcedLineSegmentsPerCircle (0),
73 fDaughtersInvisible (false),
75 fLineStyle (unbroken),
77 fForceDrawingStyle (false),
78 fForcedStyle (wireframe),
79 fForceAuxEdgeVisible (false),
80 fForcedAuxEdgeVisible(false),
81 fForcedLineSegmentsPerCircle (0),
90 fVisible (visibility),
91 fDaughtersInvisible (false),
93 fLineStyle (unbroken),
95 fForceDrawingStyle (false),
96 fForcedStyle (wireframe),
97 fForceAuxEdgeVisible (false),
98 fForcedAuxEdgeVisible(false),
99 fForcedLineSegmentsPerCircle (0),
107 fVisible (va.fVisible),
108 fDaughtersInvisible (va.fDaughtersInvisible),
109 fColour (va.fColour),
110 fLineStyle (va.fLineStyle),
111 fLineWidth (va.fLineWidth),
112 fForceDrawingStyle (va.fForceDrawingStyle),
113 fForcedStyle (va.fForcedStyle),
114 fForceAuxEdgeVisible (va.fForceAuxEdgeVisible),
115 fForcedAuxEdgeVisible(va.fForcedAuxEdgeVisible),
116 fForcedLineSegmentsPerCircle (va.fForcedLineSegmentsPerCircle),
117 fStartTime (va.fStartTime),
118 fEndTime (va.fEndTime),
122 fAttValues (va.fAttValues),
125 fAttDefs (va.fAttDefs)
133 if (&rhs ==
this)
return *
this;
134 fVisible = rhs.fVisible;
135 fDaughtersInvisible = rhs.fDaughtersInvisible;
136 fColour = rhs.fColour;
137 fLineStyle = rhs.fLineStyle;
138 fLineWidth = rhs.fLineWidth;
139 fForceDrawingStyle = rhs.fForceDrawingStyle;
140 fForcedStyle = rhs.fForcedStyle;
141 fForceAuxEdgeVisible = rhs.fForceAuxEdgeVisible;
142 fForcedAuxEdgeVisible = rhs.fForcedAuxEdgeVisible;
143 fForcedLineSegmentsPerCircle = rhs.fForcedLineSegmentsPerCircle;
144 fStartTime = rhs.fStartTime;
145 fEndTime = rhs.fEndTime;
149 fAttValues = rhs.fAttValues;
152 fAttDefs = rhs.fAttDefs;
166 fForceDrawingStyle =
true;
169 fForceDrawingStyle =
false;
175 fForceDrawingStyle =
true;
178 fForceDrawingStyle =
false;
183 fForceAuxEdgeVisible =
true;
184 fForcedAuxEdgeVisible = visibility;
189 if (fForceDrawingStyle)
return fForcedStyle;
194 if (fForceAuxEdgeVisible)
return fForcedAuxEdgeVisible;
200 return new std::vector<G4AttValue>(*fAttValues);
205 if (nSegments > 0 && nSegments < nSegmentsMin) {
206 nSegments = nSegmentsMin;
208 "G4VisAttributes::SetForcedLineSegmentsPerCircle: attempt to set the"
209 "\nnumber of line segements per circle < " << nSegmentsMin
210 <<
"; forced to " << nSegments <<
G4endl;
212 fForcedLineSegmentsPerCircle = nSegments;
217 os <<
"G4VisAttributes: ";
218 if (!a.fVisible) os <<
"in";
219 os <<
"visible, daughters ";
220 if (a.fDaughtersInvisible) os <<
"in";
221 os <<
"visible, colour: " << a.fColour;
222 os <<
"\n linestyle: ";
223 switch (a.fLineStyle) {
225 os <<
"solid";
break;
227 os <<
"dashed";
break;
229 default: os <<
"unrecognised";
break;
231 os <<
", line width: " << a.fLineWidth;
233 os <<
"\n drawing style: ";
234 if (a.fForceDrawingStyle) {
236 switch (a.fForcedStyle) {
238 os <<
"wireframe";
break;
240 os <<
"solid";
break;
241 default: os <<
"unrecognised";
break;
247 os <<
", auxiliary edge visibility: ";
248 if (a.fForceAuxEdgeVisible) {
250 if (!a.fForcedAuxEdgeVisible) {
257 os <<
"\n line segments per circle: ";
258 if (a.fForcedLineSegmentsPerCircle > 0) {
259 os <<
"forced to " << a.fForcedLineSegmentsPerCircle;
263 os <<
"\n time range: (" << a.fStartTime <<
',' << a.fEndTime <<
')';
264 os <<
"\n G4AttValue pointer is ";
269 os <<
", G4AttDef pointer is ";
280 (fVisible != a.fVisible) ||
281 (fDaughtersInvisible != a.fDaughtersInvisible) ||
282 (fColour != a.fColour) ||
283 (fLineStyle != a.fLineStyle) ||
284 (fLineWidth != a.fLineWidth) ||
285 (fForceDrawingStyle != a.fForceDrawingStyle) ||
286 (fForceAuxEdgeVisible!= a.fForceAuxEdgeVisible) ||
287 (fForcedLineSegmentsPerCircle != a.fForcedLineSegmentsPerCircle) ||
288 (fStartTime != a.fStartTime) ||
289 (fEndTime != a.fEndTime) ||
290 (fAttValues != a.fAttValues) ||
291 (fAttDefs != a.fAttDefs)
295 if (fForceDrawingStyle) {
296 if (fForcedStyle != a.fForcedStyle)
return true;
299 if (fForceAuxEdgeVisible) {
300 if (fForcedAuxEdgeVisible != a.fForcedAuxEdgeVisible)
return true;
G4bool operator!=(const G4VisAttributes &a) const
std::vector< ExP01TrackerHit * > a
void SetForceSolid(G4bool=true)
G4VisAttributes & operator=(const G4VisAttributes &)
G4GLOB_DLL std::ostream G4cout
static G4int GetMinLineSegmentsPerCircle()
G4bool IsForcedAuxEdgeVisible() const
const std::vector< G4AttValue > * CreateAttValues() const
static const G4VisAttributes Invisible
std::ostream & operator<<(std::ostream &, const BasicVector3D< float > &)
void SetForceAuxEdgeVisible(G4bool=true)
static const G4VisAttributes & GetInvisible()
void SetForceWireframe(G4bool=true)
ForcedDrawingStyle GetForcedDrawingStyle() const
G4bool operator==(const G4VisAttributes &a) const
void SetForceLineSegmentsPerCircle(G4int nSegments)