vf.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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_VF_H
  9. #define IGL_VF_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Dense>
  12. #include <vector>
  13. namespace igl
  14. {
  15. // Constructs the vertex-face topology of a given mesh (V,F)
  16. // Inputs:
  17. // V #V by 3 list of vertex coordinates
  18. // F #F by dim list of mesh faces (must be triangles)
  19. // Outputs:
  20. //
  21. //
  22. // See also: edges, cotmatrix, diag, vv
  23. template <typename DerivedV, typename DerivedF, typename IndexType>
  24. IGL_INLINE void vf(
  25. const Eigen::PlainObjectBase<DerivedV>& V,
  26. const Eigen::PlainObjectBase<DerivedF>& F,
  27. std::vector<std::vector<IndexType> >& VF,
  28. std::vector<std::vector<IndexType> >& VFi);
  29. }
  30. #ifdef IGL_HEADER_ONLY
  31. # include "vf.cpp"
  32. #endif
  33. #endif