Scene object position translate to screen position

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

lw89
Just popping in
Just popping in
Posts: 11
Joined: Tue Jul 28, 2009 09:57

Scene object position translate to screen position

Postby lw89 » Mon Apr 26, 2010 00:47

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.

agamemnus
Just can't stay away
Just can't stay away
Posts: 185
Joined: Sun Mar 14, 2010 04:21

Re: Scene object position translate to screen position

Postby agamemnus » Mon Apr 26, 2010 04:50

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.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 24 guests