New way of handling lights and materials.
This commit is contained in:
@@ -21,12 +21,14 @@ public:
|
||||
float m_fov;
|
||||
float m_a_ratio;
|
||||
|
||||
Tracer();
|
||||
Tracer(): m_h(480), m_w(640), m_fov(90.0f), m_a_ratio(640.0f / 480.0f) { }
|
||||
|
||||
Tracer(int h, int w, float fov);
|
||||
Tracer(int h, int w, float fov): m_h(h), m_w(w), m_fov(fov) {
|
||||
m_a_ratio = static_cast<float>(w) / static_cast<float>(h);
|
||||
};
|
||||
|
||||
vec2 sample_pixel(int i, int j) const;
|
||||
vec3 trace_ray(Ray & r, vector<Figure *> & f, vector<Light *> & l, unsigned int rec_level) const;
|
||||
vec3 trace_ray(Ray & r, vector<Figure *> & v_figures, vector<Light *> & v_lights, unsigned int rec_level) const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user