readBF.h 783 B

123456789101112131415161718192021222324252627282930
  1. #ifndef IGL_READBF_H
  2. #define IGL_READBF_H
  3. #include "igl_inline.h"
  4. #include <Eigen/Core>
  5. #include <string>
  6. namespace igl
  7. {
  8. // Read a bones forest from a file, returns a list of bone roots
  9. // Input:
  10. // file_name path to .bf bones tree file
  11. // Output:
  12. // WI #B list of unique weight indices
  13. // P #B list of parent indices into B, -1 for roots
  14. // C #B list of tip positions
  15. // Returns true on success, false on errors
  16. template <
  17. typename DerivedWI,
  18. typename DerivedP,
  19. typename DerivedC>
  20. IGL_INLINE bool readBF(
  21. const std::string & filename,
  22. Eigen::PlainObjectBase<DerivedWI> & WI,
  23. Eigen::PlainObjectBase<DerivedP> & P,
  24. Eigen::PlainObjectBase<DerivedC> & C);
  25. }
  26. #ifndef IGL_STATIC_LIBRARY
  27. # include "readBF.cpp"
  28. #endif
  29. #endif