parse_rhs.h 702 B

123456789101112131415161718192021222324252627
  1. #ifndef PARSE_RHS_H
  2. #define PARSE_RHS_H
  3. #include <mex.h>
  4. #include <Eigen/Core>
  5. // Parse right hand side arguments for a matlab mex function.
  6. //
  7. // Inputs:
  8. // nrhs number of right hand side arguments
  9. // prhs pointer to right hand side arguments
  10. // Outputs:
  11. // V n by dim list of mesh vertex positions
  12. // F m by dim list of mesh face indices
  13. // P #P by 3 list of origin points
  14. // N #P by 3 list of origin normals
  15. // num_samples number of samples
  16. // Throws matlab errors if dimensions are not sane.
  17. void parse_rhs(
  18. const int nrhs,
  19. const mxArray *prhs[],
  20. Eigen::MatrixXd & V,
  21. Eigen::MatrixXi & F,
  22. Eigen::MatrixXd & P,
  23. Eigen::MatrixXd & N,
  24. int & num_samples);
  25. #endif