Эх сурвалжийг харах

Fix python bindings.

Former-commit-id: 113974b9115dca0e031f4b298e3305464b335862
Jérémie Dumas 7 жил өмнө
parent
commit
1e80372b62

+ 9 - 17
python/modules/py_igl_opengl_glfw.cpp

@@ -241,7 +241,6 @@ py::class_<igl::opengl::ViewerCore> viewercore_class(me, "ViewerCore");
     })
 
     .def_readwrite("lighting_factor",&igl::opengl::ViewerCore::lighting_factor)
-    .def_readwrite("camera_base_zoom",&igl::opengl::ViewerCore::camera_base_zoom)
 
     .def_property("trackball_angle",
     [](const igl::opengl::ViewerCore& core) {return Eigen::Quaterniond(core.trackball_angle.cast<double>());},
@@ -250,14 +249,6 @@ py::class_<igl::opengl::ViewerCore> viewercore_class(me, "ViewerCore");
       core.trackball_angle = Eigen::Quaternionf(q.cast<float>());
     })
 
-    .def_property("camera_translation",
-    [](const igl::opengl::ViewerCore& core) {return Eigen::MatrixXd(core.camera_translation.cast<double>());},
-    [](igl::opengl::ViewerCore& core, const Eigen::MatrixXd& v)
-    {
-      assert_is_Vector3("camera_translation",v);
-      core.camera_translation = Eigen::Vector3f(v.cast<float>());
-    })
-
     .def_property("camera_base_translation",
     [](const igl::opengl::ViewerCore& core) {return Eigen::MatrixXd(core.camera_base_translation.cast<double>());},
     [](igl::opengl::ViewerCore& core, const Eigen::MatrixXd& v)
@@ -266,6 +257,15 @@ py::class_<igl::opengl::ViewerCore> viewercore_class(me, "ViewerCore");
       core.camera_base_translation = Eigen::Vector3f(v.cast<float>());
     })
 
+    .def_property("camera_translation",
+    [](const igl::opengl::ViewerCore& core) {return Eigen::MatrixXd(core.camera_translation.cast<double>());},
+    [](igl::opengl::ViewerCore& core, const Eigen::MatrixXd& v)
+    {
+      assert_is_Vector3("camera_translation",v);
+      core.camera_translation = Eigen::Vector3f(v.cast<float>());
+    })
+
+    .def_readwrite("camera_base_zoom",&igl::opengl::ViewerCore::camera_base_zoom)
     .def_readwrite("camera_zoom",&igl::opengl::ViewerCore::camera_zoom)
     .def_readwrite("orthographic",&igl::opengl::ViewerCore::orthographic)
 
@@ -321,14 +321,6 @@ py::class_<igl::opengl::ViewerCore> viewercore_class(me, "ViewerCore");
       core.view = Eigen::Matrix4f(v.cast<float>());
     })
 
-    .def_property("model",
-    [](const igl::opengl::ViewerCore& core) {return Eigen::MatrixXd(core.model.cast<double>());},
-    [](igl::opengl::ViewerCore& core, const Eigen::MatrixXd& v)
-    {
-      assert_is_Matrix4("model",v);
-      core.model = Eigen::Matrix4f(v.cast<float>());
-    })
-
     .def_property("proj",
     [](const igl::opengl::ViewerCore& core) {return Eigen::MatrixXd(core.proj.cast<double>());},
     [](igl::opengl::ViewerCore& core, const Eigen::MatrixXd& v)