Rob Nugent wrote:
Hi All,
I have a question for the Java3D folks. In my app, I am using the
method in Shape3D:
intersect(SceneGraphPath path, PickRay pickRay, double[] dist);
Now, I'd really like to know the normal at the intersection point, and
I'm
wondering whether it would (theoretically) be possible for a *similarly
performant* method to be added to Shape3D thus:
intersect(SceneGraphPath path, PickRay pickRay, double[] dist,
Vector3f[] normal);
that returned the normal of the intersection point ?
Now, yes, I know that I can achieve this with PickTool / PickResult /
PickIntersection.getPointNormal() in the utilities classes, but the
implementation essentially does the pick all over again (but slower), and
performance is critical to me. (And anyhow, I prefer to shun the
utility classes).
I suspect that there is some underlying reason that the method I'm
suggesting
couldn't be implemented efficiently, and I'd really like to know what the
situation is.
A (naive, no doubt) mathematical approach would suggest that the existing
intersect method needs to solve the plane equation 'r.n=c' and the
line equation
'r = a + lamba * b' for r, which would suggest n should be readily
available.
It is possible to implement the suggestion but the J3D API in v1.3 is
freeze so
we can't add any method.
- 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".