7 ExSelection ExSelection::null;
11 ExSelection::ExSelection(Exhibit *ex)
18 ExSelection::operator bool() const
45 void Exhibit::set_node(SceneNode *node)
48 orig_parent = node->get_parent();
51 ExSelection Exhibit::select(const Ray &ray) const
55 if(get_aabox().intersect(ray, &hit)) {
56 sel.ex = (Exhibit*)this;
59 sel.validmask = EXSEL_RAY;
64 ExSelection Exhibit::select(const Sphere &sph) const
66 return ExSelection(0); // TODO
69 void Exhibit::update(float dt)
73 void Exhibit::pre_draw() const
76 glMatrixMode(GL_MODELVIEW);
78 glMultMatrixf(node->get_matrix()[0]);
82 void Exhibit::draw() const
86 void Exhibit::post_draw() const
89 glMatrixMode(GL_MODELVIEW);
92 if(exsel_hover.ex == this) {
93 const AABox &bvol = get_aabox();
94 draw_geom_object(&bvol);
100 const AABox &Exhibit::get_aabox() const
102 aabb = node->get_bounds();