boundary_conditions.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #ifndef IGL_BOUNDARY_CONDITIONS_H
  2. #define IGL_BOUNDARY_CONDITIONS_H
  3. #include "igl_inline.h"
  4. #include <Eigen/Dense>
  5. // Note: the elements field is currently unused but is left her for consistency
  6. // with the matlab version (where it is also unused). 10/25/2012
  7. namespace igl
  8. {
  9. // Compute boundary conditions for automatic weights computation
  10. // Inputs:
  11. // V #V by dim list of domain vertices
  12. // Ele #Ele by simplex-size list of simplex indices
  13. // C #C by dim list of handle positions
  14. // P #P by 1 list of point handle indices into C
  15. // BE #BE by 2 list of bone edge indices into C
  16. // CE #CE by 2 list of cage edge indices into *P*, unused
  17. // Outputs:
  18. // b #b list of boundary indices (indices into V of vertices which have
  19. // known, fixed values)
  20. // bc #b by #weights list of known/fixed values for boundary vertices (notice
  21. // the #b != #weights in general because #b will include all the
  22. // intermediary samples along each bone, etc.. The ordering of the weights
  23. // corresponds to [P;BE]
  24. // Returns true if boundary conditions make sense
  25. IGL_INLINE bool boundary_conditions(
  26. const Eigen::MatrixXd & V,
  27. const Eigen::MatrixXi & Ele,
  28. const Eigen::MatrixXd & C,
  29. const Eigen::VectorXi & P,
  30. const Eigen::MatrixXi & BE,
  31. const Eigen::MatrixXi & CE,
  32. Eigen::VectorXi & b,
  33. Eigen::MatrixXd & bc);
  34. }
  35. #ifdef IGL_HEADER_ONLY
  36. # include "boundary_conditions.cpp"
  37. #endif
  38. #endif