← Back

ofxSkeleton

github.com/tgfrerer/ofxSkeleton · @tgfrerer
OF 0.8 Graphics

ofxAddon to ease the woe of skeletal animation in openFrameworks

30 7 Last commit 13y ago Created 13y ago

Forks

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

themancalledjakob/ofxSkeleton by @themancalledjakob · ★ 0 · pushed 8y ago

README

_ ___ / / / / ofxSkeleton / / / / (c) ponies & light, 2012, 2013. All rights reserved. // /___/ poniesandlight.co.uk

Created by tim on 12/11/2012.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

ofxSkeleton



Description



This addon allows you to build (and debug-draw) skeleton structures, useful for skeletal animation and skinning.

Use case:



typedef shared_ptr<pal::ofxSkeleton::ofxJoint> JointP_t; for (int i = 0; i < 4; i++){ mSkeleton.push_back(JointP_t(new ofxJoint)); } mFoot = mSkeleton[0]; mKnee = mSkeleton[1]; mHip = mSkeleton[2]; mRoot = mSkeleton[3];

mFoot->setName("Foot"); mKnee->setName("Knee"); mHip->setName("Hip"); mRoot->setName("Root");

// build skeleton based on joints. // this applies a hierarchy, and allows you to set children // bones' offsets relative to their parent's. mFoot->bone(mKnee)->bone(mHip)->bone(mRoot);

mRoot->setGlobalPosition(ofVec3f(0)); mHip->setGlobalPosition(ofVec3f(0,100,0)); mKnee->setGlobalPosition(ofVec3f(0,50,0)); mFoot->setGlobalPosition(ofVec3f(0,-50,0));

Example Projects



2 included.

image

Dependencies



♥ openframeworks >= 0.8.0

Get this addon

HTTPS
SSH