#pragma once #include "prism/scene.hpp" #include #include namespace prism { // A value owns the complete RGB image. A span is only a temporary borrowed view. struct Image { std::uint32_t width{}, height{}; std::vector rgb; [[nodiscard]] std::span pixels() const & noexcept { return rgb; } std::span pixels() const && = delete; }; [[nodiscard]] std::expected render(const Scene& scene); [[nodiscard]] std::expected write_ppm(const std::filesystem::path& path, const Image& image); } // namespace prism