File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -14,10 +14,18 @@ namespace geometry {
14
14
void BindTriangleAabbHierarchy (pybind11::module & m)
15
15
{
16
16
namespace pyb = pybind11;
17
- pbat::common::ForValues<2 , 3 >([&]<auto Dims>() {
18
- auto constexpr kDims = Dims;
19
- std::string const className = " TriangleAabbHierarchy" + std::to_string (kDims ) + " D" ;
20
- using BvhType = pbat::geometry::TriangleAabbHierarchy<kDims >;
17
+ pbat::common::ForTypes<
18
+ pbat::geometry::TriangleAabbHierarchy2D,
19
+ pbat::geometry::TriangleAabbHierarchy3D>([&]<class BvhType >() {
20
+ auto constexpr kDims = BvhType::kDims ;
21
+ std::string const className = []() {
22
+ if constexpr (kDims == 2 )
23
+ return " TriangleAabbHierarchy2D" ;
24
+ else if constexpr (kDims == 3 )
25
+ return " TriangleAabbHierarchy3D" ;
26
+ else
27
+ static_assert (kDims == 2 || kDims == 3 , " Only 2D and 3D BVHs are supported." );
28
+ }();
21
29
pyb::class_<BvhType>(m, className.data ())
22
30
.def (
23
31
pyb::init (
You can’t perform that action at this time.
0 commit comments