merge codes of applying bvh animation to x