Rotate 2d bitmap

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
phi

Rotate 2d bitmap

Post 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!!!
after-life
Posts: 69
Joined: Wed Mar 30, 2005 8:16 am
Location: Keerbergen, Belgium

Post 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.
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post 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
a screen cap is worth 0x100000 DWORDS
phi

Post 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.
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

I have something written for this. CTileSceneNode - http://irrlicht.sourceforge.net/phpBB2/ ... node#24576
Crud, how do I do this again?
Post Reply