mapping_energy_with_jacobians.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2018 Zhongshi Jiang <jiangzs@nyu.edu>
  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_MAPPING_ENERGY_WITH_JACOBIANS_H
  9. #define IGL_MAPPING_ENERGY_WITH_JACOBIANS_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Dense>
  12. #include "MappingEnergyType.h"
  13. namespace igl
  14. {
  15. // compute the rotation-invariant energy of a mapping (represented in Jacobians and areas)
  16. // Input:
  17. // Ji: #F by 4 (9 if 3D) entries of jacobians
  18. // areas: #F by 1 face areas
  19. // slim_energy: energy type as in igl::MappingEnergyType
  20. // exp_factor: see igl::MappingEnergyType
  21. //
  22. // Output:
  23. // energy value
  24. IGL_INLINE double mapping_energy_with_jacobians(const Eigen::MatrixXd &Ji,
  25. const Eigen::VectorXd &areas,
  26. igl::MappingEnergyType slim_energy,
  27. double exp_factor);
  28. }
  29. #ifndef IGL_STATIC_LIBRARY
  30. # include "mapping_energy_with_jacobians.cpp"
  31. #endif
  32. #endif