[info-performer] pfChannel::pick

Date view Thread view Subject view Author view

From: Simone Herrmann (sim_her++at++web.de)
Date: 08/19/2003 09:39:29


Hi,

I want to use the pfChannel::pick function to get an intersection point inside my scene from a mouse position on the screen.
But this function always returns zero as if where was no intersection.
I setup my root node for picking using pfNodePickSetup and the root node must exist because I can see the its content on the screen.
Is there anything else I could have forgotten?

Thanks,
Simone

pfNodePickSetup(root);
...

pfHit **pickList[10];

// mouse position in range 0.0 to 1.0
float xf = (float)xbuttonevent->x/u_winSizeX;
float yf = 1 - (float)xbuttonevent->y/u_winSizeY;

int count = chan->pick(PFPK_M_NEAREST,xf,yf,0,pickList);

__________________________________________________________________________
Die sicherste Form der Kommunikation: E-Mails verschluesseln, Spam-Filter,
Adressverifizierung, digitale Unterschrift: http://freemail.web.de


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Tue Aug 19 2003 - 09:43:40 PDT