eqemu

annotate 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
rev   line source
nuclear@3 1 #ifndef SCENE_H_
nuclear@3 2 #define SCENE_H_
nuclear@3 3
nuclear@3 4 #include <stdio.h>
nuclear@3 5 #include <vector>
nuclear@3 6 #include "mesh.h"
nuclear@3 7 #include "object.h"
nuclear@3 8
nuclear@3 9 class Scene {
nuclear@3 10 private:
nuclear@3 11 std::vector<Object*> objects;
nuclear@3 12 std::vector<Mesh*> meshes;
nuclear@3 13
nuclear@3 14 bool load_obj(FILE *fp); // defined in objfile.cc
nuclear@3 15
nuclear@3 16 public:
nuclear@3 17 ~Scene();
nuclear@3 18
nuclear@3 19 bool load(const char *fname);
nuclear@3 20
nuclear@3 21 void add_object(Object *obj);
nuclear@3 22 void add_mesh(Mesh *mesh);
nuclear@3 23
nuclear@3 24 int get_num_objects() const;
nuclear@3 25 int get_num_meshes() const;
nuclear@3 26
nuclear@3 27 Object *get_object(int idx) const;
nuclear@3 28 Mesh *get_mesh(int idx) const;
nuclear@3 29
nuclear@4 30 Object *get_object(const char *name) const;
nuclear@6 31 bool remove_object(Object *obj);
nuclear@4 32
nuclear@3 33 void update(long msec);
nuclear@3 34 void render() const;
nuclear@3 35 };
nuclear@3 36
nuclear@3 37 #endif // SCENE_H_