66 blankAtt->SetVisibility( FALSE );
70 std::ifstream fin(colourFile.c_str());
73 G4double cred, cgreen, cblue, copacity;
75 for( G4int ii = 0; ii < nMate; ii++ )
80 fin >> cred >> cgreen >> cblue >> copacity;
81 G4Colour colour( cred, cgreen, cblue, copacity );
83 visAtt->SetVisibility(
true);
95 G4Material* mate = G4PhantomParameterisation::ComputeMaterial(
98 if(G4VVisManager::GetConcreteInstance() && physVol)
100 G4String mateName = mate->GetName();
101 std::string::size_type iuu = mateName.find(
"__");
102 if( iuu != std::string::npos )
103 mateName = mateName.substr( 0, iuu );
106 physVol->GetLogicalVolume()->SetVisAttributes(
114 auto len = mat_color.length();
115 if(mateName.find(mat_color) == 0 &&
116 mateName.length() > len && mateName[len] ==
'_')
118 physVol->GetLogicalVolume()->SetVisAttributes(
127 G4int matIndex = G4int(GetMaterialIndex(copyNo));
128 static uintmax_t n = 0;
130 G4cout <<
"Unknown material name " << mateName
131 <<
" for index " << matIndex << G4endl;
133 physVol->GetLogicalVolume()->SetVisAttributes(
136 physVol->GetLogicalVolume()->SetVisAttributes(
140 physVol -> GetLogicalVolume()->SetMaterial(mate);