Controlling multiple objects with mouse

Hi guys I was just wondering how you would go about controlling mulitple objects seperately via mouse so far the only luck I’ve had has been controlling the objects simultaneously as shown in this code

  
glTranslatef(ofGetWidth()/2,ofGetHeight()/1.25,0);  
        glRotatef(-mouseY,1,0,0);  
        glRotatef(mouseX,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(-mouseY,1,0,0);  
        glRotatef(mouseX,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(-mouseY,1,0,0);  
        glRotatef(mouseX,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();  

Not sure what exactly is it that you want to accomplish?
Please be more specific and elaborate.

I’m working within a virtual kitchen environment and I want the user to individually be able to interact with the 3d objects within the scene. At this point in time I am able to interact with the objects collectively under a mouseX and mouseY format but its one big mess

OK I think I understand. And, under what condition do you want to stop interacting with one object and start interacting with another one?

possible a grab or mouse presssed function, in later stages ideally want to have the kinect interacting with the objects rather than the mouse