| 152 | } |
| 153 | |
| 154 | void MeshFactory::initialize_attributes(MeshParser::Ptr parser) { |
| 155 | Mesh::AttributesPtr attributes = m_mesh->get_attributes(); |
| 156 | |
| 157 | MeshParser::AttrNames attr_names = parser->get_attribute_names(); |
| 158 | for (MeshParser::AttrNames::const_iterator itr = attr_names.begin(); |
| 159 | itr != attr_names.end(); itr++) { |
| 160 | const std::string& name = *itr; |
| 161 | size_t attr_size = parser->get_attribute_size(name); |
| 162 | VectorF attr_data(attr_size); |
| 163 | parser->export_attribute(name, attr_data.data()); |
| 164 | |
| 165 | attributes->add_empty_attribute(name); |
| 166 | attributes->set_attribute(name, attr_data); |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | void MeshFactory::compute_and_drop_zero_dim() { |
| 171 | const size_t num_vertices = m_mesh->get_num_vertices(); |
nothing calls this directly
no test coverage detected