| 58 | } |
| 59 | |
| 60 | std::vector<ParameterCommon::Variables> MeshTilerHelper::extract_face_attributes( |
| 61 | Mesh::Ptr mesh) { |
| 62 | const size_t num_faces = mesh->get_num_faces(); |
| 63 | std::vector<ParameterCommon::Variables> vars_array; |
| 64 | const auto& attr_names = mesh->get_attribute_names(); |
| 65 | |
| 66 | for (size_t i=0; i<num_faces; i++) { |
| 67 | ParameterCommon::Variables vars; |
| 68 | for (const auto& name : attr_names) { |
| 69 | const MatrixFr& attr = mesh->get_attribute(name); |
| 70 | if (attr.rows() != num_faces) continue; |
| 71 | if (attr.cols() != 1) continue; |
| 72 | vars[name] = attr(i, 0); |
| 73 | } |
| 74 | vars_array.push_back(vars); |
| 75 | } |
| 76 | return vars_array; |
| 77 | } |
| 78 | |
| 79 | std::vector<ParameterCommon::Variables> MeshTilerHelper::extract_voxel_attributes( |
| 80 | Mesh::Ptr mesh) { |
nothing calls this directly
no test coverage detected