eqemu

view src/scene.h @ 10:819c7ebb1bec

added libimago to avoid the external dependency
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 18 Jul 2014 05:07:40 +0300
parents 3d3656360a82
children 2656099aff12
line source
1 #ifndef SCENE_H_
2 #define SCENE_H_
4 #include <stdio.h>
5 #include <vector>
6 #include "mesh.h"
7 #include "object.h"
9 class Scene {
10 private:
11 std::vector<Object*> objects;
12 std::vector<Mesh*> meshes;
14 bool load_obj(FILE *fp); // defined in objfile.cc
16 public:
17 ~Scene();
19 bool load(const char *fname);
21 void add_object(Object *obj);
22 void add_mesh(Mesh *mesh);
24 int get_num_objects() const;
25 int get_num_meshes() const;
27 Object *get_object(int idx) const;
28 Mesh *get_mesh(int idx) const;
30 Object *get_object(const char *name) const;
31 bool remove_object(Object *obj);
33 void update(long msec);
34 void render() const;
35 };
37 #endif // SCENE_H_