gmggroup / omf-python

Python library for working with OMF files
MIT License
79 stars 19 forks source link

[GH-14] Add UV mapped texture #87

Closed fwkoch closed 5 years ago

fwkoch commented 5 years ago

This is a new texture class for mapping an image to vertices using normalized image UV coordinates. The uv_coordinates on the texture must be between 0 and 1 and the length must match the length of the vertices of the element.

Also, the redundantly named ImageTexture is renamed slightly more meaningful ProjectedTexture.

codecov-io commented 5 years ago

Codecov Report

Merging #87 into dev will decrease coverage by 0.1%. The diff coverage is 95.65%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev      #87      +/-   ##
==========================================
- Coverage   96.44%   96.33%   -0.11%     
==========================================
  Files          11       11              
  Lines         506      519      +13     
==========================================
+ Hits          488      500      +12     
- Misses         18       19       +1
Impacted Files Coverage Δ
omf/__init__.py 100% <100%> (ø) :arrow_up:
omf/pointset.py 94.44% <100%> (-0.3%) :arrow_down:
omf/surface.py 96.15% <100%> (-0.08%) :arrow_down:
omf/texture.py 96.29% <93.75%> (-3.71%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4b85d42...06f08b6. Read the comment docs.

fwkoch commented 5 years ago

@timmclennan @banesullivan - You mind giving this a quick review? I know you both have experience working with these textures - just want to confirm my simple implementation with image and UV coordinates is satisfactory.