Fwd: Re: Picking...

New Message Reply Date view Thread view Subject view Author view

Kent Miller (blastarr++at++ix.netcom.com)
Tue, 14 Mar 1995 18:18:27 -0800


On Mar 14, 9:38am, abrend++at++idt.unit.no wrote:
> Subject: Picking...
>
> I can't get the picking to work. First I use
> 'pfNodePickSetup(root)' after the scene is read in from a Medit file.
> Then - in the simulation loop - I use
>
> noHit = pfChanPick(chan, PFPK_M_NEAREST, (mouse.xchan+1)/2,
> (mouse.ychan+1)/2, 0.0f, pickList);
>

px and py need to be normalized (0.0 to 1.0). pfuMapMouseToChan() which
is
used to update the mouse xchan/ychan creates values between -1.0 and
1.0.
Try using pfuCalcNormalizedChanXY() to create normalized screen
coordinates
(0.0 to 1.0) using the mouse xpos/ypos as input args.

-Andy

The "pickfly" code provided w/ Performer has all you need to implement
picking. I've used that code successfully as the basis for picking in
several apps.

---- End Forwarded Message


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:04 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.