ofxKinect .getWorldCoordinateFor(x, y) error

I’ve trying to play around with the example included with ofxKinect but I’ve run into a problem.
I am trying to call the function

kinect.getWorldCoordinateFor(x, y)  

inside a custom class but I can’t figure out how to get it to work. The function works fine in the example but I get the error message

|321|error: invalid use of nonstatic data member ‘testApp::kinect’|  

when I try using it in my additions to the code.

For reference the function works when it is called in the function below, which is part of the example program.

void testApp::drawPointCloud() {  
	ofScale(400, 400, 400);  
	int w = 640;  
	int h = 480;  
	float* distancePixels = kinect.getDistancePixels();  
	int step = 2;  
	for(int y = 0; y < h; y += step) {  
		for(int x = 0; x < w; x += step) {  
			ofPoint cur = kinect.getWorldCoordinateFor(x, y);  
			ofColor color = kinect.getCalibratedColorAt(x,y);  
			glColor3ub((unsigned char)color.r,(unsigned char)color.g,(unsigned char)color.b);  
			glVertex3f(cur.x, cur.y, cur.z);  

Thanks in advance for any help.