Hello everyone:
I don't know should i post this question at here. The problem is, i want to get 3D scene object postion that is translated to UI position. there is a object move in the 3d scene, and i create a Ui radio button on ui. the radio button will follow the object move on the screen, and radio button always look like at the center of the object.
thanks in advance.
Scene object position translate to screen position
Moderators: CEGUI MVP, CEGUI Team
Re: Scene object position translate to screen position
Such a function would depend on your camera position, its field of view, and the view type you are using (orthographic or perspective). It's purely mathematical in nature and doesn't have anything to do with the GUI you're using.
Your renderer would most likely have a function to do this, though.
If you are using Irrlicht you can use "GetScreenCoordinatesFrom3DPosition". If you're using opengl, there is gluProject. There's probably something similar with Ogre and DirectX.
Your renderer would most likely have a function to do this, though.
If you are using Irrlicht you can use "GetScreenCoordinatesFrom3DPosition". If you're using opengl, there is gluProject. There's probably something similar with Ogre and DirectX.
Who is online
Users browsing this forum: No registered users and 24 guests