45 fpDefaultVisAttributes (0),
48 fCullInvisible (false),
49 fDensityCulling (false),
50 fVisibleDensity (0.01 *
g /
cm3),
93 const std::vector<G4PhysicalVolumeModel::G4PhysicalVolumeNodeID>& path):
94 fVisAtts(visAtts), fSignifier(signifier)
97 typedef std::vector<PVNodeID>
PVPath;
98 typedef PVPath::const_iterator PVPathConstIterator;
99 PVPathConstIterator i;
100 for (i = path.begin();
103 fPVNameCopyNoPath.push_back
105 (i->GetPhysicalVolume()->GetName(),
112 if (visibleDensity < 0 &&
fWarning) {
113 G4cout <<
"G4ModelingParameters::SetVisibleDensity: attempt to set negative " 114 "density - ignored." <<
G4endl;
118 G4cout <<
"G4ModelingParameters::SetVisibleDensity: density > " 120 <<
" g / cm3 - did you mean this?" 129 if (nSides < nSidesMin) {
132 G4cout <<
"G4ModelingParameters::SetNoOfSides: attempt to set the" 133 "\nnumber of sides per circle < " << nSidesMin
134 <<
"; forced to" << nSides <<
G4endl;
154 os <<
"Modeling parameters (warning ";
160 os <<
"\n Default vis. attributes: ";
164 os <<
"\n Current requested drawing style: ";
167 os <<
"wireframe";
break;
169 os <<
"hidden line removal (hlr)";
break;
171 os <<
"surface (hsr)";
break;
173 os <<
"surface and edges (hlhsr)";
break;
174 default: os <<
"unrecognised";
break;
177 os <<
"\n Culling: ";
181 os <<
"\n Culling invisible objects: ";
185 os <<
"\n Density culling: ";
187 os <<
"on - invisible if density less than " 192 os <<
"\n Culling daughters covered by opaque mothers: ";
199 os <<
"\n No. of sides used in circle polygon approximation: " 202 os <<
"\n Section (DCUT) shape (G4VSolid) pointer: ";
206 os <<
"\n Cutaway (DCUT) shape (G4VSolid) pointer: ";
210 os <<
"\n Event pointer: " << mp.
fpEvent;
212 os <<
"\n Vis attributes modifiers: ";
213 const std::vector<G4ModelingParameters::VisAttributesModifier>& vams =
224 G4bool G4ModelingParameters::operator !=
252 G4bool G4ModelingParameters::PVNameCopyNo::operator!=
255 if (
fName != rhs.fName)
return true;
256 if (fCopyNo != rhs.fCopyNo)
return true;
260 G4bool G4ModelingParameters::VisAttributesModifier::operator!=
263 if (fSignifier != rhs.fSignifier)
return true;
264 if (fPVNameCopyNoPath != rhs.fPVNameCopyNoPath)
return true;
265 switch (fSignifier) {
267 if (fVisAtts.IsVisible() != rhs.fVisAtts.IsVisible())
271 if (fVisAtts.IsDaughtersInvisible() !=
272 rhs.fVisAtts.IsDaughtersInvisible())
276 if (fVisAtts.GetColour() != rhs.fVisAtts.GetColour())
280 if (fVisAtts.GetLineStyle() != rhs.fVisAtts.GetLineStyle())
284 if (fVisAtts.GetLineWidth() != rhs.fVisAtts.GetLineWidth())
288 if (fVisAtts.GetForcedDrawingStyle() !=
289 rhs.fVisAtts.GetForcedDrawingStyle())
293 if (fVisAtts.GetForcedDrawingStyle() !=
294 rhs.fVisAtts.GetForcedDrawingStyle())
298 if (fVisAtts.IsForceAuxEdgeVisible() !=
299 rhs.fVisAtts.IsForceAuxEdgeVisible())
303 if (fVisAtts.GetForcedLineSegmentsPerCircle() !=
304 rhs.fVisAtts.GetForcedLineSegmentsPerCircle())
311 std::ostream&
operator <<
316 for (i = path.begin(); i != path.end(); ++i) {
317 if (i != path.begin()) {
320 os << i->GetName() <<
':' << i->GetCopyNo();
325 std::ostream&
operator <<
327 const std::vector<G4ModelingParameters::VisAttributesModifier>& vams)
329 std::vector<G4ModelingParameters::VisAttributesModifier>::const_iterator
331 for (iModifier = vams.begin();
332 iModifier != vams.end();
335 iModifier->GetPVNameCopyNoPath();
336 os <<
'\n' << vamPath;
339 switch (iModifier->GetVisAttributesSignifier()) {
341 os <<
" visibility ";
349 os <<
" daughtersInvisible ";
357 os <<
" colour " <<
c;
378 os <<
" forceWireframe ";
388 os <<
" forceSolid ";
397 os <<
" forceAuxEdgeVisible ";
405 os <<
" lineSegmentsPerCircle "
ForcedDrawingStyle GetForcedDrawingStyle() const
G4bool IsForceAuxEdgeVisible() const
G4bool IsForceDrawingStyle() const
G4VSolid * fpSectionSolid
void SetVisibleDensity(G4double)
DrawingStyle fDrawingStyle
const G4VisAttributes * fpDefaultVisAttributes
G4int SetNoOfSides(G4int)
void SetCutawaySolid(G4VSolid *pCutawaySolid)
G4bool IsDaughtersInvisible() const
G4GLOB_DLL std::ostream G4cout
static G4int GetMinLineSegmentsPerCircle()
G4PhysicalVolumeModel::G4PhysicalVolumeNodeID PVNodeID
std::vector< VisAttributesModifier > fVisAttributesModifiers
VisAttributesModifier(const G4VisAttributes &visAtts, VisAttributesSignifier signifier, const PVNameCopyNoPath &path)
std::vector< PVNodeID > PVPath
friend std::ostream & operator<<(std::ostream &os, const G4ModelingParameters &)
void SetSectionSolid(G4VSolid *pSectionSolid)
std::vector< PVNameCopyNo > PVNameCopyNoPath
G4VSolid * fpCutawaySolid
G4double GetLineWidth() const
LineStyle GetLineStyle() const
PVNameCopyNoPath::const_iterator PVNameCopyNoPathConstIterator
G4int GetForcedLineSegmentsPerCircle() const
const G4Colour & GetColour() const