Hi Xabi,

On Wed, 2005-09-28 at 10:19 +0200, etche xabi wrote:
> Hello all,
> I would like to know if there is a simple way to
> compute the  screen position of a 3D object on my
> scene in order to emulate a mouse with a RV tools(and
> use what have been done with the mouse...)
> I see that we have a "getWorldToScreen" so i suppose
> that with the translation of my object i'm not far of
> what i want.

Yes, you need to multiple the worldToScreen with the toWorld of your
model, and you should be fine.

> And to finish i suppose that i have to compute the
> viewport difference (like on the caclViewRay)

Not sure what you mean here. The screen coordinates that the
worldToScreen gives you or OpenGL clip coordinates, i.e. from -1 to 1 in
x and y. If you want pixel coordinates you will have to scale them with
the viewport size.

> And it will be ok?

I sure hope so. ;)

        Dirk




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to