Philip J Colbert wrote:
Thanks for the tips
I have now managed to set the capabilities I requre for the VRML file and I
can gather information about the instersection with the pickRay and all seams
to work for this section but I get this runtime error every now and again any
ideas what it is about?
Exception occurred during Behavior execution:
java.lang.RuntimeException: Interp point outside triangle
at
com.sun.j3d.utils.picking.PickIntersection.getInterpWeights(PickInter
section.java:1467)
at
com.sun.j3d.utils.picking.PickIntersection.getPointCoordinates(PickIn
tersection.java:1115)
at MainPanel$face_ID_Behavior.updateScene(MainPanel.java:504)
at
com.sun.j3d.utils.picking.behaviors.PickMouseBehavior.processStimulus
(PickMouseBehavior.java:162)
at
javax.media.j3d.BehaviorScheduler.doWork(BehaviorScheduler.java:167)
at javax.media.j3d.J3dThread.run(J3dThread.java:256)
C YA Phil :)
From the source of PickIntersection utility
/**
Returns the coordinates of the intersection point (local coordinates),
if available.
@return coordinates of the intersection point
*/
public Point3d getPointCoordinates()
This happens when intersection point is not available but
this method is invoked. It is expected to call this only
when intersection happen. Sometimes numerically inaccurancy
may cause this RuntimeException even though there is intersection
report. In this case a workaround is to catch the Exception and
treat this speical case as non-intersection in your code.
You're welcome to make changes and extend the utility to suit
your purpose.
- Kelvin
------------
Java 3D Team
Sun Microsystems Inc.
===========================================================================
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".