average_from_edges_onto_vertices.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2020 Oded Stein <[email protected]>
  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_AVERAGE_FROM_EDGES_ONTO_VERTICES_H
  9. #define IGL_AVERAGE_FROM_EDGES_ONTO_VERTICES_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Dense>
  12. namespace igl
  13. {
  14. /// Move a scalar field defined on edges to vertices by averaging
  15. ///
  16. /// @param[in] F #F by 3 triangle mesh connectivity
  17. /// @param[in] E #F by 3 mapping from each halfedge to each edge
  18. /// @param[in] oE #F by 3 orientation as generated by orient_halfedges
  19. /// @param[in] uE #uE by 1 list of scalars
  20. /// @param[out] uV #V by 1 list of scalar defined on vertices
  21. ///
  22. /// \see orient_halfedges
  23. template<typename DerivedF,typename DerivedE,typename DerivedoE,
  24. typename DeriveduE,typename DeriveduV>
  25. IGL_INLINE void average_from_edges_onto_vertices(
  26. const Eigen::MatrixBase<DerivedF> &F,
  27. const Eigen::MatrixBase<DerivedE> &E,
  28. const Eigen::MatrixBase<DerivedoE> &oE,
  29. const Eigen::MatrixBase<DeriveduE> &uE,
  30. Eigen::PlainObjectBase<DeriveduV> &uV);
  31. }
  32. #ifndef IGL_STATIC_LIBRARY
  33. # include "average_from_edges_onto_vertices.cpp"
  34. #endif
  35. #endif