MyObject b = new MyObject(); //create an object void setup(){ size(500,500, P3D); //setup the screen camera(-100,100,-100,0,0,0,0,0,1); //get a viewpoint } void draw(){ b.draw3(); //draw the object } void mousePressed(){ b.pick(mouseX,mouseY); //see if the mouse can pick }