libigl v2.5.0
Loading...
Searching...
No Matches
readBF.h File Reference

A .bf file contains a “bone forest”. More...

#include "igl_inline.h"
#include <Eigen/Core>
#include <string>
#include "readBF.cpp"

Go to the source code of this file.

Namespaces

namespace  igl

Functions

template<typename DerivedWI, typename DerivedP, typename DerivedO>
bool igl::readBF (const std::string &filename, Eigen::PlainObjectBase< DerivedWI > &WI, Eigen::PlainObjectBase< DerivedP > &P, Eigen::PlainObjectBase< DerivedO > &O)
 Read a bones forest from a file, returns a list of bone roots.
template<typename DerivedWI, typename DerivedbfP, typename DerivedO, typename DerivedC, typename DerivedBE, typename DerivedP>
bool igl::readBF (const std::string &filename, Eigen::PlainObjectBase< DerivedWI > &WI, Eigen::PlainObjectBase< DerivedbfP > &bfP, Eigen::PlainObjectBase< DerivedO > &O, Eigen::PlainObjectBase< DerivedC > &C, Eigen::PlainObjectBase< DerivedBE > &BE, Eigen::PlainObjectBase< DerivedP > &P)
 Read bone forest into pure bone-skeleton format, expects only bones (no point handles), and that a root in the .bf <---> no weight attachment.

Detailed Description

A .bf file contains a “bone forest”.

Normally a skeleton for linear blend skinning is a “bone tree” with a single root. But this format may store multiple trees, hence a forest.

Each line contains data about a vertex (joint) of the bone forest:

[weight index] [parent index] [x] [y] [z] [undocument optional data]

Indices begin with 0. The weight index is -1 if the bone does not have an associated weight. The parent index is -1 for root nodes. The x,y,z coordinates are offset vectors from this joint’s parent’s location (for roots, an offset from the origin).