From db8f3eda58bff0628e1de484f2b64fd7c42c8f5d Mon Sep 17 00:00:00 2001 From: Todica Ionut Date: Tue, 17 Dec 2024 19:41:08 +0200 Subject: [PATCH 01/19] Imath Frustum to IMATH_NAMESPACE Signed-off-by: Todica Ionut --- src/pybind11/PyBindImath/PyBindImathFrustum.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp index 69d055d8..6beba871 100644 --- a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp +++ b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp @@ -16,7 +16,7 @@ void register_frustum(pybind11::module& m, const char *name) pybind11::class_ c(m, name); c.def(pybind11::init<>(), "Uninitialized by default") .def(pybind11::init(), pybind11::arg("frustum"), "Copy constructor") - .def(pybind11::init(), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Initialize with basic frustum properties") + .def(pybind11::init<>(), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Initialize with basic frustum properties") .def_readwrite("nearPlane", &T::nearPlane, "The near clipping plane") .def_readwrite("farPlane", &T::farPlane, "The far clipping plane") @@ -52,8 +52,8 @@ void register_frustum(pybind11::module& m, const char *name) void register_imath_frustum(pybind11::module &m) { - register_frustum(m, "Frustumf"); - register_frustum(m, "Frustumd"); + register_frustum(m, "Frustumf"); + register_frustum(m, "Frustumd"); } } From 4882492aa7feaa7040f7c886c6b7ce827e453ec3 Mon Sep 17 00:00:00 2001 From: Todica Ionut Date: Tue, 17 Dec 2024 19:55:07 +0200 Subject: [PATCH 02/19] Imath Euler to IMATH_NAMESPACE Signed-off-by: Todica Ionut --- src/pybind11/PyBindImath/PyBindImathEuler.cpp | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/src/pybind11/PyBindImath/PyBindImathEuler.cpp b/src/pybind11/PyBindImath/PyBindImathEuler.cpp index b3fcd8d7..61969a30 100644 --- a/src/pybind11/PyBindImath/PyBindImathEuler.cpp +++ b/src/pybind11/PyBindImath/PyBindImathEuler.cpp @@ -12,28 +12,28 @@ namespace PyBindImath { // Function to register the Euler class methods template - void register_euler_methods(pybind11::class_, Imath::Vec3>& c) { + void register_euler_methods(pybind11::class_, IMATH_NAMESPACE::Vec3>& c) { c.def(pybind11::init<>()) - .def(pybind11::init&, typename Imath::Euler::Order>(), pybind11::arg("v"), pybind11::arg("order") = Imath::Euler::XYZ) - .def(pybind11::init::Order>(), pybind11::arg("x"), pybind11::arg("y"), pybind11::arg("z"), pybind11::arg("order") = Imath::Euler::XYZ) + .def(pybind11::init&, typename IMATH_NAMESPACE::Euler::Order>(), pybind11::arg("v"), pybind11::arg("order") = IMATH_NAMESPACE::Euler::XYZ) + .def(pybind11::init::Order>(), pybind11::arg("x"), pybind11::arg("y"), pybind11::arg("z"), pybind11::arg("order") = IMATH_NAMESPACE::Euler::XYZ) .def(pybind11::self == pybind11::self) .def(pybind11::self != pybind11::self) - .def("toMatrix33", &Imath::Euler::toMatrix33) - .def("toMatrix44", &Imath::Euler::toMatrix44) - .def("toQuat", &Imath::Euler::toQuat) - .def("order", &Imath::Euler::order) - .def("setOrder", &Imath::Euler::setOrder) - .def("makeNear", &Imath::Euler::makeNear) - .def("extract", pybind11::overload_cast&>(&Imath::Euler::extract)) - .def("extract", pybind11::overload_cast&>(&Imath::Euler::extract)) - .def("extract", pybind11::overload_cast&>(&Imath::Euler::extract)) - .def("toXYZVector", &Imath::Euler::toXYZVector) - .def("__str__", [](const Imath::Euler& e) { + .def("toMatrix33", &IMATH_NAMESPACE::Euler::toMatrix33) + .def("toMatrix44", &IMATH_NAMESPACE::Euler::toMatrix44) + .def("toQuat", &IMATH_NAMESPACE::Euler::toQuat) + .def("order", &IMATH_NAMESPACE::Euler::order) + .def("setOrder", &IMATH_NAMESPACE::Euler::setOrder) + .def("makeNear", &IMATH_NAMESPACE::Euler::makeNear) + .def("extract", pybind11::overload_cast&>(&IMATH_NAMESPACE::Euler::extract)) + .def("extract", pybind11::overload_cast&>(&IMATH_NAMESPACE::Euler::extract)) + .def("extract", pybind11::overload_cast&>(&IMATH_NAMESPACE::Euler::extract)) + .def("toXYZVector", &IMATH_NAMESPACE::Euler::toXYZVector) + .def("__str__", [](const IMATH_NAMESPACE::Euler& e) { std::stringstream stream; stream << "Euler(" << e.x << ", " << e.y << ", " << e.z << ", " << e.order() << ")"; return stream.str(); }) - .def("__repr__", [](const Imath::Euler& e) { + .def("__repr__", [](const IMATH_NAMESPACE::Euler& e) { std::stringstream stream; stream << "Euler(" << e.x << ", " << e.y << ", " << e.z << ", " << e.order() << ")"; return stream.str(); @@ -43,7 +43,7 @@ namespace PyBindImath { // Function to register the Euler class in the module template void register_euler(pybind11::module& m, const char* name) { - pybind11::class_, Imath::Vec3> c(m, name); + pybind11::class_, IMATH_NAMESPACE::Vec3> c(m, name); register_euler_methods(c); } @@ -54,31 +54,31 @@ namespace PyBindImath { // Enums for Euler Orders pybind11::enum_::Order>(m, "Order") - .value("XYZ", Imath::Euler::XYZ) - .value("XZY", Imath::Euler::XZY) - .value("YZX", Imath::Euler::YZX) - .value("YXZ", Imath::Euler::YXZ) - .value("ZXY", Imath::Euler::ZXY) - .value("ZYX", Imath::Euler::ZYX) - .value("XZX", Imath::Euler::XZX) - .value("XYX", Imath::Euler::XYX) - .value("YXY", Imath::Euler::YXY) - .value("YZY", Imath::Euler::YZY) - .value("ZYZ", Imath::Euler::ZYZ) - .value("ZXZ", Imath::Euler::ZXZ) + .value("XYZ", IMATH_NAMESPACE::Euler::XYZ) + .value("XZY", IMATH_NAMESPACE::Euler::XZY) + .value("YZX", IMATH_NAMESPACE::Euler::YZX) + .value("YXZ", IMATH_NAMESPACE::Euler::YXZ) + .value("ZXY", IMATH_NAMESPACE::Euler::ZXY) + .value("ZYX", IMATH_NAMESPACE::Euler::ZYX) + .value("XZX", IMATH_NAMESPACE::Euler::XZX) + .value("XYX", IMATH_NAMESPACE::Euler::XYX) + .value("YXY", IMATH_NAMESPACE::Euler::YXY) + .value("YZY", IMATH_NAMESPACE::Euler::YZY) + .value("ZYZ", IMATH_NAMESPACE::Euler::ZYZ) + .value("ZXZ", IMATH_NAMESPACE::Euler::ZXZ) .export_values(); // Enums for Axis pybind11::enum_::Axis>(m, "Axis") - .value("X", Imath::Euler::X) - .value("Y", Imath::Euler::Y) - .value("Z", Imath::Euler::Z) + .value("X", IMATH_NAMESPACE::Euler::X) + .value("Y", IMATH_NAMESPACE::Euler::Y) + .value("Z", IMATH_NAMESPACE::Euler::Z) .export_values(); // Enums for InputLayout pybind11::enum_::InputLayout>(m, "InputLayout") - .value("XYZLayout", Imath::Euler::XYZLayout) - .value("IJKLayout", Imath::Euler::IJKLayout) + .value("XYZLayout", IMATH_NAMESPACE::Euler::XYZLayout) + .value("IJKLayout", IMATH_NAMESPACE::Euler::IJKLayout) .export_values(); } From 23d6adc51e47c0f82eda27d25f83553dcbc0182f Mon Sep 17 00:00:00 2001 From: Todica Ionut Date: Tue, 17 Dec 2024 20:13:27 +0200 Subject: [PATCH 03/19] Remove Signed-off-by: Todica Ionut --- src/pybind11/PyBindImath/PyBindImathFrustum.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp index 6beba871..2e42875c 100644 --- a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp +++ b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp @@ -16,7 +16,6 @@ void register_frustum(pybind11::module& m, const char *name) pybind11::class_ c(m, name); c.def(pybind11::init<>(), "Uninitialized by default") .def(pybind11::init(), pybind11::arg("frustum"), "Copy constructor") - .def(pybind11::init<>(), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Initialize with basic frustum properties") .def_readwrite("nearPlane", &T::nearPlane, "The near clipping plane") .def_readwrite("farPlane", &T::farPlane, "The far clipping plane") From 4cbf7adb6a73ac175b909a79b0a7f445a14da982 Mon Sep 17 00:00:00 2001 From: Todica Ionut Date: Tue, 17 Dec 2024 20:23:23 +0200 Subject: [PATCH 04/19] Restore Signed-off-by: Todica Ionut --- src/pybind11/PyBindImath/PyBindImathFrustum.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp index 2e42875c..a733b1c7 100644 --- a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp +++ b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp @@ -16,6 +16,7 @@ void register_frustum(pybind11::module& m, const char *name) pybind11::class_ c(m, name); c.def(pybind11::init<>(), "Uninitialized by default") .def(pybind11::init(), pybind11::arg("frustum"), "Copy constructor") + .def(pybind11::init(), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Initialize with basic frustum properties") .def_readwrite("nearPlane", &T::nearPlane, "The near clipping plane") .def_readwrite("farPlane", &T::farPlane, "The far clipping plane") From 079cfa42cf3e9426aa3593e0bb2dcc386604c8c3 Mon Sep 17 00:00:00 2001 From: Todica Ionut Date: Tue, 17 Dec 2024 20:46:57 +0200 Subject: [PATCH 05/19] Frustum class S Signed-off-by: Todica Ionut --- src/pybind11/PyBindImath/PyBindImathFrustum.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp index a733b1c7..b9e11354 100644 --- a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp +++ b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp @@ -10,13 +10,13 @@ namespace PyBindImath { -template +template void register_frustum(pybind11::module& m, const char *name) { pybind11::class_ c(m, name); c.def(pybind11::init<>(), "Uninitialized by default") .def(pybind11::init(), pybind11::arg("frustum"), "Copy constructor") - .def(pybind11::init(), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Initialize with basic frustum properties") + .def(pybind11::init(), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Initialize with basic frustum properties") .def_readwrite("nearPlane", &T::nearPlane, "The near clipping plane") .def_readwrite("farPlane", &T::farPlane, "The far clipping plane") From 08c9da8580f54136aa9b4aa3f367a627b03acbe4 Mon Sep 17 00:00:00 2001 From: Todica Ionut Date: Tue, 17 Dec 2024 21:02:27 +0200 Subject: [PATCH 06/19] Frustum remove class M Signed-off-by: Todica Ionut --- src/pybind11/PyBindImath/PyBindImathFrustum.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp index b9e11354..72a880fb 100644 --- a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp +++ b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp @@ -10,7 +10,7 @@ namespace PyBindImath { -template +template void register_frustum(pybind11::module& m, const char *name) { pybind11::class_ c(m, name); From 4798ca4b77b6241b54d93adeecdc15b18c46a028 Mon Sep 17 00:00:00 2001 From: Todica Ionut Date: Tue, 17 Dec 2024 21:35:31 +0200 Subject: [PATCH 07/19] bug fix Signed-off-by: Todica Ionut --- src/pybind11/PyBindImath/PyBindImathFrustum.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp index 72a880fb..bafe8795 100644 --- a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp +++ b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp @@ -16,7 +16,7 @@ void register_frustum(pybind11::module& m, const char *name) pybind11::class_ c(m, name); c.def(pybind11::init<>(), "Uninitialized by default") .def(pybind11::init(), pybind11::arg("frustum"), "Copy constructor") - .def(pybind11::init(), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Initialize with basic frustum properties") + .def(pybind11::init(), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Initialize with basic frustum properties") .def_readwrite("nearPlane", &T::nearPlane, "The near clipping plane") .def_readwrite("farPlane", &T::farPlane, "The far clipping plane") From 7a2fd3f473fbb48778c2d3ebf97e29b133dfabae Mon Sep 17 00:00:00 2001 From: Todica Ionut Date: Tue, 17 Dec 2024 22:12:30 +0200 Subject: [PATCH 08/19] bug fix Signed-off-by: Todica Ionut --- src/pybind11/PyBindImath/PyBindImathFrustum.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp index bafe8795..e29717bc 100644 --- a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp +++ b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp @@ -16,14 +16,14 @@ void register_frustum(pybind11::module& m, const char *name) pybind11::class_ c(m, name); c.def(pybind11::init<>(), "Uninitialized by default") .def(pybind11::init(), pybind11::arg("frustum"), "Copy constructor") - .def(pybind11::init(), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Initialize with basic frustum properties") + .def(pybind11::init(), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Initialize with basic frustum properties") .def_readwrite("nearPlane", &T::nearPlane, "The near clipping plane") .def_readwrite("farPlane", &T::farPlane, "The far clipping plane") .def_readwrite("fovx", &T::fovx, "The field of view in x direction") .def_readwrite("aspect", &T::aspect, "The aspect ratio") - .def("set", pybind11::overload_cast(&T::set), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Set frustum properties") + .def("set", pybind11::overload_cast(&T::set), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Set frustum properties") .def("projectionMatrix", &T::projectionMatrix, "Returns the projection matrix of the frustum") .def("transform", &T::transform, pybind11::arg("matrix"), "Applies a transformation matrix to the frustum") .def("intersects", [](T& self, const V& point) { From af9e15df72988676afb8751397c3f558a5325d5f Mon Sep 17 00:00:00 2001 From: Todica Ionut Date: Tue, 17 Dec 2024 22:27:08 +0200 Subject: [PATCH 09/19] bug fix Signed-off-by: Todica Ionut --- src/pybind11/PyBindImath/PyBindImathFrustum.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp index e29717bc..421e06b0 100644 --- a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp +++ b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp @@ -10,20 +10,20 @@ namespace PyBindImath { -template +template void register_frustum(pybind11::module& m, const char *name) { pybind11::class_ c(m, name); c.def(pybind11::init<>(), "Uninitialized by default") .def(pybind11::init(), pybind11::arg("frustum"), "Copy constructor") - .def(pybind11::init(), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Initialize with basic frustum properties") + .def(pybind11::init(), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Initialize with basic frustum properties") .def_readwrite("nearPlane", &T::nearPlane, "The near clipping plane") .def_readwrite("farPlane", &T::farPlane, "The far clipping plane") .def_readwrite("fovx", &T::fovx, "The field of view in x direction") .def_readwrite("aspect", &T::aspect, "The aspect ratio") - .def("set", pybind11::overload_cast(&T::set), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Set frustum properties") + .def("set", pybind11::overload_cast(&T::set), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Set frustum properties") .def("projectionMatrix", &T::projectionMatrix, "Returns the projection matrix of the frustum") .def("transform", &T::transform, pybind11::arg("matrix"), "Applies a transformation matrix to the frustum") .def("intersects", [](T& self, const V& point) { From c80dd08f7e3f4c7628fe8f4b6ca169cb9349d277 Mon Sep 17 00:00:00 2001 From: Todica Ionut Date: Tue, 17 Dec 2024 22:39:08 +0200 Subject: [PATCH 10/19] bug fix Signed-off-by: Todica Ionut --- src/pybind11/PyBindImath/PyBindImathFrustum.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp index 421e06b0..1f7a1daf 100644 --- a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp +++ b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp @@ -10,20 +10,20 @@ namespace PyBindImath { -template +template void register_frustum(pybind11::module& m, const char *name) { pybind11::class_ c(m, name); c.def(pybind11::init<>(), "Uninitialized by default") .def(pybind11::init(), pybind11::arg("frustum"), "Copy constructor") - .def(pybind11::init(), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Initialize with basic frustum properties") + .def(pybind11::init(), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Initialize with basic frustum properties") .def_readwrite("nearPlane", &T::nearPlane, "The near clipping plane") .def_readwrite("farPlane", &T::farPlane, "The far clipping plane") .def_readwrite("fovx", &T::fovx, "The field of view in x direction") .def_readwrite("aspect", &T::aspect, "The aspect ratio") - .def("set", pybind11::overload_cast(&T::set), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Set frustum properties") + .def("set", pybind11::overload_cast(&T::set), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Set frustum properties") .def("projectionMatrix", &T::projectionMatrix, "Returns the projection matrix of the frustum") .def("transform", &T::transform, pybind11::arg("matrix"), "Applies a transformation matrix to the frustum") .def("intersects", [](T& self, const V& point) { From 64a5e8137034a9d06dabecba75246f7019fad3e9 Mon Sep 17 00:00:00 2001 From: Todica Ionut Date: Tue, 17 Dec 2024 22:52:40 +0200 Subject: [PATCH 11/19] bug fix Signed-off-by: Todica Ionut --- src/pybind11/PyBindImath/PyBindImathFrustum.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp index 1f7a1daf..53ca38de 100644 --- a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp +++ b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp @@ -10,20 +10,20 @@ namespace PyBindImath { -template +template void register_frustum(pybind11::module& m, const char *name) { pybind11::class_ c(m, name); c.def(pybind11::init<>(), "Uninitialized by default") .def(pybind11::init(), pybind11::arg("frustum"), "Copy constructor") - .def(pybind11::init(), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Initialize with basic frustum properties") + .def(pybind11::init(), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Initialize with basic frustum properties") .def_readwrite("nearPlane", &T::nearPlane, "The near clipping plane") .def_readwrite("farPlane", &T::farPlane, "The far clipping plane") .def_readwrite("fovx", &T::fovx, "The field of view in x direction") .def_readwrite("aspect", &T::aspect, "The aspect ratio") - .def("set", pybind11::overload_cast(&T::set), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Set frustum properties") + .def("set", pybind11::overload_cast(&T::set), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Set frustum properties") .def("projectionMatrix", &T::projectionMatrix, "Returns the projection matrix of the frustum") .def("transform", &T::transform, pybind11::arg("matrix"), "Applies a transformation matrix to the frustum") .def("intersects", [](T& self, const V& point) { From 111f5a8f284dbde4d24496133d5b305549fb5d95 Mon Sep 17 00:00:00 2001 From: Todica Ionut Date: Tue, 17 Dec 2024 23:06:02 +0200 Subject: [PATCH 12/19] bug fix Signed-off-by: Todica Ionut --- src/pybind11/PyBindImath/PyBindImathFrustum.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp index 53ca38de..11655167 100644 --- a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp +++ b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp @@ -10,20 +10,20 @@ namespace PyBindImath { -template +template void register_frustum(pybind11::module& m, const char *name) { pybind11::class_ c(m, name); c.def(pybind11::init<>(), "Uninitialized by default") .def(pybind11::init(), pybind11::arg("frustum"), "Copy constructor") - .def(pybind11::init(), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Initialize with basic frustum properties") + .def(pybind11::init(), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Initialize with basic frustum properties") .def_readwrite("nearPlane", &T::nearPlane, "The near clipping plane") .def_readwrite("farPlane", &T::farPlane, "The far clipping plane") .def_readwrite("fovx", &T::fovx, "The field of view in x direction") .def_readwrite("aspect", &T::aspect, "The aspect ratio") - .def("set", pybind11::overload_cast(&T::set), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Set frustum properties") + .def("set", pybind11::overload_cast(&T::set), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Set frustum properties") .def("projectionMatrix", &T::projectionMatrix, "Returns the projection matrix of the frustum") .def("transform", &T::transform, pybind11::arg("matrix"), "Applies a transformation matrix to the frustum") .def("intersects", [](T& self, const V& point) { From 4d9958e6e735007f33304fd24697920357f4e0ca Mon Sep 17 00:00:00 2001 From: Todica Ionut Date: Wed, 18 Dec 2024 10:55:14 +0200 Subject: [PATCH 13/19] add float double Signed-off-by: Todica Ionut --- src/pybind11/PyBindImath/PyBindImathFrustum.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp index 11655167..bcfd2616 100644 --- a/src/pybind11/PyBindImath/PyBindImathFrustum.cpp +++ b/src/pybind11/PyBindImath/PyBindImathFrustum.cpp @@ -16,14 +16,14 @@ void register_frustum(pybind11::module& m, const char *name) pybind11::class_ c(m, name); c.def(pybind11::init<>(), "Uninitialized by default") .def(pybind11::init(), pybind11::arg("frustum"), "Copy constructor") - .def(pybind11::init(), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Initialize with basic frustum properties") + .def(pybind11::init(), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Initialize with basic frustum properties") .def_readwrite("nearPlane", &T::nearPlane, "The near clipping plane") .def_readwrite("farPlane", &T::farPlane, "The far clipping plane") .def_readwrite("fovx", &T::fovx, "The field of view in x direction") .def_readwrite("aspect", &T::aspect, "The aspect ratio") - .def("set", pybind11::overload_cast(&T::set), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Set frustum properties") + .def("set", pybind11::overload_cast(&T::set), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Set frustum properties") .def("projectionMatrix", &T::projectionMatrix, "Returns the projection matrix of the frustum") .def("transform", &T::transform, pybind11::arg("matrix"), "Applies a transformation matrix to the frustum") .def("intersects", [](T& self, const V& point) { @@ -52,8 +52,8 @@ void register_frustum(pybind11::module& m, const char *name) void register_imath_frustum(pybind11::module &m) { - register_frustum(m, "Frustumf"); - register_frustum(m, "Frustumd"); + register_frustum(m, "Frustumf"); + register_frustum(m, "Frustumd"); } } From 04f41fa4c38138f513344639aae78c60e74814d3 Mon Sep 17 00:00:00 2001 From: Todica Ionut Date: Wed, 18 Dec 2024 19:02:39 +0200 Subject: [PATCH 14/19] remove Frustum Signed-off-by: Todica Ionut --- src/pybind11/PyBindImath/pybindimathmodule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind11/PyBindImath/pybindimathmodule.cpp b/src/pybind11/PyBindImath/pybindimathmodule.cpp index 3617804d..9a58a9c3 100644 --- a/src/pybind11/PyBindImath/pybindimathmodule.cpp +++ b/src/pybind11/PyBindImath/pybindimathmodule.cpp @@ -16,7 +16,7 @@ PYBIND11_MODULE(pybindimath, m) PyBindImath::register_imath_plane(m); PyBindImath::register_imath_line(m); PyBindImath::register_imath_euler(m); - PyBindImath::register_imath_frustum(m); + // PyBindImath::register_imath_frustum(m) // From ccccef37c96c54d531f4d778607a5cf23820e2e4 Mon Sep 17 00:00:00 2001 From: Todica Ionut Date: Wed, 18 Dec 2024 19:03:14 +0200 Subject: [PATCH 15/19] remove Frustum Signed-off-by: Todica Ionut --- src/pybind11/PyBindImath/PyBindImath.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind11/PyBindImath/PyBindImath.h b/src/pybind11/PyBindImath/PyBindImath.h index f56ea2b9..bc43754f 100644 --- a/src/pybind11/PyBindImath/PyBindImath.h +++ b/src/pybind11/PyBindImath/PyBindImath.h @@ -22,7 +22,7 @@ PYBINDIMATH_EXPORT void register_imath_box(pybind11::module& m); PYBINDIMATH_EXPORT void register_imath_plane(pybind11::module& m); PYBINDIMATH_EXPORT void register_imath_line(pybind11::module& m); PYBINDIMATH_EXPORT void register_imath_euler(pybind11::module& m); -PYBINDIMATH_EXPORT void register_imath_frustum(pybind11::module& m); +// PYBINDIMATH_EXPORT void register_imath_frustum(pybind11::module& m) } #endif From 766ab7507a065f088f12dd8c328828dcf08e1b2d Mon Sep 17 00:00:00 2001 From: Todica Ionut Date: Wed, 18 Dec 2024 19:05:09 +0200 Subject: [PATCH 16/19] remove PyBind Imath Frustum Signed-off-by: Todica Ionut --- src/pybind11/PyBindImath/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pybind11/PyBindImath/CMakeLists.txt b/src/pybind11/PyBindImath/CMakeLists.txt index 8ac1e305..f4d06b36 100644 --- a/src/pybind11/PyBindImath/CMakeLists.txt +++ b/src/pybind11/PyBindImath/CMakeLists.txt @@ -14,7 +14,8 @@ set(PYBINDIMATH_SOURCES PyBindImathPlane.cpp PyBindImathLine.cpp PyBindImathEuler.cpp - PyBindImathFrustum.cpp + + # PyBindImathFrustum build failing ) set(PYBINDIMATH_HEADERS From f6edc6a5dc895b2e9358cf546f6b9a94fd176bcd Mon Sep 17 00:00:00 2001 From: Todica Ionut Date: Wed, 18 Dec 2024 19:20:46 +0200 Subject: [PATCH 17/19] remove Euler Signed-off-by: Todica Ionut --- src/pybind11/PyBindImath/pybindimathmodule.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind11/PyBindImath/pybindimathmodule.cpp b/src/pybind11/PyBindImath/pybindimathmodule.cpp index 9a58a9c3..79f6b2f7 100644 --- a/src/pybind11/PyBindImath/pybindimathmodule.cpp +++ b/src/pybind11/PyBindImath/pybindimathmodule.cpp @@ -15,7 +15,7 @@ PYBIND11_MODULE(pybindimath, m) PyBindImath::register_imath_box(m); PyBindImath::register_imath_plane(m); PyBindImath::register_imath_line(m); - PyBindImath::register_imath_euler(m); + // PyBindImath::register_imath_euler(m) // PyBindImath::register_imath_frustum(m) From 208c7983fe0e2cc3fb3592c1fa831cebcc000aa8 Mon Sep 17 00:00:00 2001 From: Todica Ionut Date: Wed, 18 Dec 2024 19:21:05 +0200 Subject: [PATCH 18/19] remove Euler Signed-off-by: Todica Ionut --- src/pybind11/PyBindImath/PyBindImath.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind11/PyBindImath/PyBindImath.h b/src/pybind11/PyBindImath/PyBindImath.h index bc43754f..047a297b 100644 --- a/src/pybind11/PyBindImath/PyBindImath.h +++ b/src/pybind11/PyBindImath/PyBindImath.h @@ -21,7 +21,7 @@ PYBINDIMATH_EXPORT void register_imath_vec(pybind11::module& m); PYBINDIMATH_EXPORT void register_imath_box(pybind11::module& m); PYBINDIMATH_EXPORT void register_imath_plane(pybind11::module& m); PYBINDIMATH_EXPORT void register_imath_line(pybind11::module& m); -PYBINDIMATH_EXPORT void register_imath_euler(pybind11::module& m); +// PYBINDIMATH_EXPORT void register_imath_euler(pybind11::module& m) // PYBINDIMATH_EXPORT void register_imath_frustum(pybind11::module& m) } From 2dc2a48e774b43a45f80244595e1fc37a8cc4e9f Mon Sep 17 00:00:00 2001 From: Todica Ionut Date: Wed, 18 Dec 2024 19:23:26 +0200 Subject: [PATCH 19/19] remove Euler pybind test Signed-off-by: Todica Ionut --- src/pybind11/PyBindImath/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pybind11/PyBindImath/CMakeLists.txt b/src/pybind11/PyBindImath/CMakeLists.txt index f4d06b36..15473c69 100644 --- a/src/pybind11/PyBindImath/CMakeLists.txt +++ b/src/pybind11/PyBindImath/CMakeLists.txt @@ -13,8 +13,8 @@ set(PYBINDIMATH_SOURCES PyBindImathVec.cpp PyBindImathPlane.cpp PyBindImathLine.cpp - PyBindImathEuler.cpp + # PyBindImathEuler build Error pybind test # PyBindImathFrustum build failing )