Page 1 of 1

Rotate 2d bitmap

Posted: Thu May 05, 2005 3:40 pm
by phi
Hi,
I want to rotate a bitmap, which has been loaded, using getTexture, now I want to rotate it. I found this in the help, but I don't know, how to use it...
"
template<class T>
void irr::core::vector2d< T >::rotateBy ( f64 degrees,
const vector2d< T > & center
) [inline]

rotates the point around a center by an amount of degrees.
"
:?
The image has been loaded to rotate_BMP.
Does anyone know, how to rotate it?

Thanks!!!

Posted: Thu May 05, 2005 5:15 pm
by after-life
The thing you found in the api is not for textures, its for a 2D vector.
As far as I know, there is no function to rotate a texture.
You can rotate the texture with a texture editing program and use
IGUIImage and setImage to change an image when the program is running.

Posted: Thu May 05, 2005 5:18 pm
by keless
basically, phi, the 2D drawing capacity of irrlicht does not support rotating textures during blit-- you cant get it to do what you want. You either have to do everything in 3D and use 3D rotations, or extend irrlicht

Posted: Thu May 05, 2005 6:18 pm
by phi
OK, thanks for these answers! :D

Probably, I will just create a 3d box and set the texture to it, and then rotate this box.

Posted: Fri May 06, 2005 1:34 pm
by saigumi
I have something written for this. CTileSceneNode - http://irrlicht.sourceforge.net/phpBB2/ ... node#24576