Browse Source

python: expose the new Matrix4::perspectiveProjection() overload.

pull/2/head
Vladimír Vondruš 7 years ago
parent
commit
b3a06f62e6
  1. 3
      src/python/magnum/math.matrix.h

3
src/python/magnum/math.matrix.h

@ -619,6 +619,9 @@ template<class T> void matrices(
.def_static("perspective_projection", [](Radd fov, T aspectRatio, T near, T far) { .def_static("perspective_projection", [](Radd fov, T aspectRatio, T near, T far) {
return Math::Matrix4<T>::perspectiveProjection(Math::Rad<T>(fov), aspectRatio, near, far); return Math::Matrix4<T>::perspectiveProjection(Math::Rad<T>(fov), aspectRatio, near, far);
}, "3D perspective projection matrix", py::arg("fov"), py::arg("aspect_ratio"), py::arg("near"), py::arg("far")) }, "3D perspective projection matrix", py::arg("fov"), py::arg("aspect_ratio"), py::arg("near"), py::arg("far"))
.def_static("perspective_projection",
static_cast<Math::Matrix4<T>(*)(const Math::Vector2<T>&, const Math::Vector2<T>&, T, T)>(&Math::Matrix4<T>::perspectiveProjection),
"3D off-center perspective projection matrix", py::arg("bottom_left"), py::arg("top_right"), py::arg("near"), py::arg("far"))
.def_static("look_at", &Math::Matrix4<T>::lookAt, .def_static("look_at", &Math::Matrix4<T>::lookAt,
"Matrix oriented towards a specific point", py::arg("eye"), py::arg("target"), py::arg("up")) "Matrix oriented towards a specific point", py::arg("eye"), py::arg("target"), py::arg("up"))
.def_static("from", static_cast<Math::Matrix4<T>(*)(const Math::Matrix3x3<T>&, const Math::Vector3<T>&)>(&Math::Matrix4<T>::from), .def_static("from", static_cast<Math::Matrix4<T>(*)(const Math::Matrix3x3<T>&, const Math::Vector3<T>&)>(&Math::Matrix4<T>::from),

Loading…
Cancel
Save