Lee,
Thanks for reporting your finding and the test program. You've
encountered one of the 2 known picking utility bugs :
BugId 4351050.
The current Shape3D.intersect() API doesn't return the distance for PickCone
and PickCylinder.
BugId 4351579.
For S3D with multiple geometry, there isn't a way for the j3d-core to return
the index of the nearest intersected geometry.
But for your test program, if you aren't intersected in picking point and line,
there is an easy work around. All you've to do, is to set the
tolerance of PickCanvas to 0.0f :
pickScene = new PickCanvas(canvas, g);
pickScene.setTolerance(0.0f); // Use PickRay.
Note from performance guide :
- Picking
If the application doesn't need the accuracy of geometry based
picking, use bounds based picking. For more accurate picking
and better picking performance, use PickRay instead of
PickCone/PickCylnder unless you need to pick line/point.
PickCanvas with a tolerance of 0 will use PickRay for picking.
Thanks,
Chien Yang
Java 3D Team.
> From: "J. Lee Dixon" <[EMAIL PROTECTED]>
> To: "'Discussion list for Java 3D API'" <[EMAIL PROTECTED]>
> Cc: "Java3DBugReporting (E-mail)" <[EMAIL PROTECTED]>
> Subject: RE: [JAVA3D] Trouble with pick reporting (bug?)
> Date: Fri, 25 Aug 2000 11:47:02 -0400
> Importance: high
> X-Priority: 1
> MIME-Version: 1.0
>
> After a little investigation, I have another set of code that shows
> REPEATABLE results with my pick reporting problem. I now have 5 boxes
> and 4 cones:
> box1: red cone
> box2: blue cone
> box3: green cone
> box4: gray cone
> box5: empty
>
> Shift all the cones up one box by first selecting the gray cone, then
> selecting box 5. Continue with the green, blue, and red cone until the
> scene looks like:
> box1: empty
> box2: red cone
> box3: blue cone
> box4: green cone
> box5: gray cone
>
> Now, try to select the green cone in box 4. I've tried it on two NT
> machines now with the same result of not being able to select the cone.
> The other cones still work.
>
> Anybody else get the same results as me?
>
> -Lee
>
>
>
> -----Original Message-----
> From: J. Lee Dixon [mailto:[EMAIL PROTECTED]]
> Sent: Friday, August 25, 2000 10:28 AM
> To: [EMAIL PROTECTED]
> Subject: [JAVA3D] Trouble with pick reporting (bug?)
> Importance: High
>
>
> I have an example application I wrote to help me investigate problem I
> was having with pick reporting. This application has 3 boxes that act
> as slots to receive cones. The user clicks on a cone, the cone
> disappears to denote being "held", then a box is selected to place the
> cone in front of the box.
>
> The app works well most of the time. Every so often (often enough that
> to me something is broken), the selection routines ( specifically
> PickCanvas.pickClosest(), which returns a PickResult, and
> PickResult.pickClosest() ) will not return the closer item, which is the
> cone, but return the box behind it. Seems to me that the sorting of
> picked items randomly goes bad.
>
> Can someone (SUN?) give this program a try? You have to spend a little
> time picking the cones and moving them around, but every so often, a
> cone will get stuck and the selection routines won't allow picking it.
>
> (JDK 1.3, J3D 1.2openGL, WinNT)
>
> Thanks.
>
> J. Lee Dixon
> Software Engineer
> SAIC - Celebration, FL
> [EMAIL PROTECTED]
> <<TestBed4.java>>
>
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".