Hello,
Haeyong Chung wrote:
> I am looking for a way to drag and drop objects using a mouse. I
> believe that this question has been asked in several times, but I am
> still not sure how to do it. I am sure that dragging and dropping are
> crucial in many OpenSG applications. Could you please let me share
> your great experiences or your code snippets?
there are manipulators in Source/Experimental/Manipulators (for OpenSG
1.x) and in Source/Contrib/Manipulators (for 2.0).
You can use the IntersectAction to pick an object or see
Examples/Simple/idbuffer.cpp (2.0) for a different approach.
> For example, one of the easiest ways is to convert mouse coordinates
> to world coordinates. In OpenGL, we can use gluUnProject . How can I
> do this in OpenSG?
you can get the view and projection matrices from the camera, or you can
use Camera::calcViewRay to get a ray from the eye through the given
point on the window into the scene.
Cheers,
Carsten
------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users