46 fpDefaultVisAttributes (0),
48 fNumberOfCloudPoints (10000),
50 fCullInvisible (false),
51 fDensityCulling (false),
52 fVisibleDensity (0.01 *
g /
cm3),
54 fCBDAlgorithmNumber (0),
60 fSpecialMeshRendering (false)
74 fpDefaultVisAttributes (pDefaultVisAttributes),
75 fDrawingStyle (drawingStyle),
76 fNumberOfCloudPoints (10000),
78 fCullInvisible (isCullingInvisible),
79 fDensityCulling (isDensityCulling),
80 fVisibleDensity (visibleDensity),
81 fCullCovered (isCullingCovered),
82 fCBDAlgorithmNumber (0),
84 fNoOfSides (noOfSides),
88 fSpecialMeshRendering (false)
119 if (visibleDensity < 0 &&
fWarning) {
120 G4cout <<
"G4ModelingParameters::SetVisibleDensity: attempt to set negative "
121 "density - ignored." <<
G4endl;
125 G4cout <<
"G4ModelingParameters::SetVisibleDensity: density > "
127 <<
" g / cm3 - did you mean this?"
136 if (nSides < nSidesMin) {
139 G4cout <<
"G4ModelingParameters::SetNoOfSides: attempt to set the"
140 "\nnumber of sides per circle < " << nSidesMin
141 <<
"; forced to" << nSides <<
G4endl;
161 os <<
"Modeling parameters (warning ";
167 os <<
"\n Default vis. attributes: ";
171 os <<
"\n Current requested drawing style: ";
174 os <<
"wireframe";
break;
176 os <<
"hidden line removal (hlr)";
break;
178 os <<
"surface (hsr)";
break;
180 os <<
"surface and edges (hlhsr)";
break;
182 os <<
"cloud";
break;
183 default: os <<
"unrecognised";
break;
188 os <<
"\n Culling: ";
192 os <<
"\n Culling invisible objects: ";
196 os <<
"\n Density culling: ";
198 os <<
"on - invisible if density less than "
203 os <<
"\n Culling daughters covered by opaque mothers: ";
207 os <<
"\n Colour by density: ";
220 os <<
"\n No. of sides used in circle polygon approximation: "
223 os <<
"\n Section (DCUT) shape (G4DisplacedSolid) pointer: ";
227 os <<
"\n Cutaway (DCUT) shape (G4DisplacedSolid) pointer: ";
231 os <<
"\n Event pointer: " << mp.
fpEvent;
233 os <<
"\n Vis attributes modifiers: ";
234 const std::vector<G4ModelingParameters::VisAttributesModifier>& vams =
242 os <<
"\n Special Mesh Rendering: ";
248 os <<
"selected meshes";
250 os <<
"\n " << vol.GetName() <<
':' << vol.GetCopyNo();
262 (fWarning != mp.fWarning) ||
263 (*fpDefaultVisAttributes != *mp.fpDefaultVisAttributes) ||
264 (fDrawingStyle != mp.fDrawingStyle) ||
265 (fNumberOfCloudPoints != mp.fNumberOfCloudPoints) ||
266 (fCulling != mp.fCulling) ||
267 (fCullInvisible != mp.fCullInvisible) ||
268 (fDensityCulling != mp.fDensityCulling) ||
269 (fCullCovered != mp.fCullCovered) ||
270 (fCBDAlgorithmNumber != mp.fCBDAlgorithmNumber) ||
271 (fExplodeFactor != mp.fExplodeFactor) ||
272 (fExplodeCentre != mp.fExplodeCentre) ||
273 (fNoOfSides != mp.fNoOfSides) ||
274 (fpSectionSolid != mp.fpSectionSolid) ||
275 (fpCutawaySolid != mp.fpCutawaySolid) ||
276 (fpEvent != mp.fpEvent) ||
277 (fSpecialMeshRendering != mp.fSpecialMeshRendering)
281 if (fDensityCulling &&
282 (fVisibleDensity != mp.fVisibleDensity))
return true;
284 if (fCBDAlgorithmNumber > 0) {
285 if (fCBDParameters.size() != mp.fCBDParameters.size())
return true;
286 else if (fCBDParameters != mp.fCBDParameters)
return true;
289 if (fVisAttributesModifiers != mp.fVisAttributesModifiers)
292 if (fSpecialMeshRendering) {
293 if (fSpecialMeshVolumes != mp.fSpecialMeshVolumes)
300G4bool G4ModelingParameters::VisAttributesModifier::operator!=
303 if (fSignifier != rhs.fSignifier)
return true;
304 if (fPVNameCopyNoPath != rhs.fPVNameCopyNoPath)
return true;
305 switch (fSignifier) {
307 if (fVisAtts.IsVisible() != rhs.fVisAtts.IsVisible())
311 if (fVisAtts.IsDaughtersInvisible() !=
312 rhs.fVisAtts.IsDaughtersInvisible())
316 if (fVisAtts.GetColour() != rhs.fVisAtts.GetColour())
320 if (fVisAtts.GetLineStyle() != rhs.fVisAtts.GetLineStyle())
324 if (fVisAtts.GetLineWidth() != rhs.fVisAtts.GetLineWidth())
330 if (fVisAtts.GetForcedDrawingStyle() !=
331 rhs.fVisAtts.GetForcedDrawingStyle())
335 if (fVisAtts.GetForcedNumberOfCloudPoints() !=
336 rhs.fVisAtts.GetForcedNumberOfCloudPoints())
340 if (fVisAtts.IsForceAuxEdgeVisible() !=
341 rhs.fVisAtts.IsForceAuxEdgeVisible() ||
342 fVisAtts.IsForcedAuxEdgeVisible() !=
343 rhs.fVisAtts.IsForcedAuxEdgeVisible())
347 if (fVisAtts.GetForcedLineSegmentsPerCircle() !=
348 rhs.fVisAtts.GetForcedLineSegmentsPerCircle())
355G4bool G4ModelingParameters::PVNameCopyNo::operator!=
358 if (fName != rhs.fName)
return true;
359 if (fCopyNo != rhs.fCopyNo)
return true;
363std::ostream&
operator <<
366 os <<
"Touchable path: ";
370 os <<
"physical-volume-name:copy-number pairs:\n ";
372 for (i = path.begin(); i != path.end(); ++i) {
373 if (i != path.begin()) {
376 os << i->GetName() <<
':' << i->GetCopyNo();
387G4bool G4ModelingParameters::PVPointerCopyNo::operator!=
390 if (fpPV != rhs.fpPV)
return true;
391 if (fCopyNo != rhs.fCopyNo)
return true;
395std::ostream&
operator <<
398 os <<
"Touchable path: physical-volume-pointer:copy-number pairs:\n ";
400 for (i = path.begin(); i != path.end(); ++i) {
401 if (i != path.begin()) {
404 os <<
'(' << (
void*)(i->GetPVPointer()) <<
')' << i->GetName() <<
':' << i->GetCopyNo();
409std::ostream&
operator <<
411 const std::vector<G4ModelingParameters::VisAttributesModifier>& vams)
413 std::vector<G4ModelingParameters::VisAttributesModifier>::const_iterator
415 for (iModifier = vams.begin();
416 iModifier != vams.end();
419 iModifier->GetPVNameCopyNoPath();
420 os <<
'\n' << vamPath;
423 switch (iModifier->GetVisAttributesSignifier()) {
425 os <<
" visibility ";
433 os <<
" daughtersInvisible ";
441 os <<
" colour " << c;
462 os <<
" forceWireframe ";
472 os <<
" forceSolid ";
482 os <<
" forceCloud ";
491 os <<
" numberOfCloudPoints "
495 os <<
" forceAuxEdgeVisible: ";
510 os <<
" lineSegmentsPerCircle "
static constexpr double cm3
static constexpr double g
G4GLOB_DLL std::ostream G4cout
const G4String & GetName() const
G4DisplacedSolid * fpSectionSolid
std::vector< G4double > fCBDParameters
G4bool fSpecialMeshRendering
G4int fNumberOfCloudPoints
G4DisplacedSolid * fpCutawaySolid
const G4VisAttributes * fpDefaultVisAttributes
G4int SetNoOfSides(G4int)
PVNameCopyNoPath::const_iterator PVNameCopyNoPathConstIterator
PVPointerCopyNoPath::const_iterator PVPointerCopyNoPathConstIterator
DrawingStyle fDrawingStyle
std::vector< PVNameCopyNo > PVNameCopyNoPath
std::vector< PVPointerCopyNo > PVPointerCopyNoPath
std::vector< VisAttributesModifier > fVisAttributesModifiers
@ VASForceNumberOfCloudPoints
@ VASForceLineSegmentsPerCircle
void SetCutawaySolid(G4DisplacedSolid *pCutawaySolid)
void SetSectionSolid(G4DisplacedSolid *pSectionSolid)
G4int fCBDAlgorithmNumber
void SetVisibleDensity(G4double)
std::vector< PVNameCopyNo > fSpecialMeshVolumes
const G4String & GetName() const
G4int GetForcedNumberOfCloudPoints() const
G4double GetLineWidth() const
G4bool IsDaughtersInvisible() const
G4int GetForcedLineSegmentsPerCircle() const
LineStyle GetLineStyle() const
const G4Colour & GetColour() const
G4bool IsForceAuxEdgeVisible() const
G4bool IsForcedAuxEdgeVisible() const
ForcedDrawingStyle GetForcedDrawingStyle() const
static G4int GetMinLineSegmentsPerCircle()
G4bool IsForceDrawingStyle() const
std::ostream & operator<<(std::ostream &, const BasicVector3D< float > &)