goat3d

view src/goat3d_impl.h @ 0:2918358f5e6d

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 17 Aug 2013 16:10:26 +0300
parents
children e46529a5d057
line source
1 #ifndef GOAT3D_IMPL_H_
2 #define GOAT3D_IMPL_H_
4 #include <string>
5 #include "goat3d.h"
6 #include "vmath.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;
40 void add_mesh(Mesh *mesh);
41 Mesh *get_mesh(int idx) const;
42 Mesh *get_mesh(const char *name) const;
44 void add_light(Light *light);
45 Light *get_light(int idx) const;
46 Light *get_light(const char *name) const;
48 void add_camera(Camera *cam);
49 Camera *get_camera(int idx) const;
50 Camera *get_camera(const char *name) const;
52 void add_node(Node *node);
53 Node *get_node(int idx) const;
54 Node *get_node(const char *name) const;
56 bool load(goat3d_io *io);
57 bool save(goat3d_io *io) const;
58 };
61 #endif // GOAT3D_IMPL_H_