writeBF.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // This file is part of libigl, a simple c++ geometry processing library.
  2. //
  3. // Copyright (C) 2016 Alec Jacobson <[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_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. /// @param[in] file_name path to .bf bones tree file
  18. /// @param[in] WI #B list of unique weight indices
  19. /// @param[in] P #B list of parent indices into B, -1 for roots
  20. /// @param[in] O #B list of tip offsets
  21. /// @return true on success, false on errors
  22. ///
  23. /// \see readBF
  24. template <
  25. typename DerivedWI,
  26. typename DerivedP,
  27. typename DerivedO>
  28. IGL_INLINE bool writeBF(
  29. const std::string & filename,
  30. const Eigen::PlainObjectBase<DerivedWI> & WI,
  31. const Eigen::PlainObjectBase<DerivedP> & P,
  32. const Eigen::PlainObjectBase<DerivedO> & O);
  33. }
  34. #ifndef IGL_STATIC_LIBRARY
  35. # include "writeBF.cpp"
  36. #endif
  37. #endif