How fast is Ray/BoundingVolume intersection?

Is the Ray/BoundingVolume intersection routine fast enough that we could put it in the transparent renderqueue comparitor?



What I'd like to do is this something like this pseudocode:



int  compare(o1, o2){

    Ray ray1 = o1.location - camera.location;

    Ray ray2 = o2.location - camera.location;



    if (ray1.intersects(o2.boundingVolume)){

        return -1;  //o2 is between camera and o1's center

    }

    else if (ray2.intersects(o1.boundingVolume)){

        return 1; //o1 is between camera and o2 center.

    }



    return 0; //neither ray intersects either volume.

}





The problem here is, of course, if the SceneElements to be compared do not have bounding volumes.



What do ya'll think?



(Btw: perhaps another "real" (read:not free) product will be developed using jME.  I'm currently doing the feasibility study for my workgroup.)