48 fpDefaultVisAttributes (0),
50 fNumberOfCloudPoints (10000),
52 fCullInvisible (false),
53 fDensityCulling (false),
54 fVisibleDensity (0.01 * g / cm3),
56 fCBDAlgorithmNumber (0),
60 fCutawayMode (cutawayUnion),
63 fSpecialMeshRendering (false)
77 fpDefaultVisAttributes (pDefaultVisAttributes),
78 fDrawingStyle (drawingStyle),
79 fNumberOfCloudPoints (10000),
81 fCullInvisible (isCullingInvisible),
82 fDensityCulling (isDensityCulling),
83 fVisibleDensity (visibleDensity),
84 fCullCovered (isCullingCovered),
85 fCBDAlgorithmNumber (0),
87 fNoOfSides (noOfSides),
89 fCutawayMode (cutawayUnion),
92 fSpecialMeshRendering (false)
165 os <<
"Modeling parameters (warning ";
166 if (mp.fWarning) os <<
"true";
171 os <<
"\n Default vis. attributes: ";
175 os <<
"\n Current requested drawing style: ";
176 switch (mp.fDrawingStyle) {
178 os <<
"wireframe";
break;
180 os <<
"hidden line removal (hlr)";
break;
182 os <<
"surface (hsr)";
break;
184 os <<
"surface and edges (hlhsr)";
break;
186 os <<
"cloud";
break;
187 default: os <<
"unrecognised";
break;
190 os <<
"\n Number of cloud points: " << mp.fNumberOfCloudPoints;
192 os <<
"\n Culling: ";
193 if (mp.fCulling) os <<
"on";
196 os <<
"\n Culling invisible objects: ";
197 if (mp.fCullInvisible) os <<
"on";
200 os <<
"\n Density culling: ";
201 if (mp.fDensityCulling) {
202 os <<
"on - invisible if density less than "
203 << mp.fVisibleDensity / (1. * g / cm3) <<
" g cm^-3";
207 os <<
"\n Culling daughters covered by opaque mothers: ";
208 if (mp.fCullCovered) os <<
"on";
211 os <<
"\n Colour by density: ";
212 if (mp.fCBDAlgorithmNumber <= 0) {
215 os <<
"Algorithm " << mp.fCBDAlgorithmNumber <<
", Parameters:";
216 for (
auto p: mp.fCBDParameters) {
221 os <<
"\n Explode factor: " << mp.fExplodeFactor
222 <<
" about centre: " << mp.fExplodeCentre;
224 os <<
"\n No. of sides used in circle polygon approximation: "
227 os <<
"\n Section (DCUT) shape (G4DisplacedSolid) pointer: ";
228 if (!mp.fpSectionSolid) os <<
"non-";
231 os <<
"\n Cutaway mode: ";
235 os <<
"\n Cutaway (DCUT) shape (G4DisplacedSolid) pointer: ";
236 if (!mp.fpCutawaySolid) os <<
"non-";
239 os <<
"\n Event pointer: " << mp.fpEvent;
241 os <<
"\n Vis attributes modifiers: ";
242 const std::vector<G4ModelingParameters::VisAttributesModifier>& vams =
243 mp.fVisAttributesModifiers;
250 os <<
"\n Special Mesh Rendering: ";
251 if (mp.fSpecialMeshRendering) {
253 if (mp.fSpecialMeshVolumes.empty()) {
256 os <<
"selected meshes";
257 for (
const auto& vol: mp.fSpecialMeshVolumes) {
258 os <<
"\n " << vol.GetName() <<
':' << vol.GetCopyNo();
270 (fWarning != mp.fWarning) ||
271 (*fpDefaultVisAttributes != *mp.fpDefaultVisAttributes) ||
272 (fDrawingStyle != mp.fDrawingStyle) ||
273 (fNumberOfCloudPoints != mp.fNumberOfCloudPoints) ||
274 (fCulling != mp.fCulling) ||
275 (fCullInvisible != mp.fCullInvisible) ||
276 (fDensityCulling != mp.fDensityCulling) ||
277 (fCullCovered != mp.fCullCovered) ||
278 (fCBDAlgorithmNumber != mp.fCBDAlgorithmNumber) ||
279 (fExplodeFactor != mp.fExplodeFactor) ||
280 (fExplodeCentre != mp.fExplodeCentre) ||
281 (fNoOfSides != mp.fNoOfSides) ||
282 (fpSectionSolid != mp.fpSectionSolid) ||
283 (fCutawayMode != mp.fCutawayMode) ||
284 (fpCutawaySolid != mp.fpCutawaySolid) ||
285 (fpEvent != mp.fpEvent) ||
286 (fSpecialMeshRendering != mp.fSpecialMeshRendering)
290 if (fDensityCulling &&
291 (fVisibleDensity != mp.fVisibleDensity))
return true;
293 if (fCBDAlgorithmNumber > 0) {
294 if (fCBDParameters.size() != mp.fCBDParameters.size())
return true;
295 else if (fCBDParameters != mp.fCBDParameters)
return true;
298 if (fVisAttributesModifiers != mp.fVisAttributesModifiers)
301 if (fSpecialMeshRendering) {
302 if (fSpecialMeshVolumes != mp.fSpecialMeshVolumes)
309G4bool G4ModelingParameters::VisAttributesModifier::operator!=
312 if (fSignifier != rhs.fSignifier)
return true;
313 if (fPVNameCopyNoPath != rhs.fPVNameCopyNoPath)
return true;
314 switch (fSignifier) {
316 if (fVisAtts.IsVisible() != rhs.fVisAtts.IsVisible())
320 if (fVisAtts.IsDaughtersInvisible() !=
321 rhs.fVisAtts.IsDaughtersInvisible())
325 if (fVisAtts.GetColour() != rhs.fVisAtts.GetColour())
329 if (fVisAtts.GetLineStyle() != rhs.fVisAtts.GetLineStyle())
333 if (fVisAtts.GetLineWidth() != rhs.fVisAtts.GetLineWidth())
339 if (fVisAtts.GetForcedDrawingStyle() !=
340 rhs.fVisAtts.GetForcedDrawingStyle())
344 if (fVisAtts.GetForcedNumberOfCloudPoints() !=
345 rhs.fVisAtts.GetForcedNumberOfCloudPoints())
349 if (fVisAtts.IsForceAuxEdgeVisible() !=
350 rhs.fVisAtts.IsForceAuxEdgeVisible() ||
351 fVisAtts.IsForcedAuxEdgeVisible() !=
352 rhs.fVisAtts.IsForcedAuxEdgeVisible())
356 if (fVisAtts.GetForcedLineSegmentsPerCircle() !=
357 rhs.fVisAtts.GetForcedLineSegmentsPerCircle())