goat3d
annotate 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 |
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@0 | 5 #include "goat3d.h" |
nuclear@0 | 6 #include "vmath.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@0 | 39 |
nuclear@0 | 40 void add_mesh(Mesh *mesh); |
nuclear@0 | 41 Mesh *get_mesh(int idx) const; |
nuclear@0 | 42 Mesh *get_mesh(const char *name) const; |
nuclear@0 | 43 |
nuclear@0 | 44 void add_light(Light *light); |
nuclear@0 | 45 Light *get_light(int idx) const; |
nuclear@0 | 46 Light *get_light(const char *name) const; |
nuclear@0 | 47 |
nuclear@0 | 48 void add_camera(Camera *cam); |
nuclear@0 | 49 Camera *get_camera(int idx) const; |
nuclear@0 | 50 Camera *get_camera(const char *name) const; |
nuclear@0 | 51 |
nuclear@0 | 52 void add_node(Node *node); |
nuclear@0 | 53 Node *get_node(int idx) const; |
nuclear@0 | 54 Node *get_node(const char *name) const; |
nuclear@0 | 55 |
nuclear@0 | 56 bool load(goat3d_io *io); |
nuclear@0 | 57 bool save(goat3d_io *io) const; |
nuclear@0 | 58 }; |
nuclear@0 | 59 |
nuclear@0 | 60 |
nuclear@0 | 61 #endif // GOAT3D_IMPL_H_ |