Skip to content

Commit

Permalink
add float double
Browse files Browse the repository at this point in the history
Signed-off-by: Todica Ionut <todicaionut2000111@gmail.com>
  • Loading branch information
TodicaIonut authored Dec 18, 2024
1 parent 111f5a8 commit 4d9958e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/pybind11/PyBindImath/PyBindImathFrustum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ void register_frustum(pybind11::module& m, const char *name)
pybind11::class_<T> c(m, name);
c.def(pybind11::init<>(), "Uninitialized by default")
.def(pybind11::init<T>(), pybind11::arg("frustum"), "Copy constructor")
.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")
.def(pybind11::init<S, S, S, S>(), 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<const S, S, S, S>(&T::set), pybind11::arg("nearPlane"), pybind11::arg("farPlane"), pybind11::arg("fovx"), pybind11::arg("aspect"), "Set frustum properties")
.def("set", pybind11::overload_cast<S, S, S, S>(&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) {
Expand Down Expand Up @@ -52,8 +52,8 @@ void register_frustum(pybind11::module& m, const char *name)

void register_imath_frustum(pybind11::module &m)
{
register_frustum<IMATH_NAMESPACE::Frustumf, IMATH_NAMESPACE::V3f, IMATH_NAMESPACE::M44f>(m, "Frustumf");
register_frustum<IMATH_NAMESPACE::Frustumd, IMATH_NAMESPACE::V3d, IMATH_NAMESPACE::M44d>(m, "Frustumd");
register_frustum<IMATH_NAMESPACE::Frustumf, IMATH_NAMESPACE::V3f, IMATH_NAMESPACE::M44f, float>(m, "Frustumf");
register_frustum<IMATH_NAMESPACE::Frustumd, IMATH_NAMESPACE::V3d, IMATH_NAMESPACE::M44d, double>(m, "Frustumd");
}

}

0 comments on commit 4d9958e

Please sign in to comment.