Skip to content

Commit

Permalink
#20 Update shapes wrappers
Browse files Browse the repository at this point in the history
  • Loading branch information
kwabenantim committed Nov 26, 2024
1 parent 0109047 commit e30bde7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ namespace py = pybind11;

PYBIND11_MODULE(_pyshapes_math_funcs, m)
{
m.def("add", &add, " ", py::arg("i") = 1., py::arg("j") = 2.);
m.def("add", &add, " ", py::arg("i") = 1.0, py::arg("j") = 2.0);
}
2 changes: 1 addition & 1 deletion examples/shapes/wrapper/primitives/Cuboid.cppwg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>);
void register_Cuboid_class(py::module &m)
{
py::class_<Cuboid, std::shared_ptr<Cuboid>, Shape<3>>(m, "Cuboid")
.def(py::init<double, double, double>(), py::arg("width") = 2., py::arg("height") = 1., py::arg("depth") = 1.)
.def(py::init<double, double, double>(), py::arg("width") = 2.0, py::arg("height") = 1.0, py::arg("depth") = 1.0)
;
}
2 changes: 1 addition & 1 deletion examples/shapes/wrapper/primitives/Rectangle.cppwg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ PYBIND11_DECLARE_HOLDER_TYPE(T, std::shared_ptr<T>);
void register_Rectangle_class(py::module &m)
{
py::class_<Rectangle, std::shared_ptr<Rectangle>, Shape<2>>(m, "Rectangle")
.def(py::init<double, double>(), py::arg("width") = 2., py::arg("height") = 1.)
.def(py::init<double, double>(), py::arg("width") = 2.0, py::arg("height") = 1.0)
.def(py::init<::std::vector<std::shared_ptr<Point<2>>> const>(), py::arg("points") = ::std::vector<std::shared_ptr<Point<2>>> {})
;
}

0 comments on commit e30bde7

Please sign in to comment.