Merge branch 'python_writePLY' of https://github.com/decrispell/libigl

Former-commit-id: 3ca3b2d24b
This commit is contained in:
Daniele Panozzo
2017-07-02 23:04:26 +01:00
5 changed files with 35 additions and 0 deletions
+8
View File
@@ -1410,3 +1410,11 @@ const char *__doc_igl_writeOBJ = R"igl_Qu8mg5v7(// Write a mesh in an ascii obj
//
// Known issues: Horrifyingly, this does not have the same order of
// parameters as readOBJ.)igl_Qu8mg5v7";
const char *__doc_igl_writePLY = R"igl_Qu8mg5v7(// Write a mesh in an ascii ply file
// Inputs:
// str path to outputfile
// V #V by 3 mesh vertex positions
// F #F by 3 mesh indices into V
// N #V by 3 normal vectors
// UV #V by 2 texture coordinates
// Returns true on success, false on error)igl_Qu8mg5v7";
+1
View File
@@ -116,3 +116,4 @@ extern const char *__doc_igl_winding_number_3;
extern const char *__doc_igl_winding_number_2;
extern const char *__doc_igl_writeMESH;
extern const char *__doc_igl_writeOBJ;
extern const char *__doc_igl_writePLY;
+2
View File
@@ -92,6 +92,7 @@
#include <igl/winding_number.h>
#include <igl/writeMESH.h>
#include <igl/writeOBJ.h>
#include <igl/writePLY.h>
void python_export_igl(py::module &m)
@@ -187,5 +188,6 @@ void python_export_igl(py::module &m)
#include "py_igl/py_winding_number.cpp"
#include "py_igl/py_writeMESH.cpp"
#include "py_igl/py_writeOBJ.cpp"
#include "py_igl/py_writePLY.cpp"
}
+23
View File
@@ -0,0 +1,23 @@
m.def("writePLY", []
(
const std::string str,
const Eigen::MatrixXd& V,
const Eigen::MatrixXi& F,
const Eigen::MatrixXd& N,
const Eigen::MatrixXd& UV
)
{
return igl::writePLY(str,V,F,N,UV);
}, __doc_igl_writePLY,
py::arg("str"), py::arg("V"), py::arg("F"), py::arg("N"), py::arg("UV"));
m.def("writePLY", []
(
const std::string str,
const Eigen::MatrixXd& V,
const Eigen::MatrixXi& F
)
{
return igl::writePLY(str,V,F);
}, __doc_igl_writePLY,
py::arg("str"), py::arg("V"), py::arg("F"));
+1
View File
@@ -151,6 +151,7 @@ PYBIND11_PLUGIN(pyigl) {
winding_number
writeMESH
writeOBJ
writePLY
)pyigldoc");