parse_rhs.h 716 B

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