Hi everybody!

I have a problem in getting normal when I pick the object.
The code that is use is:

            pickCanvas.setShapeLocation(x, y);

            Point3d eyePos = pickCanvas.getStartPosition();
            pickResult = pickCanvas.pickClosest();
            if (pickResult != null) {
              Shape3D sh = (Shape3D)pickResult.getNode(PickResult.SHAPE3D);

            PickIntersection pi = pickResult.getClosestIntersection(eyePos);

            Vector3f iNormal = null;
            iNormal = pi.getPointNormal();
            System.out.println("iNormal " + iNormal);


The normal is null here. My geometry does contain normals.
(BTW, rendering works fine on those objects).
Does somebody knows if I need to add something to the code
to retrieve normals, or it is a bug in PickIntersection?

Thanks,

Boris Epelman

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