// We invert y because Meshlab's uv origin (0, 0) is on the bottom-left
}
obj_file<<"usemtl FaceTexture"<<std::endl;// the name of our texture (material) will be 'FaceTexture'
for(auto&&v:mesh.tvi){
// This assumes mesh.texcoords.size() == mesh.vertices.size(). The texture indices could theoretically be different (for example in the cube-mapped 3D scan)
// Add one because obj starts counting triangle indices at 1
// We invert y because Meshlab's uv origin (0, 0) is on the bottom-left
}
obj_file<<"usemtl FaceTexture"<<std::endl;// the name of our texture (material) will be 'FaceTexture'
for(auto&&v:mesh.tvi){
// This assumes mesh.texcoords.size() == mesh.vertices.size(). The texture indices could theoretically be different (for example in the cube-mapped 3D scan)
// Add one because obj starts counting triangle indices at 1