Hi Andreas,

thanks for your suggestions.
We found out that the pickray was picking backwards (for some strange
reasons)! So now we we get the direction of the pickConeRay and then we set
this direction negative.
We also found an other strange thing :
If you specify a shapeRay and after that you set the shapelocation, then the
pickshape is changed to a ConeRay!!!???

    pc = new PickCanvas(canvas3D, topBranchGroup);
    pc.setMode(PickTool.BOUNDS);
    pc.setTolerance(4.0f);
    pc.setShapeRay();

        pc.setShapeLocation(mouseEvent);
//Here the pickshape is changed to a coneray!!!!
      pickResult = pc.pickClosest();
              if (pickResult != null) {
                System.out.println(pickResult.toString());
        }

But now all is working fine.

gr. Bart


-----Original Message-----
From: Andreas Ebbert [mailto:[EMAIL PROTECTED]]
Sent: woensdag 22 november 2000 21:18
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] picking problem


Hi,

"Stokkermans, Bart" wrote:

> I've a problem with picking objects.
> I've done for all the nodes : setPickable(true).
> and I've done for some nodes : setCapability(ENABLE_PICK_REPORTING)
> I have a PickCanvas with mode : PickTool.GEOMETRY
> When I get a pickResult  with PickResult.pickClosest() we always get the
> same result.

I assume you aren't getting any intersection information when you pick,
that's
why PickCanvas always returns the same object on not the closest (because
intersection information is used to calculate the distance). Try setting the
tolerance of PickCanvas to zero :-) That should

a) work
b) be documented in the API!

Best Regards,

Andreas

===========================================================================
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".

===========================================================================
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".

Reply via email to