Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed 2 little bugs (wrong index of skeleton, wrong index of device) #16

Merged
merged 1 commit into from
Jan 29, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/ofxKinectCommonBridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ void ofxKinectCommonBridge::update()
for ( int j = 0; j < NUI_SKELETON_POSITION_COUNT; j++ )
{
SkeletonBone bone( k4wSkeletons.SkeletonData[i].SkeletonPositions[j], bones[j] );
( skeletons.begin())->insert( std::pair<NUI_SKELETON_POSITION_INDEX, SkeletonBone>( NUI_SKELETON_POSITION_INDEX(j), bone ) );
skeletons.at(i).insert( std::pair<NUI_SKELETON_POSITION_INDEX, SkeletonBone>( NUI_SKELETON_POSITION_INDEX(j), bone ) );
}
bNeedsUpdateSkeleton = true;
}
Expand Down Expand Up @@ -427,7 +427,7 @@ bool ofxKinectCommonBridge::initSensor( int id )
UINT count = KinectGetPortIDCount();
WCHAR portID[KINECT_MAX_PORTID_LENGTH];

if( !SUCCEEDED(KinectGetPortIDByIndex( 0, _countof(portID), portID ))) {
if( !SUCCEEDED(KinectGetPortIDByIndex( id, _countof(portID), portID ))) {
ofLog() << " can't find kinect of ID " << id << endl;
return false;
}
Expand Down