Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
KdtreeIntersector.h
Go to the documentation of this file.
1#pragma once
2
6
7#include <vector>
8
9namespace ph
10{
11
13{
14public:
16
17 void update(TSpanView<const Intersectable*> intersectables) override;
18 bool isIntersecting(const Ray& ray, HitProbe& probe) const override;
19 math::AABB3D calcAABB() const override;
20
21private:
22 std::vector<const Intersectable*> m_nodeIntersectableBuffer;
23 KdtreeNode m_rootKdtreeNode;
24};
25
26}// end namespace ph
Lightweight ray intersection testing and reporting object. If an intersection is found,...
Definition HitProbe.h:27
Definition Intersector.h:14
Definition KdtreeIntersector.h:13
void update(TSpanView< const Intersectable * > intersectables) override
Definition KdtreeIntersector.cpp:16
math::AABB3D calcAABB() const override
Calculates Axis-Aligned Bounding Box (AABB) of itself.
Definition KdtreeIntersector.cpp:32
KdtreeIntersector()
Definition KdtreeIntersector.cpp:12
bool isIntersecting(const Ray &ray, HitProbe &probe) const override
Determine whether a given ray hits the object.
Definition KdtreeIntersector.cpp:27
Definition KdtreeNode.h:17
Represents a ray in space.
Definition Ray.h:21
The root for all renderer implementations.
Definition EEngineProject.h:6
std::span< const T, EXTENT > TSpanView
Same as TSpan, except that the objects are const-qualified. Note that for pointer types,...
Definition TSpan.h:19