Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix uvw coordinates in obj files #88

Merged
merged 3 commits into from
Feb 13, 2024

Conversation

danlooo
Copy link
Contributor

@danlooo danlooo commented Feb 13, 2024

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

Copy link

codecov bot commented Feb 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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
@@            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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@SimonDanisch SimonDanisch merged commit e2d9f88 into JuliaIO:master Feb 13, 2024
4 checks passed
@SimonDanisch
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants