Struggling my head with squares...
Hi there!
I'm working in a project relatively simple but with some graphical difficulties... I need to interact with images and make it deform by user's touch, and I don't know how to make it run fine.
Now I'm using OpenGL (because I think it's the most powerful graphical source on iPhone) and using 2D projection with images. I've modified images to let it's vertex to be modified as users touches them, but I can't think a way of modifying all the rectangle (so each vertex can be modified, but there's no way to modify a rectangle's side because image is defined by it's four vertices so I don't know how can it be done)... Any idea? The problem is that images are all included in a rectangle or a square, so modifying the image means modifying one of it's four vertices, but no way to say, for example: "I want that side to transform from a straight line to a curved line as user touches it, but without changing image's vertices..."
I don't know if what I'm asking is quite difficult or nearly impossible, but if anyone thinks can give me a clue (or if someone knows that this is impossible please tell me before I shot myself trying to get this working ^_^) any help will be really really appreciated!
Thanks in advance!
|