/** Construct a PickResult using a SceneGraphPath @param sgp SceneGraphPath associated with this PickResult @param ps The pickShape to intersect against */ public PickResult (SceneGraphPath sgp, PickShape ps) { pickedSceneGraphPath = sgp; pickedNode = sgp.getObject(); localToVWorld = sgp.getTransform(); pickShape = ps; initPickShape(); }
PickInfo pickInfo = new PickInfo(); Transform3D localToVworld = path.getTransform(); if (localToVworld == null) { throw new IllegalArgumentException(J3dI18N.getString("Shape3DRetained3"));
/** * Check if the geometry component of this shape node under path * intersects with the pickShape. * This is an expensive method. It should only be called if and only * if the path's bound intersects pickShape. * @exception IllegalArgumentException if <code>path</code> is * invalid. */ boolean intersect(SceneGraphPath path, PickShape pickShape, double[] dist) { int flags; PickInfo pickInfo = new PickInfo(); Transform3D localToVworld = path.getTransform(); if (localToVworld == null) { throw new IllegalArgumentException(J3dI18N.getString("Shape3DRetained3")); } pickInfo.setLocalToVWorldRef( localToVworld); //System.err.println("Shape3DRetained.intersect() : "); if (dist == null) { //System.err.println(" no dist request ...."); return intersect(pickInfo, pickShape, 0); } flags = PickInfo.CLOSEST_DISTANCE; if (intersect(pickInfo, pickShape, flags)) { dist[0] = pickInfo.getClosestDistance(); return true; } return false; }
PickInfo pickInfo = new PickInfo(); Transform3D localToVworld = path.getTransform(); if (localToVworld == null) { throw new RuntimeException(J3dI18N.getString("MorphRetained5"));