Path Tracing
Loading...
Searching...
No Matches
BVHNode Struct Reference

A single node of the BVH, structured following the std430. More...

#include <bvh.hpp>

Public Attributes

vec3 aabb_min
float _pad0
vec3 aabb_max
float _pad1
int left_child
int right_child
int first_tri
int tri_count

Detailed Description

A single node of the BVH, structured following the std430.

Internal nodes reference their children through left_child and right_child. Leaf nodes instead describe a run of triangles via first_try and tri_count. The _pad paddings keep the vec3 bounds aligned to 16 bytes layout.

See also
buildBVH, uploadBVH

Member Data Documentation

◆ _pad0

float BVHNode::_pad0

◆ _pad1

float BVHNode::_pad1

◆ aabb_max

vec3 BVHNode::aabb_max

◆ aabb_min

vec3 BVHNode::aabb_min

◆ first_tri

int BVHNode::first_tri

◆ left_child

int BVHNode::left_child

◆ right_child

int BVHNode::right_child

◆ tri_count

int BVHNode::tri_count

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