# madmann91/bvh

A modern C++ BVH construction and traversal library

Repository: https://github.com/madmann91/bvh
Canonical: https://ross.abutalabs.com/products/bvh
Language: C++
License: MIT
License Family: permissive
Topics: header-only, bvh, construction-algorithms, traversal-algorithms, cpp20, raytracing, c11
Last push: 2026-05-09T12:59:40+00:00

## Health v2 (maintenance only)
Score: 69/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 81, release rhythm 35, longevity 100
- inputs: {"age_days": 2421, "days_push": 116, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1169, forks 117 (observed 2026-08-28T04:03:51.184295+00:00)

## What it is
A header-only C++20 library for constructing and traversing bounding volume hierarchies (BVH), with multiple SAH-based builders, a reinsertion optimizer, and robust ray intersection routines. It depends only on the standard library and includes an optional C API and serialization support.

## Use cases
- accelerate ray tracing in a path tracer
- build a BVH for triangle mesh intersection tests
- speed up ray-scene intersection queries in a renderer
- construct spatial acceleration structures for 2D/3D/4D data
- optimize an existing BVH with reinsertion
- compare BVH builders by quality and speed

## When to choose
- you need a lightweight, dependency-free BVH library in C++
- you want direct control over builder choice and BVH quality
- you need multithreaded high-quality BVH construction
- you want a header-only library easy to drop into a CMake project

## When to avoid
- you need a full-featured production ray tracing engine like Embree with SIMD kernels
- your project targets pre-C++20 compilers
- you need GPU-accelerated ray tracing

## Facets
- artifact type: library
- maturity: active
- function: graphics, simulation, math, serialization
- domain: graphics, computer-vision, performance
- platform: cpp, cross-platform, windows
- tags: bvh, ray-tracing, header-only, sah-builder, ray-intersection, cpp20, bounding-volume-hierarchy, algorithms, linux, macos

## Member repositories
- madmann91/bvh (main) score 69

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:51.184295+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:28:42.725746+00:00, confidence not recorded.
  - readme: https://github.com/madmann91/bvh (fetched 2026-08-28T04:03:51.184295+00:00, sha 41f7bce0d1b4)
- Data as of 2026-08-30T08:39:29.467469+00:00.
