hand-tracking and exhibits part one
[laserbrain_demo] / src / exhibit.cc
index 2e81854..b598b75 100644 (file)
@@ -61,7 +61,13 @@ ExSelection Exhibit::select(const Ray &ray) const
 
 ExSelection Exhibit::select(const Sphere &sph) const
 {
-       return ExSelection(0);  // TODO
+       ExSelection sel;
+       if(collision_sphere_aabox(sph, get_aabox())) {
+               sel.ex = (Exhibit*)this;
+               sel.selsphere = sph;
+               sel.validmask = EXSEL_SPHERE;
+       }
+       return sel;
 }
 
 void Exhibit::update(float dt)