38fDaughtersInvisible (false),
41fForceDrawingStyle (false),
42fForcedStyle (wireframe),
43fForcedNumberOfCloudPoints (0),
44fForceAuxEdgeVisible (false),
45fForcedAuxEdgeVisible(false),
46fForcedLineSegmentsPerCircle (0),
47fStartTime (-fVeryLongTime),
48fEndTime (fVeryLongTime),
55fDaughtersInvisible (false),
59fForceDrawingStyle (false),
60fForcedStyle (wireframe),
61fForcedNumberOfCloudPoints (0),
62fForceAuxEdgeVisible (false),
63fForcedAuxEdgeVisible(false),
64fForcedLineSegmentsPerCircle (0),
65fStartTime (-fVeryLongTime),
66fEndTime (fVeryLongTime),
73fDaughtersInvisible (false),
77fForceDrawingStyle (false),
78fForcedStyle (wireframe),
79fForcedNumberOfCloudPoints (0),
80fForceAuxEdgeVisible (false),
81fForcedAuxEdgeVisible(false),
82fForcedLineSegmentsPerCircle (0),
83fStartTime (-fVeryLongTime),
84fEndTime (fVeryLongTime),
92fDaughtersInvisible (false),
96fForceDrawingStyle (false),
97fForcedStyle (wireframe),
98fForcedNumberOfCloudPoints (0),
99fForceAuxEdgeVisible (false),
100fForcedAuxEdgeVisible(false),
101fForcedLineSegmentsPerCircle (0),
102fStartTime (-fVeryLongTime),
103fEndTime (fVeryLongTime),
111 if (&rhs ==
this)
return *
this;
112 fVisible = rhs.fVisible;
113 fDaughtersInvisible = rhs.fDaughtersInvisible;
114 fColour = rhs.fColour;
115 fLineStyle = rhs.fLineStyle;
116 fLineWidth = rhs.fLineWidth;
117 fForceDrawingStyle = rhs.fForceDrawingStyle;
118 fForcedStyle = rhs.fForcedStyle;
119 fForcedNumberOfCloudPoints = rhs.fForcedNumberOfCloudPoints;
120 fForceAuxEdgeVisible = rhs.fForceAuxEdgeVisible;
121 fForcedAuxEdgeVisible = rhs.fForcedAuxEdgeVisible;
122 fForcedLineSegmentsPerCircle = rhs.fForcedLineSegmentsPerCircle;
123 fStartTime = rhs.fStartTime;
124 fEndTime = rhs.fEndTime;
128 fAttValues = rhs.fAttValues;
131 fAttDefs = rhs.fAttDefs;
142 fForceDrawingStyle =
true;
145 fForceDrawingStyle =
false;
151 fForceDrawingStyle =
true;
154 fForceDrawingStyle =
false;
160 fForceDrawingStyle =
true;
163 fForceDrawingStyle =
false;
168 fForcedNumberOfCloudPoints = nPoints;
171 "G4VisAttributes::SetForceNumberOfCloudPoints: number of cloud points"
172 " set to " << fForcedNumberOfCloudPoints <<
'.' <<
173 "\n This means the viewer default will be used, typically controlled by"
174 "\n \"/vis/viewer/set/numberOfCloudPoints\""
180 fForceAuxEdgeVisible =
true;
181 fForcedAuxEdgeVisible = visibility;
186 if (fForceDrawingStyle)
return fForcedStyle;
191 if (fForceAuxEdgeVisible)
return fForcedAuxEdgeVisible;
197 return new std::vector<G4AttValue>(*fAttValues);
202 if (nSegments < nSegmentsMin) {
203 nSegments = nSegmentsMin;
205 "G4VisAttributes::SetForcedLineSegmentsPerCircle: attempt to set the"
206 "\nnumber of line segments per circle < " << nSegmentsMin
207 <<
"; forced to " << nSegments <<
G4endl;
209 fForcedLineSegmentsPerCircle = nSegments;
214 os << std::defaultfloat;
215 os <<
"G4VisAttributes: ";
216 if (!a.fVisible) os <<
"in";
217 os <<
"visible, daughters ";
218 if (a.fDaughtersInvisible) os <<
"in";
219 os <<
"visible, colour: " << a.fColour;
220 os <<
"\n linestyle: ";
221 switch (a.fLineStyle) {
223 os <<
"solid";
break;
225 os <<
"dashed";
break;
227 default: os <<
"unrecognised";
break;
229 os <<
", line width: " << a.fLineWidth;
231 os <<
"\n drawing style: ";
232 if (a.fForceDrawingStyle) {
234 switch (a.fForcedStyle) {
236 os <<
"wireframe";
break;
238 os <<
"solid";
break;
239 default: os <<
"unrecognised";
break;
245 os <<
", auxiliary edge visibility: ";
246 if (a.fForceAuxEdgeVisible) {
248 if (!a.fForcedAuxEdgeVisible) {
255 os <<
"\n line segments per circle: ";
256 if (a.fForcedLineSegmentsPerCircle > 0) {
257 os <<
"forced to " << a.fForcedLineSegmentsPerCircle;
261 os <<
"\n time range: (" << a.fStartTime <<
',' << a.fEndTime <<
')';
262 os <<
"\n G4AttValue pointer is ";
263 if (a.fAttValues !=
nullptr) {
267 os <<
", G4AttDef pointer is ";
268 if (a.fAttDefs !=
nullptr) {
278 (fVisible != a.fVisible) ||
279 (fDaughtersInvisible != a.fDaughtersInvisible) ||
280 (fColour != a.fColour) ||
281 (fLineStyle != a.fLineStyle) ||
282 (fLineWidth != a.fLineWidth) ||
283 (fForceDrawingStyle != a.fForceDrawingStyle) ||
284 (fForceAuxEdgeVisible!= a.fForceAuxEdgeVisible) ||
285 (fForcedLineSegmentsPerCircle != a.fForcedLineSegmentsPerCircle) ||
286 (fStartTime != a.fStartTime) ||
287 (fEndTime != a.fEndTime) ||
288 (fAttValues != a.fAttValues) ||
289 (fAttDefs != a.fAttDefs)
293 if (fForceDrawingStyle) {
294 if (fForcedStyle != a.fForcedStyle)
return true;
297 if (fForceAuxEdgeVisible) {
298 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 &)
G4bool operator==(const G4VisAttributes &a) const
void SetForceNumberOfCloudPoints(G4int nPoints)