eqemu
diff src/scene.h @ 3:f9274bebe55e
adding 3d graphics stuff
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 17 Jul 2014 02:35:19 +0300 |
parents | |
children | 3d3656360a82 |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/scene.h Thu Jul 17 02:35:19 2014 +0300 1.3 @@ -0,0 +1,34 @@ 1.4 +#ifndef SCENE_H_ 1.5 +#define SCENE_H_ 1.6 + 1.7 +#include <stdio.h> 1.8 +#include <vector> 1.9 +#include "mesh.h" 1.10 +#include "object.h" 1.11 + 1.12 +class Scene { 1.13 +private: 1.14 + std::vector<Object*> objects; 1.15 + std::vector<Mesh*> meshes; 1.16 + 1.17 + bool load_obj(FILE *fp); // defined in objfile.cc 1.18 + 1.19 +public: 1.20 + ~Scene(); 1.21 + 1.22 + bool load(const char *fname); 1.23 + 1.24 + void add_object(Object *obj); 1.25 + void add_mesh(Mesh *mesh); 1.26 + 1.27 + int get_num_objects() const; 1.28 + int get_num_meshes() const; 1.29 + 1.30 + Object *get_object(int idx) const; 1.31 + Mesh *get_mesh(int idx) const; 1.32 + 1.33 + void update(long msec); 1.34 + void render() const; 1.35 +}; 1.36 + 1.37 +#endif // SCENE_H_