raytracer
Parallel Ray Tracer written from scratch (no graphics API).
Loading...
Searching...
No Matches
raytracer::raytracer Namespace Reference

Classes

struct  Pixel
class  Camera
class  CameraBuilder
class  Cubemap
class  Dielectric
class  Lambertian
class  LambertianTexture
class  Material
class  Metal
class  Renderer
struct  RayTracerSceneConfig
class  Floor
class  Object
class  Sphere

Typedefs

using json = nlohmann::json

Enumerations

enum class  ViewType : uint8_t { ORTHOGRAPHIC , PERSPECTIVE }
enum class  TextureExtension : uint8_t { REPEAT , CLAMP , CONSTANT }
enum class  MaterialType : uint8_t { DIELECTRIC , LAMBERTIAN , LAMBERTIAN_TEXTURE , METAL }
enum class  ObjectType : uint8_t { FLOOR , SPHERE }

Functions

 NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE (RayTracerSceneConfig, background_color, sky_color, camera, objects, is_shading_thresholded, thresholded_shading_degrees, is_grayscale, output_path) int main()
 NLOHMANN_JSON_SERIALIZE_ENUM (ViewType, {{ViewType::ORTHOGRAPHIC, "orthographic"}, {ViewType::PERSPECTIVE, "perspective"}}) struct Ray
void draw_face (int i, int j, int pos, const std::vector< std::byte > &buffer, common::Image *img)

Variables

constexpr auto STDOUT_REFRESH_INTERVAL = 100ms
constexpr auto MIN_INTERSECTION_DISTANCE = 0.001

Typedef Documentation

◆ json

using raytracer::raytracer::json = nlohmann::json

Enumeration Type Documentation

◆ MaterialType

enum class raytracer::raytracer::MaterialType : uint8_t
strong
Enumerator
DIELECTRIC 
LAMBERTIAN 
LAMBERTIAN_TEXTURE 
METAL 

◆ ObjectType

enum class raytracer::raytracer::ObjectType : uint8_t
strong
Enumerator
FLOOR 
SPHERE 

◆ TextureExtension

enum class raytracer::raytracer::TextureExtension : uint8_t
strong
Enumerator
REPEAT 
CLAMP 
CONSTANT 

◆ ViewType

enum class raytracer::raytracer::ViewType : uint8_t
strong
Enumerator
ORTHOGRAPHIC 
PERSPECTIVE 

Function Documentation

◆ draw_face()

void raytracer::raytracer::draw_face ( int i,
int j,
int pos,
const std::vector< std::byte > & buffer,
common::Image * img )

Reads a BGR pixel from a bitmap buffer and draws it to the given position of a cubemap face.

Parameters
iThe row of the face, starting from the top.
jThe column of the face, starting from the left.
posThe byte offset of the pixel in the buffer.
bufferThe raw bytes of the bitmap file.
imgThe face to draw to.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE()

raytracer::raytracer::NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE ( RayTracerSceneConfig ,
background_color ,
sky_color ,
camera ,
objects ,
is_shading_thresholded ,
thresholded_shading_degrees ,
is_grayscale ,
output_path  )
Here is the call graph for this function:

◆ NLOHMANN_JSON_SERIALIZE_ENUM()

raytracer::raytracer::NLOHMANN_JSON_SERIALIZE_ENUM ( ViewType ,
{{ViewType::ORTHOGRAPHIC, "orthographic"}, {ViewType::PERSPECTIVE, "perspective"}}  )

Variable Documentation

◆ MIN_INTERSECTION_DISTANCE

auto raytracer::raytracer::MIN_INTERSECTION_DISTANCE = 0.001
constexpr

◆ STDOUT_REFRESH_INTERVAL

auto raytracer::raytracer::STDOUT_REFRESH_INTERVAL = 100ms
constexpr