viewer fully wrapped, added better type error messages

Former-commit-id: 6732f0f49a
This commit is contained in:
Daniele Panozzo
2015-08-29 02:13:03 +02:00
parent ea90d493ec
commit c852547ee8
4 changed files with 280 additions and 71 deletions
+18
View File
@@ -27,6 +27,24 @@ void assert_is_RowVector3d(const std::string name, const Eigen::MatrixXd& v)
throw std::runtime_error(name + " must be a row vector with 3 entries.");
}
void assert_is_Vector4d(const std::string name, const Eigen::MatrixXd& v)
{
if ((v.cols() != 1) || (v.rows() != 4))
throw std::runtime_error(name + " must be a column vector with 4 entries.");
}
void assert_is_RowVector4d(const std::string name, const Eigen::MatrixXd& v)
{
if ((v.cols() != 4) || (v.rows() != 1))
throw std::runtime_error(name + " must be a row vector with 4 entries.");
}
void assert_is_Matrix4d(const std::string name, const Eigen::MatrixXd& v)
{
if ((v.cols() != 4) || (v.rows() != 4))
throw std::runtime_error(name + " must be a 4x4 matrix.");
}
extern void python_export_vector(py::module &);
extern void python_export_igl(py::module &);
extern void python_export_igl_viewer(py::module &);