This one goes in general for picking

use the PickRay object and then make sure that you use the
transform3d from getVtoLocalWorld transform
transform your points that you want to pick

then, if you want to set a tolerance
you can do it easily with a quad

take your point that is now transformed
say
1,2,3
and created a quad around that point with your tolerance
float TOLERANCE_HALF = .05
Point3d tPoint //transformed point

quad (just deal with x,y positions)
[0] = tPoint.x - TOLERANCE_HALF, tPoint.y + TOLERANCE_HALF,tPoint.z
[1] = tPoint.x + TOLERANCE_HALF, tPoint.y + TOLERANCE_HALF, tPoint.z
[2] = tPoint.x + TOLERANCE_HALF, tPoint.y - TOLERANCE_HALF,tPoint.z
[3] = tPoint.x - TOLERANCE_HALF,tPoint.y - TOLERANCE_HALF,tPoint.z

then do an intersect with that quad
you can modify the tolerance anyway you want then
Scott


Scott Decker
Research Scientist
Pacific Northwest National Labs
[EMAIL PROTECTED]

=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/

Reply via email to