in the function 'MeshRefiner::refine()', why the index of new2old_points and attributes are different, it seems to cause mismatch between points and uvs
auto find_or_emit_vertex = [&](int vi, int ii) { int offset = connection.v2f_offsets[vi]; int connection_count = connection.v2f_counts[vi]; for (int ci = 0; ci < connection_count; ++ci) { int& ni = old2new_indices[connection.v2f_indices[offset + ci]]; if (ni != -1 && compare_all_attributes(ni, ii)) { return ni; } else { ni = (int)new_points.size(); new_points.push_back(points[vi]); new2old_points.push_back(vi); for (auto& attr : attributes) attr->emit(ii); return ni; } } return 0; };
new2old_points saves vi while attr saves ii, does it right?
in the function 'MeshRefiner::refine()', why the index of new2old_points and attributes are different, it seems to cause mismatch between points and uvs
auto find_or_emit_vertex = [&](int vi, int ii) { int offset = connection.v2f_offsets[vi]; int connection_count = connection.v2f_counts[vi]; for (int ci = 0; ci < connection_count; ++ci) { int& ni = old2new_indices[connection.v2f_indices[offset + ci]]; if (ni != -1 && compare_all_attributes(ni, ii)) { return ni; } else { ni = (int)new_points.size(); new_points.push_back(points[vi]); new2old_points.push_back(vi); for (auto& attr : attributes) attr->emit(ii); return ni; } } return 0; };
new2old_points saves vi while attr saves ii, does it right?