madmann91 / bvh

A modern C++ BVH construction and traversal library
MIT License
844 stars 81 forks source link

Python bindings available? #86

Closed drlukeparry closed 1 week ago

drlukeparry commented 2 weeks ago

Dear Arsène,

I would like to kindly ask if you are aware of any existing Python bindings for your BVH header library?

I didn't want to reinvent the wheel, but wanted to generate BVH for another project using pybind11 library. This appears to be a neat package, as the intel embrue library is very heavy and problematic for use across many 3D Printing / Additive Manufacturing Projects.

Thank you for your kind contribution in advance, Luke

madmann91 commented 2 weeks ago

Hello! There's no such thing to my knowledge. I suppose I could look into writing simple C bindings for this, and from there it should be easy to call into it via multiple languages. I'll see if I have the time to do this this weekend. Otherwise any help is welcome!

madmann91 commented 1 week ago

I have started a branch for C bindings. You can check the progress here: https://github.com/madmann91/bvh/pull/87

madmann91 commented 1 week ago

A small set of C bindings to the high-level API have now been merged into master. There is also a small example that shows how to use them to render a simple scene. I will close this question, as I don't quite think that this repository would be the right place to add python bindings, but hopefully the presence of C bindings should make it way easier to expose to other languages, including python.