arap_rhs.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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_ARAP_RHS_H
  9. #define IGL_ARAP_RHS_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Dense>
  12. #include <Eigen/Sparse>
  13. #include <igl/ARAPEnergyType.h>
  14. namespace igl
  15. {
  16. // ARAP_RHS build right-hand side constructor of global poisson solve for
  17. // various Arap energies
  18. // Inputs:
  19. // V #V by Vdim list of initial domain positions
  20. // F #F by 3 list of triangle indices into V
  21. // dim dimension being used at solve time. For deformation usually dim =
  22. // V.cols(), for surface parameterization V.cols() = 3 and dim = 2
  23. // energy igl::ARAPEnergyType enum value defining which energy is being
  24. // used. See igl::ARAPEnergyType.h for valid options and explanations.
  25. // Outputs:
  26. // K #V*dim by #(F|V)*dim*dim matrix such that:
  27. // b = K * reshape(permute(R,[3 1 2]),size(V|F,1)*size(V,2)*size(V,2),1);
  28. //
  29. // See also: arap_linear_block
  30. IGL_INLINE void arap_rhs(
  31. const Eigen::MatrixXd & V,
  32. const Eigen::MatrixXi & F,
  33. const int dim,
  34. const igl::ARAPEnergyType energy,
  35. Eigen::SparseMatrix<double>& K);
  36. }
  37. #ifndef IGL_STATIC_LIBRARY
  38. #include "arap_rhs.cpp"
  39. #endif
  40. #endif