@Override
    public int collideWith(Collidable other, CollisionResults results) {
        if (other instanceof Ray) {
            Ray ray = (Ray) other;
            return collideWithRay(ray, results);
        } else if (other instanceof Triangle) {
            Triangle t = (Triangle) other;
            if (intersects(t.get1(), t.get2(), t.get3())) {
                CollisionResult r = new CollisionResult();
                results.addCollision(r);
                return 1;
            }
            return 0;
        } else if (other instanceof BoundingVolume) {
            if (intersects((BoundingVolume) other)) {
                CollisionResult r = new CollisionResult();
                results.addCollision(r);
                return 1;
            }
            return 0;
        } else if (other instanceof Spatial) {
            return other.collideWith(this, results);
        } else {
            throw new UnsupportedCollisionException("With: " + other.getClass().getSimpleName());
        }
    }
@see com.jme3.bounding.BoundingVolume#intersects(com.jme3.math.Ray)
jme3-core/src/main/java/com/jme3/bounding/BoundingBox.java