bindings.cpp 462 Bytes
Newer Older
ashawkey's avatar
ashawkey committed
1
// #include <pybind11/pybind11.h>
ashawkey's avatar
init  
ashawkey committed
2
3
#include <torch/extension.h>

4
5
6
#include <pybind11/numpy.h>
#include <pybind11/eigen.h>

ashawkey's avatar
init  
ashawkey committed
7
8
9
10
11
12
13
14
15
16
#include <cubvh/api.h>


namespace py = pybind11;
using namespace cubvh;

PYBIND11_MODULE(TORCH_EXTENSION_NAME, m) {

py::class_<cuBVH>(m, "cuBVH")
    .def("ray_trace", &cuBVH::ray_trace)
ashawkey's avatar
ashawkey committed
17
18
    .def("unsigned_distance", &cuBVH::unsigned_distance)
    .def("signed_distance", &cuBVH::signed_distance);
ashawkey's avatar
init  
ashawkey committed
19
20
21
22

m.def("create_cuBVH", &create_cuBVH);

}