3#include "PathTracer.hpp"
4#include "raycaster/RaycasterVisualisation.hpp"
5#include "scene/Scene.hpp"
6#include "renderers/Renderer.hpp"
7#include "resources/Texture.hpp"
8#include "input/ControllableCamera.hpp"
40 void castRay(
const glm::vec3 & position,
const glm::vec3 & direction);
Renderer coupled with a basic diffuse path tracer. The user can move the camera anywhere and trigger ...
Definition: BVHRenderer.hpp:17
~BVHRenderer() override
Definition: BVHRenderer.cpp:81
std::unique_ptr< RaycasterVisualisation > _visuHelper
Helper for raycaster internal data visualisation.
Definition: BVHRenderer.hpp:69
void castRay(const glm::vec3 &position, const glm::vec3 &direction)
Definition: BVHRenderer.cpp:91
Program * _bvhProgram
BVH visualisation program.
Definition: BVHRenderer.hpp:63
void setScene(const std::shared_ptr< Scene > &scene, const Raycaster &raycaster)
Definition: BVHRenderer.cpp:16
bool & showBVH()
Definition: BVHRenderer.hpp:48
int maxLevel()
Definition: BVHRenderer.cpp:117
Program * _objectProgram
Basic object program.
Definition: BVHRenderer.hpp:62
Mesh _rayVis
Mesh representing a ray and its intersected triangle.
Definition: BVHRenderer.hpp:66
glm::ivec2 _bvhRange
The subset of the BVH to display.
Definition: BVHRenderer.hpp:71
std::vector< Mesh > _bvhLevels
The BVH visualisation mesh.
Definition: BVHRenderer.hpp:64
void draw(const Camera &camera, Texture *dstColor, Texture *dstDepth, uint layer=0) override
Definition: BVHRenderer.cpp:29
std::vector< Mesh > _rayLevels
BVH nodes intersected with a ray.
Definition: BVHRenderer.hpp:65
void clearRay()
Definition: BVHRenderer.cpp:109
std::shared_ptr< Scene > _scene
The scene to render.
Definition: BVHRenderer.hpp:68
glm::ivec2 & range()
Definition: BVHRenderer.hpp:53
BVHRenderer()
Definition: BVHRenderer.cpp:8
bool _showBVH
Show the raytracer BVH.
Definition: BVHRenderer.hpp:72
This class represents a camera as used in real-time rendering APIs. It provides a view and projection...
Definition: Camera.hpp:11
Represents a geometric mesh composed of vertices, other attributes and triangles.
Definition: Mesh.hpp:15
Represents a group of shaders used for rendering.
Definition: Program.hpp:31
Allows to cast rays against a polygonal mesh, on the CPU. Relies on an internal acceleration structur...
Definition: Raycaster.hpp:10
Base structure of a renderer.
Definition: Renderer.hpp:10
Represents a texture containing one or more images, stored on the CPU and/or GPU.
Definition: Texture.hpp:12