goat3d

annotate 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
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@12 11 #include "node.h"
nuclear@0 12
nuclear@15 13 extern int goat_log_level;
nuclear@15 14
nuclear@0 15 class Scene {
nuclear@0 16 private:
nuclear@0 17 std::string name;
nuclear@0 18 Vector3 ambient;
nuclear@0 19
nuclear@0 20 std::vector<Material*> materials;
nuclear@0 21 std::vector<Mesh*> meshes;
nuclear@0 22 std::vector<Light*> lights;
nuclear@0 23 std::vector<Camera*> cameras;
nuclear@12 24 std::vector<Node*> nodes;
nuclear@0 25
nuclear@0 26 public:
nuclear@0 27 Scene();
nuclear@0 28 ~Scene();
nuclear@0 29
nuclear@0 30 void clear();
nuclear@0 31
nuclear@0 32 void set_name(const char *name);
nuclear@0 33 const char *get_name() const;
nuclear@0 34
nuclear@0 35 void set_ambient(const Vector3 &amb);
nuclear@0 36 const Vector3 &get_ambient() const;
nuclear@0 37
nuclear@0 38 void add_material(Material *mat);
nuclear@0 39 Material *get_material(int idx) const;
nuclear@0 40 Material *get_material(const char *name) const;
nuclear@9 41 int get_material_count() const;
nuclear@0 42
nuclear@0 43 void add_mesh(Mesh *mesh);
nuclear@0 44 Mesh *get_mesh(int idx) const;
nuclear@0 45 Mesh *get_mesh(const char *name) const;
nuclear@9 46 int get_mesh_count() const;
nuclear@0 47
nuclear@0 48 void add_light(Light *light);
nuclear@0 49 Light *get_light(int idx) const;
nuclear@0 50 Light *get_light(const char *name) const;
nuclear@9 51 int get_light_count() const;
nuclear@0 52
nuclear@0 53 void add_camera(Camera *cam);
nuclear@0 54 Camera *get_camera(int idx) const;
nuclear@0 55 Camera *get_camera(const char *name) const;
nuclear@9 56 int get_camera_count() const;
nuclear@0 57
nuclear@0 58 void add_node(Node *node);
nuclear@0 59 Node *get_node(int idx) const;
nuclear@0 60 Node *get_node(const char *name) const;
nuclear@9 61 int get_node_count() const;
nuclear@0 62
nuclear@0 63 bool load(goat3d_io *io);
nuclear@0 64 bool save(goat3d_io *io) const;
nuclear@14 65
nuclear@14 66 bool loadxml(goat3d_io *io);
nuclear@14 67 bool savexml(goat3d_io *io) const;
nuclear@0 68 };
nuclear@0 69
nuclear@14 70 void io_fprintf(goat3d_io *io, const char *fmt, ...);
nuclear@14 71 void io_vfprintf(goat3d_io *io, const char *fmt, va_list ap);
nuclear@0 72
nuclear@0 73 #endif // GOAT3D_IMPL_H_