cpe::ray_tracer Class Reference

Helper class for running ray-tracing algorithm. More...

List of all members.

Static Public Member Functions

static void trace (const scene3d &scene, image *pic)
 run ray-tracing algorithm given a 3D scene and a picture

Static Private Member Functions

static color throw_ray (const scene3d &scene, const ray &ray_current)
 throw a ray in the scene along the given ray
static std::pair
< intersection_object, bool > 
find_inter (const ray &ray_current, const scene3d &scene)
 find the intersection between a given ray and the first object in the 3D scene
static color find_intersection_color (const std::pair< intersection_object, bool > &inter, const scene3d &scene)
 get the color at a given intersection position

Detailed Description

Helper class for running ray-tracing algorithm.


Member Function Documentation

std::pair< intersection_object, bool > cpe::ray_tracer::find_inter ( const ray ray_current,
const scene3d scene 
) [static, private]

find the intersection between a given ray and the first object in the 3D scene

References cpe::scene3d::get_material(), cpe::scene3d::get_object(), cpe::object3d::intersect(), and cpe::scene3d::N_object().

Referenced by throw_ray().

Here is the call graph for this function:

color cpe::ray_tracer::find_intersection_color ( const std::pair< intersection_object, bool > &  inter,
const scene3d scene 
) [static, private]

get the color at a given intersection position

Referenced by throw_ray().

color cpe::ray_tracer::throw_ray ( const scene3d scene,
const ray ray_current 
) [static, private]

throw a ray in the scene along the given ray

Returns:
the color associated to this ray

References find_inter(), and find_intersection_color().

Referenced by trace().

Here is the call graph for this function:

void cpe::ray_tracer::trace ( const scene3d scene,
image pic 
) [static]

run ray-tracing algorithm given a 3D scene and a picture

References cpe::ray::generate_ray_from_camera(), cpe::image::get_Nx(), cpe::image::get_Ny(), cpe::image::set_pixel(), and throw_ray().

Here is the call graph for this function:


The documentation for this class was generated from the following files:
Generated on Mon Apr 18 16:13:46 2011 by  doxygen 1.6.3