OpenNI Skeleton Tracking

It looks like you have the ofxOpenNI.cpp source files included multiple times in your project - once under addons\ofxOpenNi and once under just ofxOpenNi. You’ll need to get rid of one set.

thanks sorted that now but now I’m having a problem with undefined references

  
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|  
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|  
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|  
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|  
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|  
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|  
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|  
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|  
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|  
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|  
||Warning: .drectve `-defaultlib:uuid.lib ' unrecognized|  
||Warning: .drectve `-defaultlib:uuid.lib ' unrecognized|  
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|  
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|  
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|  
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|  
||Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized|  
obj\release\apps\examples\opeNI-SimpleExamples\src\main.o:main.cpp:(.text.startup+0xb4)||undefined reference to `ofxOpenNI::ofxOpenNI()'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\main.o:main.cpp:(.text.startup+0xc9)||undefined reference to `ofxOpenNI::ofxOpenNI()'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::stop()'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::setPointCloudResolutionAllUsers(int)'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::stop()'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::getUseBackBuffer()'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::setUseBackBuffer(bool)'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::removeImageGenerator()'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::addInfraGenerator()'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::isImageOn()'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::isInfraOn()'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::removeInfraGenerator()'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::addImageGenerator()'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::update()'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::drawDebug()'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::getNumTrackedUsers()'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::getTrackedUser(int)'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNIUser::drawMask()'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNIUser::drawPointCloud()'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::getNumDevices()'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::setup(bool)'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::addDepthGenerator()'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::addImageGenerator()'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::addUserGenerator()'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::setRegister(bool)'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::setMirror(bool)'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::start()'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::setMaxNumUsers(int)'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNIUser::ofxOpenNIUser()'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNIUser::setUseMaskTexture(bool)'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNIUser::setUsePointCloud(bool)'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNIUser::setPointCloudDrawSize(int)'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNIUser::setPointCloudResolution(int)'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNI::setBaseUserClass(ofxOpenNIUser&)'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNIUser::~ofxOpenNIUser()'|  
obj\release\apps\examples\opeNI-SimpleExamples\src\testApp.o:testApp.cpp|| undefined reference to `ofxOpenNIUser::~ofxOpenNIUser()'|  
||=== Build finished: 36 errors, 17 warnings (0 minutes, 3 seconds) ===|  
  

Hmm not sure but it looks like you might have gone from including them twice to not including them at all.

I’m not used to the compiler output (is it Codeblocks?) but it looks like a linker error meaning that the compiler has found the .h files to ofxOpenNI but during its compile process it didn’t work its way through all of ofxOpenNI’s .cpp files. Are these included in the project (once)?

Im such a dumbass. Amazing thanks so much man. owe you big time :smiley:

Hi guys somethings happened now wherein codeblocks now freezes every time the example is initialized

  
Checking for existence: C:\Users\Ciaran\Desktop\of_v0.7.4_win_cb_release\apps\examples\opeNI-SimpleExamples\bin\openNISample007.exe  
Executing: "C:\Users\Ciaran\Desktop\CodeBlocks/cb_console_runner.exe" "C:\Users\Ciaran\Desktop\of_v0.7.4_win_cb_release\apps\examples\opeNI-SimpleExamples\bin\openNISample007.exe"  (in C:\Users\Ciaran\Desktop\of_v0.7.4_win_cb_release\apps\examples\opeNI-SimpleExamples\bin)  
  

Has anyone ever encountered this

  
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|  
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|  
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|  
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|  
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|  
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|  
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|  
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|  
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|  
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|  
||Warning: .drectve `-defaultlib:uuid.lib ' unrecognized|  
||Warning: .drectve `-defaultlib:uuid.lib ' unrecognized|  
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|  
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|  
||Warning: .drectve `-defaultlib:LIBCMT ' unrecognized|  
||Warning: .drectve `-defaultlib:OLDNAMES ' unrecognized|  
||Warning: .drectve `/DEFAULTLIB:"LIBCMT" /DEFAULTLIB:"OLDNAMES" ' unrecognized|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnGetRefContextFromNodeHandle'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnContextUnregisterFromShutdown'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnContextRelease'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnProductionNodeRelease'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnStopGenerating'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnStopGenerating'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnStopGenerating'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnStopGenerating'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnStopGenerating'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| more undefined references to `_imp__xnStopGenerating' follow|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnLogSetConsoleOutput'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnGetStatusString'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnLogSetSeverityFilter'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnLogSetMaskState'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnEnumerationErrorsGetFirst'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnEnumerationErrorsGetNext'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnEnumerationErrorsGetCurrentDescription'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnProductionNodeDescriptionToString'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnEnumerationErrorsGetCurrentError'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnGetStatusString'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnSetPlayerRepeat'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnSetPlaybackSpeed'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnGetPlaybackSpeed'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnGetNodeName'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnTellPlayerFrame'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnGetNodeName'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnGetPlayerNumFrames'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnIsPlayerAtEOF'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnGetDeviceMaxDepth'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnOSMalloc'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnRegisterGestureCallbacks'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnGetStatusString'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnGetStatusString'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnOSFree'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnSetSkeletonSmoothing'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnGetDeviceMaxDepth'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoListAllocate'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnEnumerateExistingNodes'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoListFree'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoListGetFirst'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoListFree'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoListIteratorIsValid'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoListGetCurrent'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoGetDescription'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoGetRefHandle'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnProductionNodeRelease'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoListGetNext'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoListIteratorIsValid'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoListGetCurrent'|  
obj\release\addons\ofxOpenNI\src\ofxOpenNI.o:ofxOpenNI.cpp|| undefined reference to `_imp__xnNodeInfoGetRefHandle'|  
||More errors follow but not being shown.|  
||Edit the max errors limit in compiler options...|  
||=== Build finished: 50 errors, 17 warnings (0 minutes, 12 seconds) ===|  
  

@oceanmachine89,
you’re not linking the libraries correctly.

Yeah I got that thanks again

Hi guys working on a project and just wondering what the best way would be to control an obj file within a virtual environment using the Kinect. I was thinking about using the kinect as possibly using the mouse cursor? Does anyone have any experience with this sort of thing?

oceanmachine89,
you can use an ofEasyCam and bind the kinect skeleton data to the camera movement parameters. and use hand gestures to switch between the different camera modes.
goodluck

Is that not just rotating the camera around the 3D object though, I’m looking to move the objects along the x,y and z axis parameters

you can make your own custom class that inherits from ofNode and loads and draws the 3d object. the ofNode class has all the necessary functions to move and rotate over 3d space. in terms of picking the object, take a look to the example 3d/pointPickingExample.

On the other hand, I think that there might be an addon for what you need. take a look at ofxaddons.com

good luck.

been playing around with this code

  
glTranslatef(ofGetWidth()/2,ofGetHeight()/1.15,0);  
       glRotatef(-qMouseY,1,0,0);  
        glRotatef(qMouseX,0,1,0);  
      teaModel.setRotation(0, 90, 1, 0, 0);  
    teaModel.setRotation(1, 270, 0, 0, 1);  
        glTranslatef(-ofGetWidth()/2,-ofGetHeight()/1.15,0);  
        teaModel.draw();  
         glPopMatrix();  
         glPushMatrix();  
        glTranslatef(ofGetWidth()/2,ofGetHeight()/1.25,0);  
        glRotatef(-pMouseY,1,0,0);  
        glRotatef(pMouseX,0,1,0);  
      teapotModel.setRotation(0, 90, 1, 0, 0);  
    teapotModel.setRotation(1, 270, 0, 0, 1);  
        glTranslatef(-ofGetWidth()/2,-ofGetHeight()/1.25,0);  
        teapotModel.draw();  
         glPopMatrix();  
         glPushMatrix();  
        glTranslatef(ofGetWidth()/2,ofGetHeight()/1.25,0);  
        glRotatef(-rMouseY,1,0,0);  
        glRotatef(rMouseX,0,1,0);  
      plateModel.setRotation(0, 90, 1, 0, 0);  
    plateModel.setRotation(1, 270, 0, 0, 1);  
        glTranslatef(-ofGetWidth()/2,-ofGetHeight()/1.25,0);  
        plateModel.draw();  
         glPopMatrix();  
         glPushMatrix();  
        glTranslatef(ofGetWidth()/2,ofGetHeight()/1.25,0);  
        //tumble according to mouse  
        glRotatef(-sMouseY,1,0,0);  
        glRotatef(sMouseX,0,1,0);  
      spoonModel.setRotation(0, 90, 1, 0, 0);  
    spoonModel.setRotation(1, 270, 0, 0, 1);  
        glTranslatef(-ofGetWidth()/2,-ofGetHeight()/1.25,0);  
        spoonModel.draw();  
         glPopMatrix();  
    glPopMatrix();  

, it seems to work in terms of mouse control , would I need to modify it much for skeleton control

though this is more stable by the looks of it and saves space with reduced code

  
cam.begin();  
	ofRotateX(ofRadToDeg(.5));  
	ofRotateY(ofRadToDeg(-.5));  
  
  
  
  
  
	ofPushMatrix();  
	ofTranslate(0,0,20);  
	ofFill();  
	ofNoFill();  
	ofSetColor(0);  
    teapotModel.draw();  
	ofPopMatrix();  
	cam.end();  

@oceanmachine89
in the last code chunk, the cam is an ofCamera or an easyCam? the difference between both is that easyCam inherits from ofCamera, and easyCam adds mouse control over ofCam.

You could also make some ofNode objects, one for each 3d model you have and apply each ofNode transformation to the 3d model quite easily. This way you can transform each model independently later.
also, it might be simpler to have the models and ofNodes stored in vectors, so you just use a for loop to draw them all, as the transformations all seemed to be the same.

  
  
on testApp.h  
vector<whateverclass are the models>models;  
vector<ofNode>modelTrans;  
void testApp::setup(){    
//add the models to the vectors. repeat for each model to add.  
modelclass tempModel;  
tempModel.load(...);  
models.push_back(tempModel);  
ofNode tempNode;  
tempNode.setRotation(....);//o whichever initial transformation  
modelTrans(tempNode);  
  
//here you set the transformatios as you want, but have the ability to change later programatically or interactively.  
   for(int i = 0; i<models.size(); i++){// here I'm considering that models and modelTrans are the same size  
modelTrans[i].setRotation(0, 90, 1, 0, 0);    
modelTrans[i].setRotation(1, 270, 0, 0, 1);    
}  
}  
void testApp::draw(){      
cam.begin();    
        ofPushMatrix();  
      ofTranslate(0,0,20);    
      ofNoFill();    
        ofSetColor(0);    
        for(int i = 0; i<models.size(); i++){// here I'm considering that models and modelTrans are the same size  
modelTrans[i].transformGL();  
        models[i].draw();  
modelTrans[i].restoreTransformGL();  
}  
      ofPopMatrix();    
      cam.end();    
}  
  

hope it helps
best!

not sure if this is correct

  
#include "testApp.h"  
GLfloat lightOnePosition[] = {40.0, 40, 100.0, 0.0};  
GLfloat lightOneColor[] = {0.99, 0.99, 0.99, 1.0};  
  
GLfloat lightTwoPosition[] = {-40.0, 40, 100.0, 0.0};  
GLfloat lightTwoColor[] = {0.99, 0.99, 0.99, 1.0};  
vector<ofx3DModelLoader>models;  
vector<ofNode>modelTrans;  
  
  
//--------------------------------------------------------------  
void testApp::setup() {  
ofx3DModelLoader tableModel,teaModel,teapotModel,plateModel,spoonModel;  
 tableModel.loadModel("actualtable.3ds", 20);  
 teaModel.loadModel("cupatea.3ds", 20);  
 teapotModel.loadModel("teapot.3ds",20);  
 plateModel.loadModel("plate.3ds",20);  
 spoonModel.loadModel("spoon.3ds",20);  
  
 models.push_back(tableModel);  
 models.push_back(teaModel);  
 models.push_back(teapotModel);  
 models.push_back(spoonModel);  
 models.push_back(plateModel);  
  
ofNode  tempNode;  
tempNode.setRotation();//o whichever initial transformation  
modelTrans(tempNode);  
  
  for(int i = 0; i<models.size(); i++){// here I'm considering that models and modelTrans are the same size  
modelTrans[i].setRotation(0, 90, 1, 0, 0);  
modelTrans[i].setRotation(1, 270, 0, 0, 1);  
}  

would ofNode include ofeasycam? is modeltrans a generic naming convention?

im not sure if line 28 is correct for initializing the vector. If it is then it looks fine.

  
modelTrans(tempNode);  

no, ofNode doesn’t include easyCam. Its the other way round, easycam inherits from ofNode.
I was discussing some time ago with elliotwoods about having an interactive ofNode, yet we were having trouble about inherintace stuff. I don’t know if he solved it, he might. take a look at his github as he has some really nice 3d related addons and stuff.

best

yeah it comes up with a list of errors

  
C:\Users\Ciaran\Desktop\of_v0.7.4_win_cb_release\apps\myApps\kinect_project\src\testApp.cpp||In member function 'virtual void testApp::setup()':|  
C:\Users\Ciaran\Desktop\of_v0.7.4_win_cb_release\apps\myApps\kinect_project\src\testApp.cpp|27|error: 'class ofNode' has no member named 'setRotation'|  
C:\Users\Ciaran\Desktop\of_v0.7.4_win_cb_release\apps\myApps\kinect_project\src\testApp.cpp|28|error: no match for call to '(std::vector<ofNode>) (ofNode&)'|  
C:\Users\Ciaran\Desktop\of_v0.7.4_win_cb_release\apps\myApps\kinect_project\src\testApp.cpp|31|error: 'class ofNode' has no member named 'setRotation'|  
C:\Users\Ciaran\Desktop\of_v0.7.4_win_cb_release\apps\myApps\kinect_project\src\testApp.cpp|32|error: 'class ofNode' has no member named 'setRotation'|  
||=== Build finished: 4 errors, 0 warnings (0 minutes, 2 seconds) ===|  
  

is there a way to use my original code as shown here

  
void testApp::setup() {  
    pMouseX = 0;  
 pMouseY = 0;  
 qMouseX = 0;  
 qMouseY = 0;  
 rMouseX = 0;  
 rMouseY = 0;  
 sMouseX = 0;  
 sMouseY = 0;  
  
	ofSetVerticalSync(true);  
  
    //some model / light stuff  
    glEnable (GL_DEPTH_TEST);  
    glShadeModel (GL_SMOOTH);  
  
    /* initialize lighting */  
    glLightfv (GL_LIGHT0, GL_POSITION, lightOnePosition);  
    glLightfv (GL_LIGHT0, GL_DIFFUSE, lightOneColor);  
    glEnable (GL_LIGHT0);  
    glLightfv (GL_LIGHT1, GL_POSITION, lightTwoPosition);  
    glLightfv (GL_LIGHT1, GL_DIFFUSE, lightTwoColor);  
    glEnable (GL_LIGHT1);  
    glEnable (GL_LIGHTING);  
    glColorMaterial (GL_FRONT_AND_BACK, GL_DIFFUSE);  
    glEnable (GL_COLOR_MATERIAL);  
  
    //load the squirrel model - the 3ds and the texture file need to be in the same folder  
  tableModel.loadModel("actualtable.3ds", 20);  
    teaModel.loadModel("cupatea.3ds", 20);  
    teapotModel.loadModel("teapot.3ds",20);  
    plateModel.loadModel("plate.3ds",20);  
    spoonModel.loadModel("spoon.3ds",20);  
  
    //you can create as many rotations as you want  
    //choose which axis you want it to effect  
    //you can update these rotations later on  
    tableModel.setScale(0.3, 0.2, 0.2);  
    teaModel.setScale(0.04,0.04,0.04);  
    teapotModel.setScale(0.15,0.15,0.15);  
    spoonModel.setScale(0.006,0.006,0.006);  
    plateModel.setScale(0.02,0.02,0.02);  
    teaModel.setPosition(ofGetWidth()/2, ofGetHeight()/2, 0);  
    teapotModel.setPosition(ofGetWidth()/2, ofGetHeight()/2, 0);  
   tableModel.setPosition(ofGetWidth()/2, ofGetHeight()/2, 0);  
    plateModel.setPosition(ofGetWidth()/2, ofGetHeight()/2, 0);  
    spoonModel.setPosition(ofGetWidth()/2, ofGetHeight()/2, 0);  
  
  
  
  
    ofSetLogLevel(OF_LOG_NOTICE);  
  
    numDevices = openNIDevices[0].getNumDevices();  
  
    for (int deviceID = 0; deviceID < numDevices; deviceID++){  
        //openNIDevices[deviceID].setLogLevel(OF_LOG_VERBOSE); // ofxOpenNI defaults to ofLogLevel, but you can force to any level  
        openNIDevices[deviceID].setup();  
        openNIDevices[deviceID].addDepthGenerator();  
        openNIDevices[deviceID].addImageGenerator();  
        openNIDevices[deviceID].addUserGenerator();  
        openNIDevices[deviceID].setRegister(true);  
        openNIDevices[deviceID].setMirror(true);  
		openNIDevices[deviceID].start();  
    }  
  
    // NB: Only one device can have a user generator at a time - this is a known bug in NITE due to a singleton issue  
    // so it's safe to assume that the fist device to ask (ie., deviceID == 0) will have the user generator...  
  
    openNIDevices[0].setMaxNumUsers(1); // defualt is 4  
    ofAddListener(openNIDevices[0].userEvent, this, &testApp::userEvent);  
  
    ofxOpenNIUser user;  
    user.setUseMaskTexture(true);  
    user.setUsePointCloud(true);  
    user.setPointCloudDrawSize(2); // this is the size of the glPoint that will be drawn for the point cloud  
    user.setPointCloudResolution(2); // this is the step size between points for the cloud -> eg., this sets it to every second point  
    openNIDevices[0].setBaseUserClass(user); // this becomes the base class on which tracked users are created  
                                             // allows you to set all tracked user properties to the same type easily  
                                             // and allows you to create your own user class that inherits from ofxOpenNIUser  
  
    // if you want to get fine grain control over each possible tracked user for some reason you can iterate  
    // through users like I'm doing below. Please not the use of nID = 1 AND nID <= openNIDevices[0].getMaxNumUsers()  
    // as what you're doing here is retrieving a user that is being stored in a std::map using it's XnUserID as the key  
    // that means it's not a 0 based vector, but instead starts at 1 and goes upto, and includes maxNumUsers...  
//    for (XnUserID nID = 1; nID <= openNIDevices[0].getMaxNumUsers(); nID++){  
//        ofxOpenNIUser & user = openNIDevices[0].getUser(nID);  
//        user.setUseMaskTexture(true);  
//        user.setUsePointCloud(true);  
//        //user.setUseAutoCalibration(false); // defualts to true; set to false to force pose detection  
//        //user.setLimbDetectionConfidence(0.9f); // defaults 0.3f  
//        user.setPointCloudDrawSize(2);  
//        user.setPointCloudResolution(1);  
//    }  
  
}  
  
//--------------------------------------------------------------  
void testApp::update(){  
    ofBackground(0, 0, 0);  
    pMouseX = mouseX;  
    pMouseY = mouseY;  
    qMouseX = mouseX;  
    qMouseY = mouseY;  
    rMouseX = mouseX;  
    rMouseY = mouseY;  
    sMouseX = mouseX;  
    sMouseY = mouseY;  
  
  
    for (int deviceID = 0; deviceID < numDevices; deviceID++){  
        openNIDevices[deviceID].update();  
    }  
}  
  
//--------------------------------------------------------------  
void testApp::draw(){  
	ofSetColor(255, 255, 255);  
ofImage myImage; //allocate space for variable  
myImage.loadImage("commercial-kitchen.jpg"); //allocate space in ram, decode jpg, load pixels.  
myImage.draw(0,0,1360,768);  
    ofPushMatrix();  
  
    for (int deviceID = 0; deviceID < numDevices; deviceID++){  
  
        // debug draw does the equicalent of the commented methods below  
   openNIDevices[deviceID].drawDepth(0, 0, 320, 260);  
     openNIDevices[deviceID].drawImage(1074,0, 320, 260);  
    openNIDevices[deviceID].drawSkeletons(0, 0, 320, 260);  
  
    }  
  
    // do some drawing of user clouds and masks  
    ofPushMatrix();  
    ofEnableBlendMode(OF_BLENDMODE_ALPHA);  
    int numUsers = openNIDevices[0].getNumTrackedUsers();  
    for (int nID = 0; nID < numUsers; nID++){  
        ofxOpenNIUser & user = openNIDevices[0].getTrackedUser(nID);  
        user.drawMask();  
        ofPushMatrix();  
        ofTranslate(320, 240, -1000);  
        user.drawPointCloud();  
        ofPopMatrix();  
    }  
    ofDisableBlendMode();  
    ofPopMatrix();  
  
  
  
  
  
    glTranslatef(ofGetWidth()/3,ofGetHeight()/1.25,0);  
        //tumble according to mouse  
        glRotatef(-105,1,0,0);  
        glRotatef(180,0,1,0);  
        glTranslatef(-ofGetWidth()/2,-ofGetHeight()/1.25,0);  
  
  
       tableModel.draw();  
         glPopMatrix();  
  
         glPushMatrix();  
  
        glTranslatef(ofGetWidth()/2,ofGetHeight()/1.15,0);  
       glRotatef(-qMouseY,1,0,0);  
        glRotatef(qMouseX,0,1,0);  
      teaModel.setRotation(0, 90, 1, 0, 0);  
    teaModel.setRotation(1, 270, 0, 0, 1);  
        glTranslatef(-ofGetWidth()/2,-ofGetHeight()/1.15,0);  
        teaModel.draw();  
         glPopMatrix();  
         glPushMatrix();  
        glTranslatef(ofGetWidth()/2,ofGetHeight()/1.25,0);  
        glRotatef(-pMouseY,1,0,0);  
        glRotatef(pMouseX,0,1,0);  
      teapotModel.setRotation(0, 90, 1, 0, 0);  
    teapotModel.setRotation(1, 270, 0, 0, 1);  
        glTranslatef(-ofGetWidth()/2,-ofGetHeight()/1.25,0);  
        teapotModel.draw();  
         glPopMatrix();  
         glPushMatrix();  
        glTranslatef(ofGetWidth()/2,ofGetHeight()/1.25,0);  
        glRotatef(-rMouseY,1,0,0);  
        glRotatef(rMouseX,0,1,0);  
      plateModel.setRotation(0, 90, 1, 0, 0);  
    plateModel.setRotation(1, 270, 0, 0, 1);  
        glTranslatef(-ofGetWidth()/2,-ofGetHeight()/1.25,0);  
        plateModel.draw();  
         glPopMatrix();  
         glPushMatrix();  
        glTranslatef(ofGetWidth()/2,ofGetHeight()/1.25,0);  
        //tumble according to mouse  
        glRotatef(-sMouseY,1,0,0);  
        glRotatef(sMouseX,0,1,0);  
      spoonModel.setRotation(0, 90, 1, 0, 0);  
    spoonModel.setRotation(1, 270, 0, 0, 1);  
        glTranslatef(-ofGetWidth()/2,-ofGetHeight()/1.25,0);  
        spoonModel.draw();  
         glPopMatrix();  
    glPopMatrix();  
  
}  

to interact with the models that I have created ?