Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
src
 
 
 
 
 
 
   _____    ___     
  /    /   /  /     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

About

ofxAddon to ease the woe of skeletal animation in openFrameworks

Resources

Releases

No releases published

Packages

No packages published