Hello,

i want to move an object in the 3d-space on the XY/YZ/XZ-plane with the 
mouse.

my wrong method of resolution is:

    // create XY-Plane
    OSG::Pnt3f p0,p1,p2;
    p0.setValues(0, 0, 0);
    p1.setValues(0, 1, 0);
    p2.setValues(1, 0, 0);
    OSG::Plane plane (p0,p1,p2);

    // calaculate intersection point with viewray
    OSG::Line line = mgr->calcViewRay(x, y);;
    plane.intersectInfinite(line,p);

    // set the new object position with own function (setting the
    position works)
    setObjectPosition(p);

is there a fault at the plane creation? it seems, that the plane is in 
an other coordinate-system than the rendering happens?!
can anybody help me?

thanks
Daniel

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to