X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?p=laserbrain_demo;a=blobdiff_plain;f=src%2Fexman.cc;h=900d860c8465bf3e764f1251f6ed15fcb4a67ebd;hp=28f3700c80aad471881484467e282ce2a7bdb686;hb=9805564225de579d1f3a3d4942f22f08c5a947c0;hpb=64b09a921ac6c46f8a7ff6e25c9aef3452cdc6b8 diff --git a/src/exman.cc b/src/exman.cc index 28f3700..900d860 100644 --- a/src/exman.cc +++ b/src/exman.cc @@ -84,18 +84,35 @@ bool ExhibitManager::load(MetaScene *mscn, const char *fname) ExSelection ExhibitManager::select(const Ray &ray) const { - return ExSelection(); // TODO + ExSelection sel; + if(!items.empty()) { + sel.ex = items[0]; + sel.selray = ray; + sel.validmask = EXSEL_RAY; + } + return sel; // TODO } ExSelection ExhibitManager::select(const Sphere &sph) const { - return ExSelection(); // TODO + ExSelection sel; + if(!items.empty()) { + sel.ex = items[0]; + sel.selsphere = sph; + sel.validmask = EXSEL_SPHERE; + } + return sel; // TODO } void ExhibitManager::update(float dt) { int num = items.size(); for(int i=0; inode->get_parent()) { + items[i]->node->update(dt); + } items[i]->update(dt); } }