JuliaIO / MeshIO.jl

IO for Meshes
Other
79 stars 31 forks source link

Fix uvw coordinates in obj files #88

Closed danlooo closed 4 months ago

danlooo commented 4 months ago

This PR aims to fix the support for 3 dimensional texture coordinates in obj files having lines e.g. vt 0 1 0.

Previous behavior:

using MeshIO
using FileIO
load("test/testfiles/cube_uvw.obj").uv
# 8-element Vector{GeometryBasics.Vec{2, Float32}}:
#  [0.0, 0.0]
#  [1.0, 0.0]
#  [0.0, 1.0]
#  [0.0, 0.0]
#  [1.0, 1.0]
#  [0.0, 1.0]
#  [1.0, 0.0]
#  [1.0, 1.0]

Fixed behavior:

load("test/testfiles/cube_uvw.obj").uv
# 8-element Vector{Vec{3, Float32}}:
#  [0.0, 0.0, 0.0]
#  [1.0, 0.0, 0.0]
#  [0.0, 1.0, 0.0]
#  [0.0, 0.0, 1.0]
#  [1.0, 1.0, 0.0]
#  [0.0, 1.0, 1.0]
#  [1.0, 0.0, 1.0]
#  [1.0, 1.0, 1.0]

Stats:

(tmp) pkg> status
Status `/tmp/Project.toml`
  [5789e2e9] FileIO v1.16.2
  [7269a6da] MeshIO v0.4.10
codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (b058a48) 78.31% compared to head (ada98fc) 78.93%. Report is 2 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #88 +/- ## ========================================== + Coverage 78.31% 78.93% +0.62% ========================================== Files 10 10 Lines 521 527 +6 ========================================== + Hits 408 416 +8 + Misses 113 111 -2 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

SimonDanisch commented 4 months ago

Thanks!