boundary_conditions.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2013 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_BOUNDARY_CONDITIONS_H
  9. #define IGL_BOUNDARY_CONDITIONS_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Dense>
  12. namespace igl
  13. {
  14. // Compute boundary conditions for automatic weights computation
  15. // Inputs:
  16. // V #V by dim list of domain vertices
  17. // Ele #Ele by simplex-size list of simplex indices
  18. // C #C by dim list of handle positions
  19. // P #P by 1 list of point handle indices into C
  20. // BE #BE by 2 list of bone edge indices into C
  21. // CE #CE by 2 list of cage edge indices into *P*
  22. // Outputs:
  23. // b #b list of boundary indices (indices into V of vertices which have
  24. // known, fixed values)
  25. // bc #b by #weights list of known/fixed values for boundary vertices (notice
  26. // the #b != #weights in general because #b will include all the
  27. // intermediary samples along each bone, etc.. The ordering of the weights
  28. // corresponds to [P;BE]
  29. // Returns true if boundary conditions make sense
  30. IGL_INLINE bool boundary_conditions(
  31. const Eigen::MatrixXd & V,
  32. const Eigen::MatrixXi & Ele,
  33. const Eigen::MatrixXd & C,
  34. const Eigen::VectorXi & P,
  35. const Eigen::MatrixXi & BE,
  36. const Eigen::MatrixXi & CE,
  37. Eigen::VectorXi & b,
  38. Eigen::MatrixXd & bc);
  39. }
  40. #ifdef IGL_HEADER_ONLY
  41. # include "boundary_conditions.cpp"
  42. #endif
  43. #endif