parse_rhs.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2015 Alec Jacobson <alecjacobson@gmail.com>
  4. //
  5. // This Source Code Form is subject to the terms of the Mozilla Public License
  6. // v. 2.0. If a copy of the MPL was not distributed with this file, You can
  7. // obtain one at http://mozilla.org/MPL/2.0/.
  8. #ifndef IGL_MATLAB_PARSE_RHS_H
  9. #define IGL_MATLAB_PARSE_RHS_H
  10. #include <igl/igl_inline.h>
  11. #include <mex.h>
  12. #include <Eigen/Dense>
  13. namespace igl
  14. {
  15. namespace matlab
  16. {
  17. // Reads in a matrix as a double
  18. //
  19. // Inputs:
  20. // prhs points to rhs argument
  21. // Outputs:
  22. // V M by N matrix
  23. template <typename DerivedV>
  24. IGL_INLINE void parse_rhs_double(
  25. const mxArray *prhs[],
  26. Eigen::PlainObjectBase<DerivedV> & V);
  27. // Reads in a matrix and subtracts 1
  28. template <typename DerivedV>
  29. IGL_INLINE void parse_rhs_index(
  30. const mxArray *prhs[],
  31. Eigen::PlainObjectBase<DerivedV> & V);
  32. }
  33. };
  34. #ifndef IGL_STATIC_LIBRARY
  35. # include "parse_rhs.cpp"
  36. #endif
  37. #endif