prepare_lhs.h 896 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef IGL_MATLAB_PREPARE_LHS_H
  2. #define IGL_MATLAB_PREPARE_LHS_H
  3. #include <igl/igl_inline.h>
  4. #include <mex.h>
  5. #include <Eigen/Dense>
  6. namespace igl
  7. {
  8. namespace matlab
  9. {
  10. // Writes out 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 prepare_lhs_double(
  18. const Eigen::PlainObjectBase<DerivedV> & V,
  19. mxArray *plhs[]);
  20. // Casts to logical
  21. template <typename DerivedV>
  22. IGL_INLINE void prepare_lhs_logical(
  23. const Eigen::PlainObjectBase<DerivedV> & V,
  24. mxArray *plhs[]);
  25. // Writes out a matrix and adds 1
  26. template <typename DerivedV>
  27. IGL_INLINE void prepare_lhs_index(
  28. const Eigen::PlainObjectBase<DerivedV> & V,
  29. mxArray *plhs[]);
  30. };
  31. }
  32. #ifndef IGL_STATIC_LIBRARY
  33. # include "prepare_lhs.cpp"
  34. #endif
  35. #endif