Skip to main content

LBVH

An implementation of the LBVH algorithm for performing fast bounding-box intersections. NVIDIA has a great series of blog posts that describes, in detail, the algorithm for LBVH construction/traversal:

  1. https://developer.nvidia.com/blog/thinking-parallel-part-i-collision-detection-gpu/
  2. https://developer.nvidia.com/blog/thinking-parallel-part-ii-tree-traversal-gpu/
  3. https://developer.nvidia.com/blog/thinking-parallel-part-iii-tree-construction-gpu/

This repo's implementation is CPU-only for now, but it does include python and Mathematica bindings.

Python

Precompiled binaries are available for many versions of python on mac, linux and windows. To install python bindings for use with jax or numpy, do

pip3 install lbvh

The python bindings expect arrays of bounding boxes to be specified in one of the following formats:

# list of 2D bounding boxes, as arrays with shape (*, 4)
[[min_x, min_y, max_x, max_y], ... ]

# list of 2D bounding boxes, as arrays with shape (*, 2, 2)
[[[min_x, min_y], [max_x, max_y]], ... ]

# list of 3D bounding boxes, as arrays with shape (*, 6)
[[min_x, min_y, min_z, max_x, max_y, max_z], ... ]

# list of 3D bounding boxes, as arrays with shape (*, 2, 3)
[[[min_x, min_y, min_z], [max_x, max_y, max_z]], ... ]

See https://github.com/samuelpmish/LBVH/tree/main/python for some basic examples of bounding box queries.

C++

To build from source:

1. clone the repo

git clone git@github.com:samuelpmish/LBVH.git

2. configure CMake

cd LBVH
cmake . -Bbuild -DCMAKE_BUILD_TYPE=Release 

This project has a few (off by default) configure arguments that control which targets get built, including

  • LBVH_ENABLE_PYTHON_BINDINGS
  • LBVH_ENABLE_MATHEMATICA_BINDINGS
  • LBVH_ENABLE_TESTS

3. build

cmake --build build

To use LBVH in another CMake project, you can use FetchContent to automatically build it along with the parent CMake project

...

# fetch and build LBVH
include(FetchContent)
FetchContent_Declare(
  LBVH
  GIT_REPOSITORY https://github.com/samuelpmish/LBVH.git
  GIT_TAG main
)
set(LBVH_ENABLE_PYTHON_BINDINGS OFF CACHE INTERNAL "")
set(LBVH_ENABLE_MATHEMATICA_BINDINGS OFF CACHE INTERNAL "")
set(LBVH_ENABLE_TESTING OFF CACHE INTERNAL "")
FetchContent_MakeAvailable(LBVH)

...

# link it against any targets in the parent project
target_link_libraries(my_project PUBLIC LBVH)

Metadata

Release files for lbvh 0.0.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lbvh 0.0.13
File Size Uploaded
lbvh-0.0.13.tar.gz 45.6 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for lbvh 0.0.13
File
lbvh-0.0.13-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
lbvh-0.0.13-cp311-cp311-musllinux_1_1_x86_64.whl CPython 3.11 CPython 3.11 Linux musl 1.1+ x86-64 Details
lbvh-0.0.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
lbvh-0.0.13-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
lbvh-0.0.13-cp311-cp311-macosx_10_14_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.14+ x86-64 Details
lbvh-0.0.13-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
lbvh-0.0.13-cp310-cp310-musllinux_1_1_x86_64.whl CPython 3.10 CPython 3.10 Linux musl 1.1+ x86-64 Details
lbvh-0.0.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
lbvh-0.0.13-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
lbvh-0.0.13-cp310-cp310-macosx_10_14_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.14+ x86-64 Details
lbvh-0.0.13-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details
lbvh-0.0.13-cp39-cp39-musllinux_1_1_x86_64.whl CPython 3.9 CPython 3.9 Linux musl 1.1+ x86-64 Details
lbvh-0.0.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 CPython 3.9 Linux glibc 2.17+ x86-64 Details
lbvh-0.0.13-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details
lbvh-0.0.13-cp39-cp39-macosx_10_14_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.14+ x86-64 Details
lbvh-0.0.13-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details
lbvh-0.0.13-cp38-cp38-musllinux_1_1_x86_64.whl CPython 3.8 CPython 3.8 Linux musl 1.1+ x86-64 Details
lbvh-0.0.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.8 CPython 3.8 Linux glibc 2.17+ x86-64 Details
lbvh-0.0.13-cp38-cp38-macosx_11_0_arm64.whl CPython 3.8 CPython 3.8 macOS 11.0+ ARM64 Details
lbvh-0.0.13-cp38-cp38-macosx_10_14_x86_64.whl CPython 3.8 CPython 3.8 macOS 10.14+ x86-64 Details

Total release size: 2.4 MB

Release files / lbvh-0.0.13.tar.gz

Download URL lbvh-0.0.13.tar.gz
Size 45.6 kB
Tags Source
SHA-256 checksum
How to use checksums
41c8f8368e142f735ccfbecfe4d59ec94fd442cd75ad018222f2ebecfb034e6b
BLAKE2b-256 checksum
How to use checksums
e6d664a06bb4c40e92923d58b4e345346dd94847fb581efc5f7e5e0fdce3ca93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / lbvh-0.0.13-cp311-cp311-win_amd64.whl

Download URL lbvh-0.0.13-cp311-cp311-win_amd64.whl
Size 52.3 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
5385f28b2015e5e067e347044a8c77cf22e82e875d0b281c193cd78a3ed6ed7a
BLAKE2b-256 checksum
How to use checksums
011bec94b68910ec9520503f0e432189c4e43200009777ec1763db08ab56980a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / lbvh-0.0.13-cp311-cp311-musllinux_1_1_x86_64.whl

Download URL lbvh-0.0.13-cp311-cp311-musllinux_1_1_x86_64.whl
Size 380.5 kB
Tags CPython 3.11 Linux musl 1.1+ x86-64
SHA-256 checksum
How to use checksums
65eba15234f091e0e9852614ac903ec67daaae145b61045b07d7fc2845f488ac
BLAKE2b-256 checksum
How to use checksums
06d6e6ded2ecd20a806fc8a7e5d0ec76219798461b02fc6075bfb08a812995f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / lbvh-0.0.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL lbvh-0.0.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 68.8 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
09381192e946c12e87bf5316c0234d144f318a8506729686af387b380eb506b5
BLAKE2b-256 checksum
How to use checksums
c9f98aa4a0dfcc6ced6c1e79eb5a0a8f7bc35f31351df74b05b1db9341fc9927
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / lbvh-0.0.13-cp311-cp311-macosx_11_0_arm64.whl

Download URL lbvh-0.0.13-cp311-cp311-macosx_11_0_arm64.whl
Size 44.8 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
7f0aaa099a530e1d0ff7aa7ed3c7fab0e4c1e87250bc4d36e2e899bd5590bd48
BLAKE2b-256 checksum
How to use checksums
0711e1ece2535cd503e9833d78c404ec670d2b10f9c3950364f976d911e7d5f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / lbvh-0.0.13-cp311-cp311-macosx_10_14_x86_64.whl

Download URL lbvh-0.0.13-cp311-cp311-macosx_10_14_x86_64.whl
Size 47.8 kB
Tags CPython 3.11 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
c27b5652259a8dea44fd7301a9fc3124792aa8f216a477c5b87175f226d63c83
BLAKE2b-256 checksum
How to use checksums
dec06d8edef5d1b8d0f4abbab5c9478dede586fde2c1a81f49e28dd72eb0043a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / lbvh-0.0.13-cp310-cp310-win_amd64.whl

Download URL lbvh-0.0.13-cp310-cp310-win_amd64.whl
Size 52.4 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
e99853b19625f2b5f4f74f236c53b888cc6b49397027cf87e7e60e7b815b9615
BLAKE2b-256 checksum
How to use checksums
3733ed2fe91bc84af8322e2dce92ef972d4e28834c3e1a46913bf51f9e7d86ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / lbvh-0.0.13-cp310-cp310-musllinux_1_1_x86_64.whl

Download URL lbvh-0.0.13-cp310-cp310-musllinux_1_1_x86_64.whl
Size 380.6 kB
Tags CPython 3.10 Linux musl 1.1+ x86-64
SHA-256 checksum
How to use checksums
8c5626b47b7f36b53e6cc9d0fe223891bb5beb75abd7f2971c9284931dca8ad8
BLAKE2b-256 checksum
How to use checksums
26b755d5384e8348b0e0339de258b1fa6c02eb7dc0457f30b302b0f8e71f3062
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / lbvh-0.0.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL lbvh-0.0.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 69.0 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
2e82cb09caab67f8235efa4605c3943b2a5bedbe9f85f1f586d19716b2f0477f
BLAKE2b-256 checksum
How to use checksums
32e501059127ba83bfe35117f81cbc04a9e63d8fd3d6e4edc6c9985a8a865528
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / lbvh-0.0.13-cp310-cp310-macosx_11_0_arm64.whl

Download URL lbvh-0.0.13-cp310-cp310-macosx_11_0_arm64.whl
Size 44.9 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
900fde4b22edc76133da2496ef0275297e2f558584998ce62d2e64e04295f74f
BLAKE2b-256 checksum
How to use checksums
d2abbea5550def63479599941c97004fb24e1676dbdce3135f03e3784d566f2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / lbvh-0.0.13-cp310-cp310-macosx_10_14_x86_64.whl

Download URL lbvh-0.0.13-cp310-cp310-macosx_10_14_x86_64.whl
Size 47.9 kB
Tags CPython 3.10 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
5dba625ef0df74de462a67e44415f2f0ba54d3f838e0ad607e8b62ffc71ff6ee
BLAKE2b-256 checksum
How to use checksums
82eb0e5b3ba05b7b9cf31a1b5d4b3b2a39f456203289a544305e26534de6cf8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / lbvh-0.0.13-cp39-cp39-win_amd64.whl

Download URL lbvh-0.0.13-cp39-cp39-win_amd64.whl
Size 52.8 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
cbebaeb7867255146dcb6881408ff8c13850acae2718aadc0e0ab2296e18ec73
BLAKE2b-256 checksum
How to use checksums
5cf983e7c2db21ec17a2d014cbafd7a7e8a2d5c7a8e95f62a09201445333cb23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / lbvh-0.0.13-cp39-cp39-musllinux_1_1_x86_64.whl

Download URL lbvh-0.0.13-cp39-cp39-musllinux_1_1_x86_64.whl
Size 380.6 kB
Tags CPython 3.9 Linux musl 1.1+ x86-64
SHA-256 checksum
How to use checksums
4d2da393a7647025950acf6bd1b160faa6133219912e07aa7bfbc1e53fe42f4d
BLAKE2b-256 checksum
How to use checksums
5a1c44c41e29d8bb2986346c1ae8a170d2ea8ea71c9391a69c4d9bda1e081726
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / lbvh-0.0.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL lbvh-0.0.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 69.0 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
e5d47dd2003cbecf6ba9bed2b775edf07cf7c2b2c223a8009bb04d639d578412
BLAKE2b-256 checksum
How to use checksums
af7245f942edd224cd2fde297621fe226cc66ed3c9567e76d782023f945aab04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / lbvh-0.0.13-cp39-cp39-macosx_11_0_arm64.whl

Download URL lbvh-0.0.13-cp39-cp39-macosx_11_0_arm64.whl
Size 44.9 kB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
573fa0708d8ca91de8c9ce7d379d89145da45715dd60682add188a9670a3533e
BLAKE2b-256 checksum
How to use checksums
ab78b278c9db4b3445c7792da6c23aba34b5957ae9823fc559e0e2670c134900
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / lbvh-0.0.13-cp39-cp39-macosx_10_14_x86_64.whl

Download URL lbvh-0.0.13-cp39-cp39-macosx_10_14_x86_64.whl
Size 47.9 kB
Tags CPython 3.9 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
caa9266c76d8e1ccfe31f3c14721dd87780717cd57116ba4fec239fdebe6a32e
BLAKE2b-256 checksum
How to use checksums
8a95a50f75e1aedb275244123c4b141755ed6c4a5964be9b2ef21ce1079b2740
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / lbvh-0.0.13-cp38-cp38-win_amd64.whl

Download URL lbvh-0.0.13-cp38-cp38-win_amd64.whl
Size 52.7 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
93c4f67ff1fe7095a3c0a7ba2d03c16dddbb3cea93a08a8c69d2274bdfdbe2ea
BLAKE2b-256 checksum
How to use checksums
c632ff426e783e7082366da1f48343b02000daf28a531ce8fc52bcea0a1f2707
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / lbvh-0.0.13-cp38-cp38-musllinux_1_1_x86_64.whl

Download URL lbvh-0.0.13-cp38-cp38-musllinux_1_1_x86_64.whl
Size 380.5 kB
Tags CPython 3.8 Linux musl 1.1+ x86-64
SHA-256 checksum
How to use checksums
2bc9a8351b491de6c38aa8c9be004508426a17363627445450d33b3b8f5b48c7
BLAKE2b-256 checksum
How to use checksums
f2c4e8ff22aa2075be4d8f7085f6fa68eb0f43588219aa688d17a3f4129173d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / lbvh-0.0.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL lbvh-0.0.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 68.9 kB
Tags CPython 3.8 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
5915fccefd5710b11957a0d525c12c87beeab0a7b6b14ac95c4d058077cec332
BLAKE2b-256 checksum
How to use checksums
8f998e10c157f6ecdcea134dee94e1eb8a00f8dcea6b2bc280930f74c0d48b2d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / lbvh-0.0.13-cp38-cp38-macosx_11_0_arm64.whl

Download URL lbvh-0.0.13-cp38-cp38-macosx_11_0_arm64.whl
Size 44.8 kB
Tags CPython 3.8 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
91a1a5fcc39f59e8315fa90b9f4b93c55c5b5a38f88738a7eec43defe249c80e
BLAKE2b-256 checksum
How to use checksums
c7fca8a74946f766ac10f92e6e9253ad11758111f30e8a747bec3e4569467cb5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release files / lbvh-0.0.13-cp38-cp38-macosx_10_14_x86_64.whl

Download URL lbvh-0.0.13-cp38-cp38-macosx_10_14_x86_64.whl
Size 48.1 kB
Tags CPython 3.8 macOS 10.14+ x86-64
SHA-256 checksum
How to use checksums
b74c2ada8bb71e906ca943540b9ca3547406bf056fd735e8e60bc19e95c7f1bd
BLAKE2b-256 checksum
How to use checksums
0d50fe8444d74b37ff5ed3199428809987bcd05e7d6978c19a71dea459176a53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.7

Release history Release notifications | RSS feed

This release

0.0.13 This release

21 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page