public void setup() { context = new SimpleOpenNI(this); // mirror is by default enabled context.setMirror(true); // enable depthMap generation context.enableDepth(); // enable the hands + gesture context.enableGesture(); context.enableHands(); // setup NITE sessionManager = context.createSessionManager("Click,Wave", "RaiseHand"); pointDrawer = new PointDrawer(); flowRouter = new XnVFlowRouter(); flowRouter.SetActive(pointDrawer); sessionManager.AddListener(flowRouter); size(context.depthWidth(), context.depthHeight()); smooth(); }
public void keyPressed() { switch (key) { case 'e': // end sessions sessionManager.EndSession(); println("end session"); break; } }