goat3d

diff 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 diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/goat3d_impl.h	Sat Aug 17 16:10:26 2013 +0300
     1.3 @@ -0,0 +1,61 @@
     1.4 +#ifndef GOAT3D_IMPL_H_
     1.5 +#define GOAT3D_IMPL_H_
     1.6 +
     1.7 +#include <string>
     1.8 +#include "goat3d.h"
     1.9 +#include "vmath.h"
    1.10 +#include "mesh.h"
    1.11 +#include "light.h"
    1.12 +#include "camera.h"
    1.13 +#include "material.h"
    1.14 +#include "node.h"
    1.15 +
    1.16 +class Scene {
    1.17 +private:
    1.18 +	std::string name;
    1.19 +	Vector3 ambient;
    1.20 +
    1.21 +	std::vector<Material*> materials;
    1.22 +	std::vector<Mesh*> meshes;
    1.23 +	std::vector<Light*> lights;
    1.24 +	std::vector<Camera*> cameras;
    1.25 +	std::vector<Node*> nodes;
    1.26 +
    1.27 +public:
    1.28 +	Scene();
    1.29 +	~Scene();
    1.30 +
    1.31 +	void clear();
    1.32 +
    1.33 +	void set_name(const char *name);
    1.34 +	const char *get_name() const;
    1.35 +
    1.36 +	void set_ambient(const Vector3 &amb);
    1.37 +	const Vector3 &get_ambient() const;
    1.38 +
    1.39 +	void add_material(Material *mat);
    1.40 +	Material *get_material(int idx) const;
    1.41 +	Material *get_material(const char *name) const;
    1.42 +
    1.43 +	void add_mesh(Mesh *mesh);
    1.44 +	Mesh *get_mesh(int idx) const;
    1.45 +	Mesh *get_mesh(const char *name) const;
    1.46 +
    1.47 +	void add_light(Light *light);
    1.48 +	Light *get_light(int idx) const;
    1.49 +	Light *get_light(const char *name) const;
    1.50 +
    1.51 +	void add_camera(Camera *cam);
    1.52 +	Camera *get_camera(int idx) const;
    1.53 +	Camera *get_camera(const char *name) const;
    1.54 +
    1.55 +	void add_node(Node *node);
    1.56 +	Node *get_node(int idx) const;
    1.57 +	Node *get_node(const char *name) const;
    1.58 +
    1.59 +	bool load(goat3d_io *io);
    1.60 +	bool save(goat3d_io *io) const;
    1.61 +};
    1.62 +
    1.63 +
    1.64 +#endif	// GOAT3D_IMPL_H_