Photon Engine 2.0.0-beta
A physically based renderer.
Loading...
Searching...
No Matches
ph::TWideBvhIntersector< N, Index > Class Template Reference

Wide BVH acceleration structure supporting arbitrary branch factor. More...

#include <TWideBvhIntersector.h>

Inheritance diagram for ph::TWideBvhIntersector< N, Index >:
ph::Intersector ph::Intersectable

Public Member Functions

void update (TSpanView< const Intersectable * > intersectables) override
 
bool isIntersecting (const Ray &ray, HitProbe &probe) const override
 Determine whether a given ray hits the object.
 
math::AABB3D calcAABB () const override
 Calculates Axis-Aligned Bounding Box (AABB) of itself.
 
void rebuildWithIntersectables (TSpanView< const Intersectable * > intersectables)
 
- Public Member Functions inherited from ph::Intersector
bool reintersect (const Ray &ray, HitProbe &probe, const Ray &srcRay, HitProbe &srcProbe) const override
 Intersect the intersected object again with a different ray.
 
void calcHitDetail (const Ray &ray, HitProbe &probe, HitDetail *out_detail) const override
 Calculates properties of a hit, such as coordinates and normal.
 
- Public Member Functions inherited from ph::Intersectable
virtual ~Intersectable ()=default
 
virtual bool isOccluding (const Ray &ray) const
 Determines whether this object blocks the ray.
 
virtual bool mayOverlapVolume (const math::AABB3D &volume) const
 Conservatively checks whether this object overlaps a volume.
 

Detailed Description

template<std::size_t N, typename Index>
class ph::TWideBvhIntersector< N, Index >

Wide BVH acceleration structure supporting arbitrary branch factor.

Template Parameters
NBranch factor of the BVH.
IndexType for buffer offsets. Types that can store a larger integer supports more intersectables.

Member Function Documentation

◆ calcAABB()

template<std::size_t N, typename Index >
auto ph::TWideBvhIntersector< N, Index >::calcAABB ( ) const
inlineoverridevirtual

Calculates Axis-Aligned Bounding Box (AABB) of itself.

Implements ph::Intersector.

◆ isIntersecting()

template<std::size_t N, typename Index >
bool ph::TWideBvhIntersector< N, Index >::isIntersecting ( const Ray & ray,
HitProbe & probe ) const
inlineoverridevirtual

Determine whether a given ray hits the object.

Checks whether the specified ray intersects this intersectable. If there is an intersection, true is returned and a brief hit report is stored inside the probe. If there is no intersection, false is returned and the state of the probe is undefined. ray and probe can be used for obtaining hit detail if an intersection is found.

Note
Generates hit event (with ray and probe).

Implements ph::Intersector.

◆ rebuildWithIntersectables()

template<std::size_t N, typename Index >
void ph::TWideBvhIntersector< N, Index >::rebuildWithIntersectables ( TSpanView< const Intersectable * > intersectables)
inline

◆ update()

template<std::size_t N, typename Index >
void ph::TWideBvhIntersector< N, Index >::update ( TSpanView< const Intersectable * > intersectables)
inlineoverridevirtual

Implements ph::Intersector.


The documentation for this class was generated from the following files: