Hi Everyone;
I've been messing around with SFML, and was wondering if there was any in-built method to perform nonlinear transforms on a sprite? When I say nonlinear, I've specifically got two aims: I want to be able to map a square sprite to the shape of the side of a cylinder (in other words, the 2D shape that is the side of
https://upload.wikimedia.org/wikipedia/commons/thumb/3/36/Circular_cylinder_rh.svg/200px-Circular_cylinder_rh.svg.png). In addition (and this is a little trickier) I want to use a UV map for a sphere like
https://en.wikipedia.org/wiki/File:UVMapping.png, but again only mapping to the 2D projection of the final 3D image.
Basically, the linear transforms in SFML let you map
[A B TX] [X] [AX + BY + TX]
[C D TY] [Y] = [CX + DY + TY]
[0 0 1 ] [1] [ 1 ]
But what I'm after is an end result for any image in XY co-ordinates and arbitrary functions u and v to
[u(X,Y)]
[v(X,Y)]
[ 1 ]
Is there support for this in SFML itself, or if not, has anyone written an extension to do this?