#include <Magick++.h>#include <cstdlib>#include <ctime>#include <dlfcn.h>#include <getopt.h>#include <glob.h>#include <iostream>#include <ncurses.h>#include <unistd.h>#include <signal.h>#include <string>#include "raytrace_defs.h"#include "renderable.h"#include "ray.h"#include "scene.h"#include "color.h"Include dependency graph for raytrace.cpp:

Go to the source code of this file.
Functions | |
| void | load_plugins () |
| Load plugins. | |
| int | main (int argc, char **argv) |
| void | print_stats (string fname, int elapsed, long primary_rays, long traced_rays) |
| Print statistics about the render. | |
| void | register_signal_handlers () |
| void | trace_ray (ColorRGB &pixel, const Ray &ray, int depth) |
| unsigned long | trace_rays (Image &img, Point3D eye) |
Variables | |
| raytrace_info | rt_info |
Definition in file raytrace.cpp.
| void load_plugins | ( | ) |
Load plugins.
Definition at line 256 of file raytrace.cpp.
References exit_mbrt(), log_crit, and log_info.
Referenced by main().
Here is the call graph for this function:

Here is the caller graph for this function:

| int main | ( | int | argc, | |
| char ** | argv | |||
| ) |
Definition at line 292 of file raytrace.cpp.
References Scene::get_camera(), Scene::get_geometry(), Scene::get_instance(), Scene::get_output_filename(), Scene::get_viewport_pixel_height(), Scene::get_viewport_pixel_width(), load_plugins(), log_info, print_stats(), register_signal_handlers(), and trace_rays().
Here is the call graph for this function:

| void print_stats | ( | string | fname, | |
| int | elapsed, | |||
| long | primary_rays, | |||
| long | traced_rays | |||
| ) |
Print statistics about the render.
Definition at line 231 of file raytrace.cpp.
References REPORT_FACTOR, rt_info, and raytrace_info::traced_rays.
Referenced by main().
Here is the caller graph for this function:

| void register_signal_handlers | ( | ) |
Register signal handlers to ensure ncurses is shut down properly when the process is terminated or crashes.
Definition at line 283 of file raytrace.cpp.
References exit_mbrt().
Referenced by main().
Here is the call graph for this function:

Here is the caller graph for this function:

| void trace_ray | ( | ColorRGB & | pixel, | |
| const Ray & | ray, | |||
| int | depth | |||
| ) |
Trace a ray from the coordinate of the eye, through every pixel in the image.
| pixel | The pixel in the image which will be calculated by tracing the ray. | |
| ray | The ray to be traced. | |
| depth | The current depth in the recursion of rays traced. |
Definition at line 173 of file raytrace.cpp.
References Ray::direction(), Scene::find_collision(), Renderable::get_color_contribution(), Scene::get_instance(), Scene::get_max_recurse_depth(), Renderable::get_opacity(), Renderable::get_reflection(), Scene::get_viewport_pixel_height(), Scene::get_viewport_pixel_width(), INF, OPAQUE, Ray::origin(), raytrace_info::primary_rays, raytrace_info::rendered_pixels, REPORT_FACTOR, rt_info, raytrace_info::start_time, and raytrace_info::traced_rays.
Referenced by trace_rays().
Here is the call graph for this function:

Here is the caller graph for this function:

| unsigned long trace_rays | ( | Image & | img, | |
| Point3D | eye | |||
| ) |
Trace a ray for each pixel in image.
| data | Image imformation that will be populated by tracing the rays. | |
| eye | The origin of all rays shot into the scene. |
Definition at line 42 of file raytrace.cpp.
References Scene::get_instance(), Scene::get_subpixel_sqrt(), Scene::get_viewport_pixel_height(), Scene::get_viewport_pixel_width(), jitter(), raytrace_info::rendered_pixels, rt_info, trace_ray(), raytrace_info::traced_rays, Point3D::x, Point3D::y, and Point3D::z.
Referenced by main().
Here is the call graph for this function:

Here is the caller graph for this function:

| struct raytrace_info rt_info |
Definition at line 33 of file raytrace.cpp.
Referenced by print_stats(), trace_ray(), and trace_rays().
1.5.2