Hi,

I have some code like:

   ..........
   pickCanvas.setShapeLocation(xpos, ypos);
   PickResult pr = pickCanvas.pickClosest();

   if (pr != null) {
       PickIntersection pi = pr.getIntersection(0);
       if (pi != null) {
              pickedPoint = pi.getPointCoordinatesVW();
              //pi.getClosestVertexCoordinatesVW();
              localPt = pi.getPointCoordinates();
              //pi.getClosestVertexCoordinates();
       }
   ..................

It works fine if I use getClosestVertexCoordinatesVW() instead of
getPointCoordinatesVW(). In this later case, sometimes, it works,
sometimes, it throws a runtime exception as below. I don't see any
description in Java3d document how it gets into this problem? Is it
a bug or am I doing wrong?  Thanks for your comments or suggestion.

----white


java.lang.RuntimeException: Interp point outside triangle
        at 
com.sun.j3d.utils.picking.PickIntersection.getInterpWeights(PickIntersection.java:1467)
        at 
com.sun.j3d.utils.picking.PickIntersection.getPointCoordinates(PickIntersection.java:1115)
        at 
project.view.behavior.PickPointBehavior.pointMorphing(PickPointBehavior.java:254)
        at 
project.view.behavior.PickPointBehavior.updateScene(PickPointBehavior.java:132)
        at 
project.view.behavior.PickPointBehavior.processStimulus(PickPointBehavior.java:112)
        at javax.media.j3d.BehaviorScheduler.doWork(BehaviorScheduler.java:172)
        at javax.media.j3d.J3dThread.run(J3dThread.java:250)

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