← Back

ofxBvh

github.com/kylemcdonald/ofxBvh · @kylemcdonald
OF 0.11 Animation 3D / Point Cloud

openFrameworks addon for parsing, rendering, manipulating and saving BVH files.

13 6 Last commit 6y ago Created 8y ago

Forks

Forks pushed to more recently than kylemcdonald/ofxBvh itself, plus any admin-confirmed fork with commits of its own — worth checking if you're hitting issues with the original.

hanasaan/ofxBvh by @hanasaan · ★ 0 · pushed 4y ago

Branches ahead of master

These branches have commits not yet on master — could be unmerged fixes or work in progress worth a look.

0.9.8 1 commit ahead · last commit 8y ago

README

ofxBvh



This addon was began as an example in the Perfume Global Project written by Satoru Higa but has since been rewritten from scratch. The new version maintains some of the old functionality but also adds some important features.

Good: Bad:

Modifying matrices and raw data



Motion data in a BVH files is a list of real numbers (double precision). ofxBvh converts this into local and global matrices. If you manually modify the ofxBvhJoint::localMat, you should call ofxBvh::read() then ofxBvh::update() to keep everything in sync. If you manually modify ofxBvhJoint::raw data, you should call ofxBvh::readJointsRaw() then ofxBvh::update() to keep everything in sync. More thoroughly, there are four representations:

1. .bvh file 2. ofxBvh::motion 3. ofxBvhJoint::raw 4. ofxBvhJoint::localMat

To convert:

Porting old ofxBvh code



ofxBvh::load() has been replaced by a constructor. Instead of bvh.load("...") write bvh = ofxBvh("...").

ofxBvh::unload() is not needed anymore and has been removed.

Some variables that are safe to read/write from have been made public, and methods for accessing them have been removed. ofxBvh now returns raw glm objects instead of ofVec3f or ofQuaternion, but openFrameworks will make the conversion automatically.

``c++ ofxBvh::getNumJoints(); // ofxBvh::getJoints().size() ofxBvh::getJoint(int i); // ofxBvh::getJoints()[i] ofxBvhJoint::getName(); // ofxBvhJoint::name ofxBvhJoint::getOffset(); // ofxBvhJoint::offset ofxBvhJoint::getMatrix(); // ofxBvhJoint::localMat ofxBvhJoint::getGlobalMatrix(); // ofxBvhJoint::globalMat ``

Get this addon

HTTPS
SSH