52 std::vector<G4Material*>& mat,
53 G4int fnZ_, G4int fnY_, G4int fnX_,
57 fdX(voxelSize.x()), fdY(voxelSize.y()), fdZ(voxelSize.z()),
58 fnX(fnX_), fnY(fnY_), fnZ(fnZ_),
75 blankAtt->SetVisibility( FALSE );
78 std::ifstream fin(colourFile.c_str());
81 G4double cred, cgreen, cblue, copacity;
83 for( G4int ii = 0; ii < nMate; ii++ )
88 fin >> cred >> cgreen >> cblue >> copacity;
89 G4Colour colour( cred, cgreen, cblue, copacity );
91 visAtt->SetVisibility(
true);
109 const G4VTouchable* parentTouch)
114 if(parentTouch ==
nullptr)
120 G4int ix = parentTouch->GetReplicaNumber(0);
121 G4int iy = parentTouch->GetReplicaNumber(1);
128 if(G4VVisManager::GetConcreteInstance() && physVol)
131 std::string::size_type iuu = mateName.find(
"__");
132 if( iuu != std::string::npos )
133 mateName = mateName.substr( 0, iuu );
136 physVol->GetLogicalVolume()->SetVisAttributes(
144 auto len = mat_color.length();
145 if(mateName.find(mat_color) == 0 &&
146 mateName.length() > len && mateName[len] ==
'_')
148 physVol->GetLogicalVolume()->SetVisAttributes(
158 static uintmax_t n = 0;
160 G4cout <<
"Unknown material name " << mateName
161 <<
" for index " << matIndex << G4endl;
163 physVol->GetLogicalVolume()->SetVisAttributes(
166 physVol->GetLogicalVolume()->SetVisAttributes(
170 physVol -> GetLogicalVolume()->SetMaterial(mate);