double sqDist;
    boolean intersectCylinder(Point3d pt, PickCylinder cyl,			      double[] dist) {		Point3d origin = getPoint3d();	Point3d end = getPoint3d();	Vector3d direction = getVector3d();	Point3d iPnt = getPoint3d();	Vector3d originToIpnt = getVector3d();	// Get cylinder information	cyl.getOrigin (origin);	cyl.getDirection (direction);	double radius = cyl.getRadius ();	double sqDist;	if (cyl instanceof PickCylinderSegment) {	    ((PickCylinderSegment)cyl).getEnd (end);	    sqDist = Distance.pointToSegment(pt, origin, end, iPnt, null);	}	else {	    sqDist = Distance.pointToRay(pt, origin, direction, iPnt, null);	}	if (sqDist <= radius*radius) {	    originToIpnt.sub (iPnt, origin);	    dist[0] = originToIpnt.length();	    freePoint3d(origin);	    freePoint3d(end);	    freePoint3d(iPnt);	    freeVector3d(originToIpnt);	    freeVector3d(direction);	    return true;	}	freePoint3d(origin);	freePoint3d(end);	freePoint3d(iPnt);	freeVector3d(originToIpnt);	freeVector3d(direction);	return false;    }