Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Picking



On Wednesday, December 25, 2002, at 12:41 PM, Brian Greenstone wrote:
That's exactly what I've spend all day doing. I just finished it 3 minutes
ago and it works perfectly now. It's too bad that OpenGL doesn't have this
built in for a few reasons tho:

It's been a while since I looked at picking, but I don't see why you couldn't work around the min/max depth value by doing a glReadPixels on the depth buffer for the single pixel under the cursor to get the 'exact' transformed depth value. If you pass this into gluUnproject along with the screen x/y you should get pretty good results.

You will still probably get more precise results by computing the final point via ray/triangle intersection tests yourself (since the depth buffer is typically 'only' 24 bits has non-linear precision :). Dunno how much the precision matters to you, though.

-tim
_______________________________________________
mac-opengl mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/mac-opengl
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Picking (From: Brian Greenstone <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.