buffering PVector from kinect and controlp5 issues
in
Contributed Library Questions
•
11 months ago
I'm having two issues:
for some reason controlp5 looks really small in the sketch (assuming I have to set the z-axis somehow? but setPosition doesn't seem to take a Z axis)
I would like to know what to read up on to "buffer" (if thats what you would even call it) 10 frames of PVector. I am not even sure what it is other than what this book is calling a vector. But could I push this to a class? is it an array object? I really don't know what I'm working with so no idea how I would store it :(
- import processing.opengl.*;
- import SimpleOpenNI.*;
- SimpleOpenNI kinect;
- import controlP5.*;
- ControlP5 cp5;
- int sliderValue = 180;
- void setup(){
- size(1024, 768, OPENGL);
- kinect = new SimpleOpenNI(this);
- kinect.enableDepth();
- cp5 = new ControlP5(this);
- cp5.addSlider("sliderValue")
- .setPosition(10,10)
- .setRange(0,180)
- ;
- }
- void draw(){
- background(0);
- kinect.update();
- translate(width/2, height/2, -1000);
- rotate(radians(sliderValue));
- stroke(255);
- PVector[] depthPoints = kinect.depthMapRealWorld();
- for(int i = 0; i < depthPoints.length; i++){
- PVector currentPoint = depthPoints[i];
- point(currentPoint.x, currentPoint.y, currentPoint.z);
- }
- }
this is what I'm getting:
1