| 235 | } |
| 236 | |
| 237 | void HdfSerializer::read_surface_style(const surface_style_serialization& s, |
| 238 | ifcopenshell::geometry::taxonomy::style& gss, |
| 239 | IfcParse::IfcFile& f) { |
| 240 | if (strlen(s.name) || s.id) { |
| 241 | if (!std::isnan(s.diffuse[0])) { |
| 242 | gss.diffuse = ifcopenshell::geometry::taxonomy::colour(s.diffuse[0], s.diffuse[1], s.diffuse[2]); |
| 243 | } |
| 244 | if (!std::isnan(s.specular[0])) { |
| 245 | gss.specular = ifcopenshell::geometry::taxonomy::colour(s.specular[0], s.specular[1], s.specular[2]); |
| 246 | } |
| 247 | if (!std::isnan(s.transparency)) { |
| 248 | gss.transparency = s.transparency; |
| 249 | } |
| 250 | if (!std::isnan(s.specularity)) { |
| 251 | gss.specularity = s.specularity; |
| 252 | } |
| 253 | if (s.id != 0) { |
| 254 | gss.instance = f.instance_by_id(s.id)->as<IfcUtil::IfcBaseEntity>(); |
| 255 | } |
| 256 | } |
| 257 | |
| 258 | } |
| 259 | |
| 260 | void HdfSerializer::remove(const std::string& guid) { |
| 261 | if (H5Lexists(file.getId(), guid.c_str(), H5P_DEFAULT)) { |
nothing calls this directly
no test coverage detected