goat3d
view src/goat3d_impl.h @ 15:f1b4c27382ce
blah
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 26 Sep 2013 14:06:14 +0300 |
parents | 188c697b3b49 |
children | b35427826b60 |
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 extern int goat_log_level;
15 class Scene {
16 private:
17 std::string name;
18 Vector3 ambient;
20 std::vector<Material*> materials;
21 std::vector<Mesh*> meshes;
22 std::vector<Light*> lights;
23 std::vector<Camera*> cameras;
24 std::vector<Node*> nodes;
26 public:
27 Scene();
28 ~Scene();
30 void clear();
32 void set_name(const char *name);
33 const char *get_name() const;
35 void set_ambient(const Vector3 &amb);
36 const Vector3 &get_ambient() const;
38 void add_material(Material *mat);
39 Material *get_material(int idx) const;
40 Material *get_material(const char *name) const;
41 int get_material_count() const;
43 void add_mesh(Mesh *mesh);
44 Mesh *get_mesh(int idx) const;
45 Mesh *get_mesh(const char *name) const;
46 int get_mesh_count() const;
48 void add_light(Light *light);
49 Light *get_light(int idx) const;
50 Light *get_light(const char *name) const;
51 int get_light_count() const;
53 void add_camera(Camera *cam);
54 Camera *get_camera(int idx) const;
55 Camera *get_camera(const char *name) const;
56 int get_camera_count() const;
58 void add_node(Node *node);
59 Node *get_node(int idx) const;
60 Node *get_node(const char *name) const;
61 int get_node_count() const;
63 bool load(goat3d_io *io);
64 bool save(goat3d_io *io) const;
66 bool loadxml(goat3d_io *io);
67 bool savexml(goat3d_io *io) const;
68 };
70 void io_fprintf(goat3d_io *io, const char *fmt, ...);
71 void io_vfprintf(goat3d_io *io, const char *fmt, va_list ap);
73 #endif // GOAT3D_IMPL_H_