11#include < common.hpp>
22
33#include < ipc/candidates/candidates.hpp>
4+ #include < ipc/broad_phase/broad_phase.hpp>
45
56namespace py = pybind11;
67using namespace ipc ;
@@ -13,25 +14,24 @@ void define_candidates(py::module_& m)
1314 " build" ,
1415 py::overload_cast<
1516 const CollisionMesh&, const Eigen::MatrixXd&, const double ,
16- const BroadPhaseMethod >(&Candidates::build),
17+ std::shared_ptr<BroadPhase> >(&Candidates::build),
1718 R"ipc_Qu8mg5v7(
1819 Initialize the set of discrete collision detection candidates.
1920
2021 Parameters:
2122 mesh: The surface of the collision mesh.
2223 vertices: Surface vertex positions (rowwise).
2324 inflation_radius: Amount to inflate the bounding boxes.
24- broad_phase_method : Broad phase method to use.
25+ broad_phase : Broad phase to use.
2526 )ipc_Qu8mg5v7" ,
2627 py::arg (" mesh" ), py::arg (" vertices" ),
27- py::arg (" inflation_radius" ) = 0 ,
28- py::arg (" broad_phase_method" ) = DEFAULT_BROAD_PHASE_METHOD)
28+ py::arg (" inflation_radius" ) = 0 , py::arg (" broad_phase" ) = nullptr )
2929 .def (
3030 " build" ,
3131 py::overload_cast<
3232 const CollisionMesh&, const Eigen::MatrixXd&,
33- const Eigen::MatrixXd&, const double , const BroadPhaseMethod>(
34- &Candidates::build),
33+ const Eigen::MatrixXd&, const double ,
34+ std::shared_ptr<BroadPhase>>( &Candidates::build),
3535 R"ipc_Qu8mg5v7(
3636 Initialize the set of continuous collision detection candidates.
3737
@@ -43,11 +43,10 @@ void define_candidates(py::module_& m)
4343 vertices_t0: Surface vertex starting positions (rowwise).
4444 vertices_t1: Surface vertex ending positions (rowwise).
4545 inflation_radius: Amount to inflate the bounding boxes.
46- broad_phase_method : Broad phase method to use.
46+ broad_phase : Broad phase to use.
4747 )ipc_Qu8mg5v7" ,
4848 py::arg (" mesh" ), py::arg (" vertices_t0" ), py::arg (" vertices_t1" ),
49- py::arg (" inflation_radius" ) = 0 ,
50- py::arg (" broad_phase_method" ) = DEFAULT_BROAD_PHASE_METHOD)
49+ py::arg (" inflation_radius" ) = 0 , py::arg (" broad_phase" ) = nullptr )
5150 .def (" __len__" , &Candidates::size)
5251 .def (" empty" , &Candidates::empty)
5352 .def (" clear" , &Candidates::clear)
@@ -122,13 +121,13 @@ void define_candidates(py::module_& m)
122121 vertices_t0: Surface vertex starting positions (rowwise).
123122 vertices_t1: Surface vertex ending positions (rowwise).
124123 dhat: Barrier activation distance.
125- min_distance: The minimum distance allowable between any two elements.
126- narrow_phase_ccd: The narrow phase CCD algorithm to use.
124+ min_distance: Minimum distance allowable between any two elements.
125+ broad_phase: Broad phase algorithm to use.
126+ narrow_phase_ccd: Narrow phase CCD algorithm to use.
127127 )ipc_Qu8mg5v7" ,
128128 py::arg (" mesh" ), py::arg (" vertices_t0" ), py::arg (" vertices_t1" ),
129- py::arg (" dhat" ),
130- py::arg (" broad_phase_method" ) = DEFAULT_BROAD_PHASE_METHOD,
131- py::arg (" min_distance" ) = 0.0 ,
129+ py::arg (" dhat" ), py::arg (" min_distance" ) = 0.0 ,
130+ py::arg (" broad_phase" ) = nullptr ,
132131 py::arg (" narrow_phase_ccd" ) = DEFAULT_NARROW_PHASE_CCD)
133132 .def (
134133 " save_obj" , &Candidates::save_obj, py::arg (" filename" ),
0 commit comments