Texture coordintes for a polygon and a square texture

Posted by user146780 on Stack Overflow See other posts from Stack Overflow or by user146780
Published on 2010-05-20T22:19:19Z Indexed on 2010/05/20 22:20 UTC
Read the original article Hit count: 304

Filed under:
|
|
|
|

basically I have a texture. I also have a lets say octagon (or any polygon). I find that octagon's bounding box. Let's say my texture is the size of the octagon's bounding box. How could I figure out the texture coordinates so that the texture maps to it. To clarify, lets say you had a square of tin foil and cut the octagon out you'd be left with a tin foil textured polygon.I'm just not sure how to figure it out for an arbitrary polygon. Thanks

© Stack Overflow or respective owner

Related posts about c

    Related posts about c++