Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef RAY_TRACER_HPP
00021 #define RAY_TRACER_HPP
00022
00023 #include <vector>
00024
00025
00026 namespace cpe
00027 {
00028
00029 struct intersection_object;
00030 struct render_parameters;
00031 class image;
00032 class color;
00033 class ray;
00034 class scene3d;
00035 class v3;
00036
00037
00039 class ray_tracer
00040 {
00041 public:
00042
00043
00044
00045
00046
00047
00048
00050 static void trace(const scene3d& scene,const render_parameters& render_param,image* pic);
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00064 static color throw_ray(const scene3d& scene,const ray& ray_current,const render_parameters& render_param);
00065
00067 static intersection_object find_inter(const ray& ray_current,const scene3d& scene);
00068
00072 static std::vector<double> ray_to_light(const v3& current_position,const scene3d& scene);
00074 static color compute_color(const std::vector<double>& t_light,const intersection_object& inter,const scene3d& scene,const render_parameters& render_param);
00075
00077 static color find_intersection_color(const intersection_object& inter,const scene3d& scene,const render_parameters& render_param);
00078
00079
00080 };
00081
00082 }
00083
00084 #endif