UMaterialInterface::UMaterialInterface(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer) { if (!HasAnyFlags(RF_ClassDefaultObject)) { InitDefaultMaterials(); AssertDefaultMaterialsExist(); } }
const IfcGeom::SurfaceStyle* IfcGeom::get_default_style(const std::string& s) { if (!default_materials_initialized) InitDefaultMaterials(); std::map<std::string, IfcGeom::SurfaceStyle>::const_iterator it = default_materials.find(s); if (it == default_materials.end()) return &default_material; else { const IfcGeom::SurfaceStyle& surface_style = it->second; return &surface_style; } }
void VertexObject::DefaultInit() { InitDefaultMaterials(); texture1 = NULL; vertex_bufer = NULL; index_bufer = NULL; render_type = RenderType::Plane; indexing_type = IndexingType::Square; }
const IfcGeom::SurfaceStyle* IfcGeom::get_default_style(const std::string& s) { if (!default_materials_initialized) InitDefaultMaterials(); std::map<std::string, IfcGeom::SurfaceStyle>::const_iterator it = default_materials.find(s); if (it == default_materials.end()) { default_materials.insert(std::make_pair(s, IfcGeom::SurfaceStyle(s))); default_materials[s].Diffuse().reset(*default_material.Diffuse()); it = default_materials.find(s); } const IfcGeom::SurfaceStyle& surface_style = it->second; return &surface_style; }