Main Page | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

scene.hh

Go to the documentation of this file.
00001 
00006 #include <vector>
00007 #include "geometry.hh"
00008 
00009 #ifndef SCENE_HH
00010 #define SCENE_HH
00011 
00012 class Scene {
00013   public:
00014     Scene() : useHalfway(true), maxDepth(5) {}
00015 
00017     ~Scene();
00018 
00023     void add (Object<3> *o) { objects.push_back(o); }
00024 
00029     void add (Light *l) { lights.push_back(l); }
00030 
00036     Color raytracePixel (double x, double y);
00037 
00038     void setGlobalAmbient (const Color &newambient)
00039       { globalAmbient = newambient; }
00040 
00041   private:
00049     Color raytrace (const Ray<3> &r, unsigned int depth);
00050 
00056     bool useHalfway;
00057 
00059     unsigned int maxDepth;
00060 
00065     Color globalAmbient;
00066 
00073     double globalAttenuation[3];
00074 
00075     std::vector<Object<3>*> objects;
00076     std::vector<Light*> lights;
00077 };
00078 
00079 #endif 

Generated on Fri Feb 4 10:40:56 2005 for tracer by doxygen 1.3.5