gameoverhack / ofxOpenNI

Wrapper for OpenNI, NITE and SensorKinect
gingold.com.au
Other
246 stars 121 forks source link

get user by XnUserID #32

Open thiagohersan opened 11 years ago

thiagohersan commented 11 years ago

ofxOpenNIUser& ofxOpenNI::getTrackedUser(int index); takes an "index-user-Id", but that's not the same as the XnUserID that's in ofxOpenNIUserEvent.

I've added a ofxOpenNIUser& ofxOpenNI::getUser(XnUserID nID) function that uses a XnUserID to get a tracked user.

There's already a ofxOpenNIHand& ofxOpenNI::getTrackedHand(int index) and a ofxOpenNIHand& ofxOpenNI::getHand(XnUserID nID), so... this is just the ofxOpenNIUser equivalent of that...

Let me know, and I can PR my additions.