break;
		case ImageResolution::NUI_IMAGE_RESOLUTION_640x480:
			mVideoSize = Vec2i( 640, 480 );
			break;
		default:
			mVideoResolution = NUI_IMAGE_RESOLUTION_INVALID;
			mVideoSize = Vec2i::zero();
			mEnabledVideo = false;
			break;
		}
		return *this;
	}

	//////////////////////////////////////////////////////////////////////////////////////////////

	vector<Colorf> Kinect::sUserColors = getUserColors();

	ci::Colorf Kinect::getUserColor( uint32_t id ) 
	{ 
		return sUserColors.at( ci::math<uint32_t>::clamp( id, 0, 5 ) ); 
	}

	vector<Colorf> Kinect::getUserColors()
	{
		if ( sUserColors.size() == NUI_SKELETON_COUNT ) {
			return sUserColors;
		}

		vector<Colorf> colors;
		colors.push_back( Colorf( 0.0f, 1.0f, 1.0f ) );
		colors.push_back( Colorf( 0.0f, 0.0f, 1.0f ) );
Example #2
0
{
}

const Surface8u& Device::ColorFrame::getSurface() const
{
	return mSurface;
}

__int64 Device::ColorFrame::getTimeStamp() const
{
	return mTimeStamp;
}

//////////////////////////////////////////////////////////////////////////////////////////////

vector<Colorf> Device::sUserColors = getUserColors();

ci::Colorf Device::getUserColor( uint32_t id ) 
{ 
	return sUserColors.at( ci::math<uint32_t>::clamp( id, 0, 5 ) ); 
}

vector<Colorf> Device::getUserColors()
{
	if ( sUserColors.size() == NUI_SKELETON_COUNT ) {
		return sUserColors;
	}

	vector<Colorf> colors;
	colors.push_back( Colorf( 0.0f, 1.0f, 1.0f ) );
	colors.push_back( Colorf( 0.0f, 0.0f, 1.0f ) );