goat3d
view 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 |
line source
1 #ifndef GOAT3D_IMPL_H_
2 #define GOAT3D_IMPL_H_
4 #include <string>
5 #include <vmath/vmath.h>
6 #include "goat3d.h"
7 #include "mesh.h"
8 #include "light.h"
9 #include "camera.h"
10 #include "material.h"
11 #include "node.h"
13 class Scene {
14 private:
15 std::string name;
16 Vector3 ambient;
18 std::vector<Material*> materials;
19 std::vector<Mesh*> meshes;
20 std::vector<Light*> lights;
21 std::vector<Camera*> cameras;
22 std::vector<Node*> nodes;
24 public:
25 Scene();
26 ~Scene();
28 void clear();
30 void set_name(const char *name);
31 const char *get_name() const;
33 void set_ambient(const Vector3 &amb);
34 const Vector3 &get_ambient() const;
36 void add_material(Material *mat);
37 Material *get_material(int idx) const;
38 Material *get_material(const char *name) const;
39 int get_material_count() const;
41 void add_mesh(Mesh *mesh);
42 Mesh *get_mesh(int idx) const;
43 Mesh *get_mesh(const char *name) const;
44 int get_mesh_count() const;
46 void add_light(Light *light);
47 Light *get_light(int idx) const;
48 Light *get_light(const char *name) const;
49 int get_light_count() const;
51 void add_camera(Camera *cam);
52 Camera *get_camera(int idx) const;
53 Camera *get_camera(const char *name) const;
54 int get_camera_count() const;
56 void add_node(Node *node);
57 Node *get_node(int idx) const;
58 Node *get_node(const char *name) const;
59 int get_node_count() const;
61 bool load(goat3d_io *io);
62 bool save(goat3d_io *io) const;
63 };
66 #endif // GOAT3D_IMPL_H_