raytracer
Parallel Ray Tracer written from scratch (no graphics API).
Loading...
Searching...
No Matches
cubemap.h
Go to the documentation of this file.
1#pragma once
2#include <cstdint>
3#include <cstddef>
4#include "common/image.h"
5
7{
8enum class TextureExtension : uint8_t
9{
13};
14
24void draw_face(int i, int j, int pos, const std::vector<std::byte> &buffer, common::Image *img);
25
30{
31 common::Image top, left, front, right, back, bottom;
32
33 public:
45 Cubemap(const std::string &path, int face_width, int face_height, int color_channels, bool is_grayscale);
46
58 common::Image _bottom);
59
66 [[nodiscard]] common::Vec3 get_color_at_point(const common::Vec3 &normal) const;
67};
68} // namespace raytracer::raytracer
Definition image.h:11
common::Vec3 get_color_at_point(const common::Vec3 &normal) const
Definition cubemap.cpp:141
Cubemap(const std::string &path, int face_width, int face_height, int color_channels, bool is_grayscale)
Definition cubemap.cpp:21
Definition raytracer.cpp:29
TextureExtension
Definition cubemap.h:9
@ REPEAT
Definition cubemap.h:10
@ CONSTANT
Definition cubemap.h:12
@ CLAMP
Definition cubemap.h:11
void draw_face(int i, int j, int pos, const std::vector< std::byte > &buffer, common::Image *img)
Definition cubemap.cpp:10
Definition vec3.h:11