writeBF.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2016 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_WRITEBF_H
  9. #define IGL_WRITEBF_H
  10. #include "igl_inline.h"
  11. #include <Eigen/Core>
  12. #include <string>
  13. namespace igl
  14. {
  15. // Write a bones forest to a file
  16. //
  17. // Input:
  18. // file_name path to .bf bones tree file
  19. // WI #B list of unique weight indices
  20. // P #B list of parent indices into B, -1 for roots
  21. // O #B list of tip offsets
  22. // Returns true on success, false on errors
  23. template <
  24. typename DerivedWI,
  25. typename DerivedP,
  26. typename DerivedO>
  27. IGL_INLINE bool writeBF(
  28. const std::string & filename,
  29. const Eigen::PlainObjectBase<DerivedWI> & WI,
  30. const Eigen::PlainObjectBase<DerivedP> & P,
  31. const Eigen::PlainObjectBase<DerivedO> & O);
  32. }
  33. #ifndef IGL_STATIC_LIBRARY
  34. # include "writeBF.cpp"
  35. #endif
  36. #endif