goat3d

annotate src/goat3d_impl.h @ 9:04bb114fcf05

implementing Scene::save, lots to do still
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 23 Aug 2013 06:36:47 +0300
parents e46529a5d057
children 1f94a2107c64
rev   line source
nuclear@0 1 #ifndef GOAT3D_IMPL_H_
nuclear@0 2 #define GOAT3D_IMPL_H_
nuclear@0 3
nuclear@0 4 #include <string>
nuclear@1 5 #include <vmath/vmath.h>
nuclear@0 6 #include "goat3d.h"
nuclear@0 7 #include "mesh.h"
nuclear@0 8 #include "light.h"
nuclear@0 9 #include "camera.h"
nuclear@0 10 #include "material.h"
nuclear@0 11 #include "node.h"
nuclear@0 12
nuclear@0 13 class Scene {
nuclear@0 14 private:
nuclear@0 15 std::string name;
nuclear@0 16 Vector3 ambient;
nuclear@0 17
nuclear@0 18 std::vector<Material*> materials;
nuclear@0 19 std::vector<Mesh*> meshes;
nuclear@0 20 std::vector<Light*> lights;
nuclear@0 21 std::vector<Camera*> cameras;
nuclear@0 22 std::vector<Node*> nodes;
nuclear@0 23
nuclear@0 24 public:
nuclear@0 25 Scene();
nuclear@0 26 ~Scene();
nuclear@0 27
nuclear@0 28 void clear();
nuclear@0 29
nuclear@0 30 void set_name(const char *name);
nuclear@0 31 const char *get_name() const;
nuclear@0 32
nuclear@0 33 void set_ambient(const Vector3 &amb);
nuclear@0 34 const Vector3 &get_ambient() const;
nuclear@0 35
nuclear@0 36 void add_material(Material *mat);
nuclear@0 37 Material *get_material(int idx) const;
nuclear@0 38 Material *get_material(const char *name) const;
nuclear@9 39 int get_material_count() const;
nuclear@0 40
nuclear@0 41 void add_mesh(Mesh *mesh);
nuclear@0 42 Mesh *get_mesh(int idx) const;
nuclear@0 43 Mesh *get_mesh(const char *name) const;
nuclear@9 44 int get_mesh_count() const;
nuclear@0 45
nuclear@0 46 void add_light(Light *light);
nuclear@0 47 Light *get_light(int idx) const;
nuclear@0 48 Light *get_light(const char *name) const;
nuclear@9 49 int get_light_count() const;
nuclear@0 50
nuclear@0 51 void add_camera(Camera *cam);
nuclear@0 52 Camera *get_camera(int idx) const;
nuclear@0 53 Camera *get_camera(const char *name) const;
nuclear@9 54 int get_camera_count() const;
nuclear@0 55
nuclear@0 56 void add_node(Node *node);
nuclear@0 57 Node *get_node(int idx) const;
nuclear@0 58 Node *get_node(const char *name) const;
nuclear@9 59 int get_node_count() const;
nuclear@0 60
nuclear@0 61 bool load(goat3d_io *io);
nuclear@0 62 bool save(goat3d_io *io) const;
nuclear@0 63 };
nuclear@0 64
nuclear@0 65
nuclear@0 66 #endif // GOAT3D_IMPL_H_