prepare_lhs.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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_PREPARE_LHS_H
  9. #define IGL_PREPARE_LHS_H
  10. #include <igl/igl_inline.h>
  11. #include <mex.h>
  12. #include <Eigen/Dense>
  13. namespace igl
  14. {
  15. // Writes out a matrix as a double
  16. //
  17. // Inputs:
  18. // prhs points to rhs argument
  19. // Outputs:
  20. // V M by N matrix
  21. template <typename DerivedV>
  22. IGL_INLINE void prepare_lhs_double(
  23. const Eigen::PlainObjectBase<DerivedV> & V,
  24. mxArray *plhs[]);
  25. // Casts to logical
  26. template <typename DerivedV>
  27. IGL_INLINE void prepare_lhs_logical(
  28. const Eigen::PlainObjectBase<DerivedV> & V,
  29. mxArray *plhs[]);
  30. // Writes out a matrix and adds 1
  31. template <typename DerivedV>
  32. IGL_INLINE void prepare_lhs_index(
  33. const Eigen::PlainObjectBase<DerivedV> & V,
  34. mxArray *plhs[]);
  35. };
  36. #ifndef IGL_STATIC_LIBRARY
  37. # include "prepare_lhs.cpp"
  38. #endif
  39. #endif