Processing Forum
- void draw() {
- strokeWeight(8);
- //println(frameRate);
- background(0);
- kinect.update();
- PImage rgbImage = kinect.rgbImage();
- //pushMatrix();
- translate(width/2, height/2, -1000);
- rotateX(radians(180));
- translate(0, 0, 1000);
- rotateY(radians(map(mouseX, 0, width, -180, 180)));
- stroke(255);
- PVector[] depthPoints = kinect.depthMapRealWorld();
- for (int i = 0; i < depthPoints.length; i+=10) {
- PVector currentPoint = depthPoints[i];
- point(currentPoint.x, currentPoint.y, currentPoint.z);
- }
- translate(boxCenter.x, boxCenter.y, boxCenter.z);
- stroke(255, 0, 0);
- noFill();
- box(boxSize);
- //popMatrix();
- }