Skip to content

Commit 111f5a8

Browse files
authored
bug fix
Signed-off-by: Todica Ionut <todicaionut2000111@gmail.com>
1 parent 64a5e81 commit 111f5a8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/pybind11/PyBindImath/PyBindImathFrustum.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@
1010

1111
namespace PyBindImath {
1212

13-
template <class T, class V>
13+
template <class T, class V, class S>
1414
void register_frustum(pybind11::module& m, const char *name)
1515
{
1616
pybind11::class_<T> c(m, name);
1717
c.def(pybind11::init<>(), "Uninitialized by default")
1818
.def(pybind11::init<T>(), pybind11::arg("frustum"), "Copy constructor")
19-
.def(pybind11::init<T>(), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Initialize with basic frustum properties")
19+
.def(pybind11::init<const S, S, S, S>(), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Initialize with basic frustum properties")
2020

2121
.def_readwrite("nearPlane", &T::nearPlane, "The near clipping plane")
2222
.def_readwrite("farPlane", &T::farPlane, "The far clipping plane")
2323
.def_readwrite("fovx", &T::fovx, "The field of view in x direction")
2424
.def_readwrite("aspect", &T::aspect, "The aspect ratio")
2525

26-
.def("set", pybind11::overload_cast<T>(&T::set), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Set frustum properties")
26+
.def("set", pybind11::overload_cast<const S, S, S, S>(&T::set), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Set frustum properties")
2727
.def("projectionMatrix", &T::projectionMatrix, "Returns the projection matrix of the frustum")
2828
.def("transform", &T::transform, pybind11::arg("matrix"), "Applies a transformation matrix to the frustum")
2929
.def("intersects", [](T& self, const V& point) {

0 commit comments

Comments
 (0)