#ifndef _SCENE_H #define _SCENE_H #include #include #include "shape.h" #include "vec.h" #define MAX_DIST 2e9 #define EPS 1 #define MAX_DEPTH 3 class Scene { public: typedef std::vector ObjVec; typedef std::vector LightVec; Scene(std::string fn); // constructor goes *first* :p Shape* getObj( Ray& r ); void addObj( Shape* s ) { objs.push_back(s); } void addLight( Sphere* s ) { lights.push_back(s); } void setEyePos(Vec3D e) { eye = e; } void setGazeVec(Vec3D g) { gaze = g; } void setUpVec(Vec3D u) { up = u; } Vec3D transform(const Vec3D & p); int rayTrace(double i, double j); Vec3D rayTrace(Ray& r, int d); private: ObjVec objs; LightVec lights; Vec3D eye, gaze, up; // defines the eye orientation }; #endif