projects
/
laserbrain_demo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
hand-tracking and exhibits part one
[laserbrain_demo]
/
src
/
exman.cc
diff --git
a/src/exman.cc
b/src/exman.cc
index
e5cdd9f
..
eea24a6
100644
(file)
--- 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 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; i<nitems; i++) {
+ ExSelection sel = items[i]->select(sph);
+ if(sel) {
+ return sel;
+ }
}
}
- return sel; // TODO
+ return ExSelection();
}
// TODO optimize
}
// TODO optimize