46 fpDefaultVisAttributes (0),
48 fNumberOfCloudPoints (10000),
50 fCullInvisible (
false),
51 fDensityCulling (
false),
52 fVisibleDensity (0.01 *
g /
cm3),
54 fCBDAlgorithmNumber (0),
73 fpDefaultVisAttributes (pDefaultVisAttributes),
74 fDrawingStyle (drawingStyle),
75 fNumberOfCloudPoints (10000),
77 fCullInvisible (isCullingInvisible),
78 fDensityCulling (isDensityCulling),
79 fVisibleDensity (visibleDensity),
80 fCullCovered (isCullingCovered),
81 fCBDAlgorithmNumber (0),
83 fNoOfSides (noOfSides),
117 if (visibleDensity < 0 &&
fWarning) {
118 G4cout <<
"G4ModelingParameters::SetVisibleDensity: attempt to set negative "
119 "density - ignored." <<
G4endl;
123 G4cout <<
"G4ModelingParameters::SetVisibleDensity: density > "
125 <<
" g / cm3 - did you mean this?"
134 if (nSides < nSidesMin) {
137 G4cout <<
"G4ModelingParameters::SetNoOfSides: attempt to set the"
138 "\nnumber of sides per circle < " << nSidesMin
139 <<
"; forced to" << nSides <<
G4endl;
147 delete fpSectionSolid;
148 fpSectionSolid = pSectionSolid;
153 delete fpCutawaySolid;
154 fpCutawaySolid = pCutawaySolid;
159 os <<
"Modeling parameters (warning ";
165 os <<
"\n Default vis. attributes: ";
169 os <<
"\n Current requested drawing style: ";
172 os <<
"wireframe";
break;
174 os <<
"hidden line removal (hlr)";
break;
176 os <<
"surface (hsr)";
break;
178 os <<
"surface and edges (hlhsr)";
break;
180 os <<
"cloud";
break;
181 default: os <<
"unrecognised";
break;
186 os <<
"\n Culling: ";
190 os <<
"\n Culling invisible objects: ";
194 os <<
"\n Density culling: ";
196 os <<
"on - invisible if density less than "
201 os <<
"\n Culling daughters covered by opaque mothers: ";
205 os <<
"\n Colour by density: ";
218 os <<
"\n No. of sides used in circle polygon approximation: "
221 os <<
"\n Section (DCUT) shape (G4DisplacedSolid) pointer: ";
225 os <<
"\n Cutaway (DCUT) shape (G4DisplacedSolid) pointer: ";
229 os <<
"\n Event pointer: " << mp.
fpEvent;
231 os <<
"\n Vis attributes modifiers: ";
232 const std::vector<G4ModelingParameters::VisAttributesModifier>& vams =
243 G4bool G4ModelingParameters::operator !=
247 (fWarning != mp.fWarning) ||
248 (*fpDefaultVisAttributes != *mp.fpDefaultVisAttributes) ||
249 (fDrawingStyle != mp.fDrawingStyle) ||
250 (fNumberOfCloudPoints != mp.fNumberOfCloudPoints) ||
251 (fCulling != mp.fCulling) ||
252 (fCullInvisible != mp.fCullInvisible) ||
253 (fDensityCulling != mp.fDensityCulling) ||
254 (fCullCovered != mp.fCullCovered) ||
255 (fCBDAlgorithmNumber != mp.fCBDAlgorithmNumber) ||
256 (fExplodeFactor != mp.fExplodeFactor) ||
257 (fExplodeCentre != mp.fExplodeCentre) ||
258 (fNoOfSides != mp.fNoOfSides) ||
259 (fpSectionSolid != mp.fpSectionSolid) ||
260 (fpCutawaySolid != mp.fpCutawaySolid) ||
261 (fpEvent != mp.fpEvent)
265 if (fDensityCulling &&
266 (fVisibleDensity != mp.fVisibleDensity))
return true;
268 if (fCBDAlgorithmNumber > 0) {
269 if (fCBDParameters.size() != mp.fCBDParameters.size())
return true;
270 else if (fCBDParameters != mp.fCBDParameters)
return true;
273 if (fVisAttributesModifiers != mp.fVisAttributesModifiers)
279 G4bool G4ModelingParameters::VisAttributesModifier::operator!=
282 if (fSignifier != rhs.fSignifier)
return true;
283 if (fPVNameCopyNoPath != rhs.fPVNameCopyNoPath)
return true;
284 switch (fSignifier) {
286 if (fVisAtts.IsVisible() != rhs.fVisAtts.IsVisible())
290 if (fVisAtts.IsDaughtersInvisible() !=
291 rhs.fVisAtts.IsDaughtersInvisible())
295 if (fVisAtts.GetColour() != rhs.fVisAtts.GetColour())
299 if (fVisAtts.GetLineStyle() != rhs.fVisAtts.GetLineStyle())
303 if (fVisAtts.GetLineWidth() != rhs.fVisAtts.GetLineWidth())
309 if (fVisAtts.GetForcedDrawingStyle() !=
310 rhs.fVisAtts.GetForcedDrawingStyle())
314 if (fVisAtts.GetForcedNumberOfCloudPoints() !=
315 rhs.fVisAtts.GetForcedNumberOfCloudPoints())
319 if (fVisAtts.IsForceAuxEdgeVisible() !=
320 rhs.fVisAtts.IsForceAuxEdgeVisible() ||
321 fVisAtts.IsForcedAuxEdgeVisible() !=
322 rhs.fVisAtts.IsForcedAuxEdgeVisible())
326 if (fVisAtts.GetForcedLineSegmentsPerCircle() !=
327 rhs.fVisAtts.GetForcedLineSegmentsPerCircle())
334 G4bool G4ModelingParameters::PVNameCopyNo::operator!=
337 if (
fName != rhs.fName)
return true;
338 if (fCopyNo != rhs.fCopyNo)
return true;
342 std::ostream&
operator <<
345 os <<
"Touchable path: ";
349 os <<
"physical-volume-name:copy-number pairs:\n ";
351 for (i = path.begin(); i != path.end(); ++i) {
352 if (i != path.begin()) {
355 os << i->GetName() <<
':' << i->GetCopyNo();
366 G4bool G4ModelingParameters::PVPointerCopyNo::operator!=
369 if (fpPV != rhs.fpPV)
return true;
370 if (fCopyNo != rhs.fCopyNo)
return true;
374 std::ostream&
operator <<
377 os <<
"Touchable path: physical-volume-pointer:copy-number pairs:\n ";
379 for (i = path.begin(); i != path.end(); ++i) {
380 if (i != path.begin()) {
383 os <<
'(' << (
void*)(i->GetPVPointer()) <<
')' << i->GetName() <<
':' << i->GetCopyNo();
388 std::ostream&
operator <<
390 const std::vector<G4ModelingParameters::VisAttributesModifier>& vams)
392 std::vector<G4ModelingParameters::VisAttributesModifier>::const_iterator
394 for (iModifier = vams.begin();
395 iModifier != vams.end();
398 iModifier->GetPVNameCopyNoPath();
399 os <<
'\n' << vamPath;
402 switch (iModifier->GetVisAttributesSignifier()) {
404 os <<
" visibility ";
412 os <<
" daughtersInvisible ";
420 os <<
" colour " <<
c;
441 os <<
" forceWireframe ";
451 os <<
" forceSolid ";
461 os <<
" forceCloud ";
470 os <<
" numberOfCloudPoints "
474 os <<
" forceAuxEdgeVisible: ";
489 os <<
" lineSegmentsPerCircle "