Euphoria
raytracer.cc File Reference
#include "core/raytracer.h"
#include "core/image.h"
#include "core/intersection.h"
#include "core/sphere.h"
#include "base/random.h"
#include "base/polarcoord.h"
#include "base/numeric.h"
#include "base/angle.h"
#include <limits>
#include <cmath>

Go to the source code of this file.

Classes

struct  eu::core::raytracer::SphereObject
 
struct  eu::core::raytracer::DiffuseMaterial
 
struct  eu::core::raytracer::MetalMaterial
 
struct  eu::core::raytracer::DielectricMaterial
 
struct  eu::core::raytracer::Camera
 

Namespaces

 eu
 
 eu::core
 
 eu::core::raytracer
 

Functions

std::shared_ptr< Object > eu::core::raytracer::create_sphere (const Sphere &sphere, const vec3f &position, std::shared_ptr< raytracer::Material > material)
 
Rgb eu::core::raytracer::to_rgb (const unit3f &normal)
 
vec3f eu::core::raytracer::get_random_vec3_in_unit_sphere (Random *random)
 
vec3f eu::core::raytracer::get_reflected (const vec3f &v, const unit3f &normal)
 
std::optional< vec3f > eu::core::raytracer::get_refracted (const unit3f &uv, const unit3f &normal, float ni)
 
float eu::core::raytracer::calc_fresnel_factor (float cosine, float ref_idx)
 
std::shared_ptr< Material > eu::core::raytracer::create_diffuse_material (const Rgb &albedo)
 
std::shared_ptr< Material > eu::core::raytracer::create_metal_material (const Rgb &albedo, float fuzz)
 
std::shared_ptr< Material > eu::core::raytracer::create_dielectric_material (const Rgb &albedo, float refractive_index)
 
Rgb eu::core::raytracer::get_color (const Scene &scene, const UnitRay3f &ray, Random *random, int depth)
 
Rgb eu::core::raytracer::correct_color_using_gamma2 (const Rgb &color)
 
void eu::core::raytracer::raytrace (Image *aimage, const raytracer::Scene &scene, int number_of_samples)