Mesh: Replace MLoop struct with generic attributes #104424

Merged
Hans Goudey merged 261 commits from refactor-mesh-corners-generic into main 2023-03-20 15:55:25 +01:00
3 changed files with 3 additions and 3 deletions
Showing only changes of commit 2a98a1c133 - Show all commits

View File

@ -348,7 +348,7 @@ void OBJWriter::write_poly_elements(FormatHandler &fh,
int prev_i = obj_mesh_data.remap_poly_index(idx - 1);
int i = obj_mesh_data.remap_poly_index(idx);
Vector<int> poly_vertex_indices = obj_mesh_data.calc_poly_vertex_indices(i);
Span<int> poly_vertex_indices = obj_mesh_data.calc_poly_vertex_indices(i);
Span<int> poly_uv_indices = obj_mesh_data.calc_poly_uv_indices(i);
Vector<int> poly_normal_indices = obj_mesh_data.calc_poly_normal_indices(i);

View File

@ -276,7 +276,7 @@ float3 OBJMesh::calc_vertex_coords(const int vert_index, const float global_scal
return r_coords;
}
Vector<int> OBJMesh::calc_poly_vertex_indices(const int poly_index) const
Span<int> OBJMesh::calc_poly_vertex_indices(const int poly_index) const
{
const MPoly &mpoly = mesh_polys_[poly_index];
return mesh_corner_verts_.slice(mpoly.loopstart, mpoly.totloop);

View File

@ -151,7 +151,7 @@ class OBJMesh : NonCopyable {
/**
* Calculate vertex indices of all vertices of the polygon at the given index.
*/
Vector<int> calc_poly_vertex_indices(int poly_index) const;
Span<int> calc_poly_vertex_indices(int poly_index) const;
/**
* Calculate UV vertex coordinates of an Object.
* Stores the coordinates and UV vertex indices in the member variables.