From 209a19967b1cae9ef513c2a3d4e9d35e191d5e25 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Thu, 20 Feb 2014 17:34:03 +0100 Subject: [PATCH] libpython: bindings for PerspectiveCamera --- src/libpython/core.cpp | 2 ++ src/libpython/render.cpp | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/src/libpython/core.cpp b/src/libpython/core.cpp index 8f4088a4..321536c1 100644 --- a/src/libpython/core.cpp +++ b/src/libpython/core.cpp @@ -507,6 +507,7 @@ bp::object cast(ConfigurableObject *obj) { TryCast(Medium); TryCast(VolumeDataSource); TryCast(Film); + TryCast(PerspectiveCamera); TryCast(ProjectiveCamera); TryCast(Sensor); TryCast(Emitter); @@ -1265,6 +1266,7 @@ void export_core() { BP_CLASS(Bitmap, Object, (bp::init())) .def(bp::init()) .def(bp::init()) + .def(bp::init()) .def("getPixelFormat", &Bitmap::getPixelFormat) .def("getComponentFormat", &Bitmap::getComponentFormat) .def("getSize", &Bitmap::getSize, BP_RETURN_VALUE) diff --git a/src/libpython/render.cpp b/src/libpython/render.cpp index 8ef389bf..faa02f00 100644 --- a/src/libpython/render.cpp +++ b/src/libpython/render.cpp @@ -626,6 +626,14 @@ void export_render() { .def("setFarClip", &ProjectiveCamera::setFarClip) .def("setFocusDistance", &ProjectiveCamera::setFocusDistance); + BP_CLASS(PerspectiveCamera, ProjectiveCamera, bp::no_init) + .def("getXFov", &PerspectiveCamera::getXFov) + .def("setXFov", &PerspectiveCamera::setXFov) + .def("getYFov", &PerspectiveCamera::getYFov) + .def("setYFov", &PerspectiveCamera::setYFov) + .def("getDiagonalFov", &PerspectiveCamera::getDiagonalFov) + .def("setDiagonalFov", &PerspectiveCamera::setDiagonalFov); + BP_CLASS(Integrator, ConfigurableObject, bp::no_init) .def("preprocess", &Integrator::preprocess) .def("render", &Integrator::render)