parse_rhs.h 641 B

123456789101112131415161718192021222324252627
  1. #ifndef IGL_PARSE_RHS_H
  2. #define IGL_PARSE_RHS_H
  3. #include <igl/igl_inline.h>
  4. #include <mex.h>
  5. #include <Eigen/Dense>
  6. namespace igl
  7. {
  8. // Reads in a matrix as a double
  9. //
  10. // Inputs:
  11. // prhs points to rhs argument
  12. // Outputs:
  13. // V M by N matrix
  14. template <typename DerivedV>
  15. IGL_INLINE void parse_rhs_double(
  16. const mxArray *prhs[],
  17. Eigen::PlainObjectBase<DerivedV> & V);
  18. // Reads in a matrix and subtracts 1
  19. template <typename DerivedV>
  20. IGL_INLINE void parse_rhs_index(
  21. const mxArray *prhs[],
  22. Eigen::PlainObjectBase<DerivedV> & V);
  23. };
  24. #ifdef IGL_HEADER_ONLY
  25. # include "parse_rhs.cpp"
  26. #endif
  27. #endif