BBHNode struct

A node of an axis-aligned bounding box hierarchy.

Base classes

class Surface
This is the abstract superclass for all surfaces.

Public functions

auto intersect(const Ray3f& ray, HitInfo& hit) const -> bool override
Ray-Surface intersection test.
auto bounds() const -> Box3f override
Return the surface's world-space AABB.

Public variables

Box3f bbox
The bounding box of this node.
shared_ptr<Surface> left_child
Pointer to left child.
shared_ptr<Surface> right_child
Pointer to right child.

Function documentation

bool BBHNode::intersect(const Ray3f& ray, HitInfo& hit) const override

Ray-Surface intersection test.

ray in A 3-dimensional ray data structure with minimum/maximum extent information
hit out A detailed intersection record, which will be filled by the intersection query
Returns True if an intersection was found

Intersect a ray against this surface and return detailed intersection information.