Struct BVHNode

Struct Documentation

struct BVHNode

Node in a per-surface bounding volume hierarchy (BVH).

Leaves reference a compact range into the surface’s primitive list.

Public Functions

inline bool is_leaf() const

Public Members

AABB box

Bounding box of this node (world coordinates)

int left = {-1}

Left child index (or -1 for leaf)

int right = {-1}

Right child index (or -1 for leaf)

int start = {0}

Start index in primitive array (leaf only)

int count = {0}

Number of primitives in leaf (0 for inner nodes)