48 fpDefaultVisAttributes (0),
50 fNumberOfCloudPoints (10000),
52 fCullInvisible (false),
53 fDensityCulling (false),
54 fVisibleDensity (0.01 * g / cm3),
56 fCBDAlgorithmNumber (0),
63 fSpecialMeshRendering (false),
64 fTransparencyByDepth (0.),
65 fTransparencyByDepthOption (1)
79 fpDefaultVisAttributes (pDefaultVisAttributes),
80 fDrawingStyle (drawingStyle),
81 fNumberOfCloudPoints (10000),
83 fCullInvisible (isCullingInvisible),
84 fDensityCulling (isDensityCulling),
85 fVisibleDensity (visibleDensity),
86 fCullCovered (isCullingCovered),
87 fCBDAlgorithmNumber (0),
89 fNoOfSides (noOfSides),
94 fSpecialMeshRendering (false),
95 fTransparencyByDepth (0.),
96 fTransparencyByDepthOption (1)
169 os <<
"Modeling parameters (warning ";
170 if (mp.fWarning) os <<
"true";
175 os <<
"\n Default vis. attributes: ";
179 os <<
"\n Current requested drawing style: ";
180 switch (mp.fDrawingStyle) {
182 os <<
"wireframe";
break;
184 os <<
"hidden line removal (hlr)";
break;
186 os <<
"surface (hsr)";
break;
188 os <<
"surface and edges (hlhsr)";
break;
190 os <<
"cloud";
break;
191 default: os <<
"unrecognised";
break;
194 os <<
"\n Number of cloud points: " << mp.fNumberOfCloudPoints;
196 os <<
"\n Culling: ";
197 if (mp.fCulling) os <<
"on";
200 os <<
"\n Culling invisible objects: ";
201 if (mp.fCullInvisible) os <<
"on";
204 os <<
"\n Density culling: ";
205 if (mp.fDensityCulling) {
206 os <<
"on - invisible if density less than "
207 << mp.fVisibleDensity / (1. * g / cm3) <<
" g cm^-3";
211 os <<
"\n Culling daughters covered by opaque mothers: ";
212 if (mp.fCullCovered) os <<
"on";
215 os <<
"\n Colour by density: ";
216 if (mp.fCBDAlgorithmNumber <= 0) {
219 os <<
"Algorithm " << mp.fCBDAlgorithmNumber <<
", Parameters:";
220 for (
auto p: mp.fCBDParameters) {
225 os <<
"\n Explode factor: " << mp.fExplodeFactor
226 <<
" about centre: " << mp.fExplodeCentre;
228 os <<
"\n No. of sides used in circle polygon approximation: "
231 os <<
"\n Section (DCUT) shape (G4DisplacedSolid) pointer: ";
232 if (!mp.fpSectionSolid) os <<
"non-";
235 os <<
"\n Cutaway mode: ";
239 os <<
"\n Cutaway (DCUT) shape (G4DisplacedSolid) pointer: ";
240 if (!mp.fpCutawaySolid) os <<
"non-";
243 os <<
"\n Event pointer: " << mp.fpEvent;
245 os <<
"\n Vis attributes modifiers: ";
246 const std::vector<G4ModelingParameters::VisAttributesModifier>& vams =
247 mp.fVisAttributesModifiers;
254 os <<
"\n Special Mesh Rendering: ";
255 if (mp.fSpecialMeshRendering) {
257 if (mp.fSpecialMeshVolumes.empty()) {
260 os <<
"selected meshes";
261 for (
const auto& vol: mp.fSpecialMeshVolumes) {
262 os <<
"\n " << vol.GetName() <<
':' << vol.GetCopyNo();
267 os <<
"\nTransparency by depth: " << mp.fTransparencyByDepth
268 <<
", option: " << mp.fTransparencyByDepthOption;
277 (fWarning != mp.fWarning) ||
278 (*fpDefaultVisAttributes != *mp.fpDefaultVisAttributes) ||
279 (fDrawingStyle != mp.fDrawingStyle) ||
280 (fNumberOfCloudPoints != mp.fNumberOfCloudPoints) ||
281 (fCulling != mp.fCulling) ||
282 (fCullInvisible != mp.fCullInvisible) ||
283 (fDensityCulling != mp.fDensityCulling) ||
284 (fCullCovered != mp.fCullCovered) ||
285 (fCBDAlgorithmNumber != mp.fCBDAlgorithmNumber) ||
286 (fExplodeFactor != mp.fExplodeFactor) ||
287 (fExplodeCentre != mp.fExplodeCentre) ||
288 (fNoOfSides != mp.fNoOfSides) ||
289 (fpSectionSolid != mp.fpSectionSolid) ||
290 (fCutawayMode != mp.fCutawayMode) ||
291 (fpCutawaySolid != mp.fpCutawaySolid) ||
292 (fpEvent != mp.fpEvent) ||
293 (fSpecialMeshRendering != mp.fSpecialMeshRendering) ||
294 (fTransparencyByDepth != mp.fTransparencyByDepth) ||
295 (fTransparencyByDepthOption != mp.fTransparencyByDepthOption)
299 if (fDensityCulling &&
300 (fVisibleDensity != mp.fVisibleDensity))
return true;
302 if (fCBDAlgorithmNumber > 0) {
303 if (fCBDParameters.size() != mp.fCBDParameters.size())
return true;
304 else if (fCBDParameters != mp.fCBDParameters)
return true;
307 if (fVisAttributesModifiers != mp.fVisAttributesModifiers)
310 if (fSpecialMeshRendering) {
311 if (fSpecialMeshVolumes != mp.fSpecialMeshVolumes)
318G4bool G4ModelingParameters::VisAttributesModifier::operator!=
321 if (fSignifier != rhs.fSignifier)
return true;
322 if (fPVNameCopyNoPath != rhs.fPVNameCopyNoPath)
return true;
323 switch (fSignifier) {
325 if (fVisAtts.IsVisible() != rhs.fVisAtts.IsVisible())
329 if (fVisAtts.IsDaughtersInvisible() !=
330 rhs.fVisAtts.IsDaughtersInvisible())
334 if (fVisAtts.GetColour() != rhs.fVisAtts.GetColour())
338 if (fVisAtts.GetLineStyle() != rhs.fVisAtts.GetLineStyle())
342 if (fVisAtts.GetLineWidth() != rhs.fVisAtts.GetLineWidth())
348 if (fVisAtts.GetForcedDrawingStyle() !=
349 rhs.fVisAtts.GetForcedDrawingStyle())
353 if (fVisAtts.GetForcedNumberOfCloudPoints() !=
354 rhs.fVisAtts.GetForcedNumberOfCloudPoints())
358 if (fVisAtts.IsForceAuxEdgeVisible() !=
359 rhs.fVisAtts.IsForceAuxEdgeVisible() ||
360 fVisAtts.IsForcedAuxEdgeVisible() !=
361 rhs.fVisAtts.IsForcedAuxEdgeVisible())
365 if (fVisAtts.GetForcedLineSegmentsPerCircle() !=
366 rhs.fVisAtts.GetForcedLineSegmentsPerCircle())