|
raytracer
Parallel Ray Tracer written from scratch (no graphics API).
|
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 |
| using raytracer::raytracer::json = nlohmann::json |
|
strong |
|
strong |
|
strong |
|
strong |
| 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.
| i | The row of the face, starting from the top. |
| j | The column of the face, starting from the left. |
| pos | The byte offset of the pixel in the buffer. |
| buffer | The raw bytes of the bitmap file. |
| img | The face to draw to. |


| raytracer::raytracer::NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE | ( | RayTracerSceneConfig | , |
| background_color | , | ||
| sky_color | , | ||
| camera | , | ||
| objects | , | ||
| is_shading_thresholded | , | ||
| thresholded_shading_degrees | , | ||
| is_grayscale | , | ||
| output_path | ) |

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