Scene reader reads figures now.
This commit is contained in:
13
scene.hpp
13
scene.hpp
@@ -6,14 +6,18 @@
|
||||
#include <vector>
|
||||
#include <stdexcept>
|
||||
|
||||
#include <json_spirit_value.h>
|
||||
|
||||
#include "camera.hpp"
|
||||
#include "figure.hpp"
|
||||
#include "light.hpp"
|
||||
#include "material.hpp"
|
||||
#include "environment.hpp"
|
||||
|
||||
using std::string;
|
||||
using std::vector;
|
||||
using std::runtime_error;
|
||||
using json_spirit::Value;
|
||||
|
||||
class SceneError: public runtime_error {
|
||||
public:
|
||||
@@ -29,6 +33,15 @@ public:
|
||||
|
||||
Scene(const char * file_name, int h = 480, int w = 640, float fov = 90.0f) throw(SceneError);
|
||||
~Scene();
|
||||
|
||||
private:
|
||||
void read_vector(Value & val, vec3 & vec) throw(SceneError);
|
||||
void read_environment(Value & v) throw(SceneError);
|
||||
void read_camera(Value & v) throw(SceneError);
|
||||
Material * read_material(Value & v) throw(SceneError);
|
||||
Figure * read_sphere(Value &v) throw(SceneError);
|
||||
Figure * read_plane(Value &v) throw(SceneError);
|
||||
Figure * read_disk(Value &v) throw(SceneError);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user