I've solved this problem using a NOT INDEXED Geometry (Using an TRINAGLE_FAN Geometry i'had the same problem).
"Not Picking an Indexed Geometry" is an Official Bug of Java 3D that will be solved in the next release.
 
Good Luck, Mauro.
 
----- Original Message -----
Sent: Wednesday, August 30, 2000 10:33 AM
Subject: [JAVA3D] Exact picking

Hello everybody!

I have a problem to establish exact picking of shapes.

If I set a picking mode to GEOMETRY, the exactness is exelent,
but Shapes that have LineStripArray geometry in them can not be
picked at all.

If otherwise I set a picking mode to BOUNDS, every type of geometries can
be picked, but now the exactness of picking is terrible, since Java3D
uses BoundingSphere to compute object bounds.

Here is an example of my picking function:

    public void updateScene(int xpos, int ypos) {
        Shape3D shape = null;

        pickCanvas.setShapeLocation(xpos,ypos);
        PickResult pr = pickCanvas.pickClosest();
        if(pr != null)
          shape = (Shape3D) pr.getNode(PickResult.SHAPE3D);

        univ.UpdateCurrent(shape); // My function that does something with
                                   // picked shape
}

Does anybody knows the solution to this problem?

Boris.

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

Hello everybody!

I have a problem to establish exact picking of shapes.

If I set a picking mode to GEOMETRY, the exactness is exelent,
but Shapes that have LineStripArray geometry in them can not be
picked at all.

If otherwise I set a picking mode to BOUNDS, every type of geometries can
be picked, but now the exactness of picking is terrible, since Java3D
uses BoundingSphere to compute object bounds.

Here is an example of my picking function:

    public void updateScene(int xpos, int ypos) {
        Shape3D shape = null;

        pickCanvas.setShapeLocation(xpos,ypos);
        PickResult pr = pickCanvas.pickClosest();
        if(pr != null)
          shape = (Shape3D) pr.getNode(PickResult.SHAPE3D);

        univ.UpdateCurrent(shape); // My function that does something with
                                   // picked shape
}

Does anybody knows the solution to this problem?

Boris.

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