+
+Mesh *Scene::find_mesh(const char *name)
+{
+ for(size_t i=0; i<meshes.size(); i++) {
+ if(meshes[i]->name == name) {
+ return meshes[i];
+ }
+ }
+ fprintf(stderr, "Mesh %s not found.\n", name);
+ return 0;
+}
+
+Material *Scene::find_material(const char *name)
+{
+ for(size_t i=0; i<materials.size(); i++) {
+ if(materials[i]->name == name) {
+ return materials[i];
+ }
+ }
+ fprintf(stderr, "Material %s not found.\n", name);
+ return 0;
+}
+
+Texture *Scene::find_texture(const char *name)
+{
+ for(size_t i=0; i<textures.size(); i++) {
+ if(textures[i]->name == name) {
+ return textures[i];
+ }
+ }
+ return 0;
+}
\ No newline at end of file