X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=laserbrain_demo;a=blobdiff_plain;f=src%2Fexman.cc;h=eea24a6e438da65ca5be930647a8f1f238c4f757;hp=e5cdd9fe09d6dc6fc702fc5b6ec7f9b24e0a8e73;hb=6ecd4ecfa020964e4250bf9322c1a26ac4073b76;hpb=794a378d5c8e07c815814324da8142be137406d0 diff --git a/src/exman.cc b/src/exman.cc index e5cdd9f..eea24a6 100644 --- a/src/exman.cc +++ b/src/exman.cc @@ -285,13 +285,14 @@ ExSelection ExhibitManager::select(const Ray &ray) const ExSelection ExhibitManager::select(const Sphere &sph) const { - ExSelection sel; - if(!items.empty()) { - sel.ex = items[0]; - sel.selsphere = sph; - sel.validmask = EXSEL_SPHERE; + int nitems = items.size(); + for(int i=0; iselect(sph); + if(sel) { + return sel; + } } - return sel; // TODO + return ExSelection(); } // TODO optimize