ExhibitManager::~ExhibitManager()
{
+ clear();
+}
+
+void ExhibitManager::clear()
+{
int num = (int)items.size();
for(int i=0; i<num; i++) {
delete items[i];
const char *amatch = ts_get_attr_str(node, "match_node");
if(!amatch || !(snode = mscn->match_node(amatch))) {
- error_log("regexp \"%s\" didn't match any nodes\n", amatch ? amatch : "");
+ error_log("ExhibitManager::load: regexp \"%s\" didn't match any nodes\n",
+ amatch ? amatch : "");
continue;
}
return true;
}
+ExSelection ExhibitManager::select(const Ray &ray) const
+{
+ return ExSelection(); // TODO
+}
+
+ExSelection ExhibitManager::select(const Sphere &sph) const
+{
+ return ExSelection(); // TODO
+}
+
void ExhibitManager::update(float dt)
{
int num = items.size();
}
}
+void ExhibitManager::draw() const
+{
+ int num = items.size();
+ for(int i=0; i<num; i++) {
+ items[i]->pre_draw();
+ items[i]->draw();
+ items[i]->post_draw();
+ }
+}
+
static Exhibit *create_exhibit(const char *type)
{
if(strcmp(type, "static") == 0) {
+ debug_log("creating static exhibit\n");
return new Exhibit;
} else if(strcmp(type, "blobs") == 0) {
+ debug_log("creating blobs exhibit\n");
return new BlobExhibit;
}
error_log("unknown exhibit type: %s\n", type);