| 13 | static bool default_materials_initialized = false; |
| 14 | |
| 15 | void InitDefaultMaterials() { |
| 16 | default_materials.insert(std::make_pair("IfcSite", std::make_shared<ifcopenshell::geometry::taxonomy::style>("IfcSite"))); |
| 17 | default_materials["IfcSite"]->diffuse = ifcopenshell::geometry::taxonomy::colour(0.75, 0.8, 0.65); |
| 18 | |
| 19 | default_materials.insert(std::make_pair("IfcSlab", std::make_shared<ifcopenshell::geometry::taxonomy::style>("IfcSlab"))); |
| 20 | default_materials["IfcSlab"]->diffuse = ifcopenshell::geometry::taxonomy::colour(0.4, 0.4, 0.4); |
| 21 | |
| 22 | default_materials.insert(std::make_pair("IfcWallStandardCase", std::make_shared<ifcopenshell::geometry::taxonomy::style>("IfcWallStandardCase"))); |
| 23 | default_materials["IfcWallStandardCase"]->diffuse = ifcopenshell::geometry::taxonomy::colour(0.9, 0.9, 0.9); |
| 24 | |
| 25 | default_materials.insert(std::make_pair("IfcWall", std::make_shared<ifcopenshell::geometry::taxonomy::style>("IfcWall"))); |
| 26 | default_materials["IfcWall"]->diffuse = ifcopenshell::geometry::taxonomy::colour(0.9, 0.9, 0.9); |
| 27 | |
| 28 | default_materials.insert(std::make_pair("IfcWindow", std::make_shared<ifcopenshell::geometry::taxonomy::style>("IfcWindow"))); |
| 29 | default_materials["IfcWindow"]->diffuse = ifcopenshell::geometry::taxonomy::colour(0.75, 0.8, 0.75); |
| 30 | default_materials["IfcWindow"]->transparency = 0.3; |
| 31 | |
| 32 | default_materials.insert(std::make_pair("IfcDoor", std::make_shared<ifcopenshell::geometry::taxonomy::style>("IfcDoor"))); |
| 33 | default_materials["IfcDoor"]->diffuse = ifcopenshell::geometry::taxonomy::colour(0.55, 0.3, 0.15); |
| 34 | |
| 35 | default_materials.insert(std::make_pair("IfcBeam", std::make_shared<ifcopenshell::geometry::taxonomy::style>("IfcBeam"))); |
| 36 | default_materials["IfcBeam"]->diffuse = ifcopenshell::geometry::taxonomy::colour(0.75, 0.7, 0.7); |
| 37 | |
| 38 | default_materials.insert(std::make_pair("IfcRailing", std::make_shared<ifcopenshell::geometry::taxonomy::style>("IfcRailing"))); |
| 39 | default_materials["IfcRailing"]->diffuse = ifcopenshell::geometry::taxonomy::colour(0.65, 0.6, 0.6); |
| 40 | |
| 41 | default_materials.insert(std::make_pair("IfcMember", std::make_shared<ifcopenshell::geometry::taxonomy::style>("IfcMember"))); |
| 42 | default_materials["IfcMember"]->diffuse = ifcopenshell::geometry::taxonomy::colour(0.65, 0.6, 0.6); |
| 43 | |
| 44 | default_materials.insert(std::make_pair("IfcPlate", std::make_shared<ifcopenshell::geometry::taxonomy::style>("IfcPlate"))); |
| 45 | default_materials["IfcPlate"]->diffuse = ifcopenshell::geometry::taxonomy::colour(0.8, 0.8, 0.8); |
| 46 | |
| 47 | default_materials.insert(std::make_pair("IfcSpace", std::make_shared<ifcopenshell::geometry::taxonomy::style>("IfcSpace"))); |
| 48 | default_materials["IfcSpace"]->diffuse = ifcopenshell::geometry::taxonomy::colour(0.65, 0.75, 0.8); |
| 49 | default_materials["IfcSpace"]->transparency = 0.8; |
| 50 | |
| 51 | default_material = std::make_shared<ifcopenshell::geometry::taxonomy::style>("DefaultMaterial"); |
| 52 | default_material->diffuse = ifcopenshell::geometry::taxonomy::colour(0.7, 0.7, 0.7); |
| 53 | |
| 54 | default_materials_initialized = true; |
| 55 | } |
| 56 | |
| 57 | ifcopenshell::geometry::taxonomy::colour read_colour_component(const boost::optional<pt::ptree&> list) { |
| 58 | if (!list) { |
no test coverage detected