"Present" (full-screen mode) stretched across Multiple Screens
in
Contributed Library Questions
•
1 year ago
Anyone Know how this should be done....?????\\\
this is my code
import SimpleOpenNI.*;
import processing.opengl.*;
import saito.objloader.*;
SimpleOpenNI kinect;
//---FullScreen fs;
//declare object called model
OBJModel model;
float rotX;
float rotY;
float rotZ;
void setup()
{
size(1200, 1200, OPENGL);
smooth();
// Create the fullscreen object
//--- fs = new FullScreen(this);
// enter fullscreen mode
//--- fs.enter();
frameRate(30);//change
model = new OBJModel(this, "thing_again_blender1_toMeshlab.obj", "relative", TRIANGLES);
model.load("thing_again_blender1_toMeshLab.obj");
stroke(255);
model.enableDebug();
model.scale(300);
model.translateToCenter();//change
noStroke();
kinect = new SimpleOpenNI(this);
kinect.enableDepth();
kinect.enableUser(SimpleOpenNI.SKEL_PROFILE_NONE);
}
void draw()
{
background(0);
lights();
//model.draw
kinect.update();
IntVector userList = new IntVector();
kinect.getUsers(userList);
for (int i=0; i<userList.size(); i++) {
int userId = userList.get(i);
PVector userposition = new PVector();
kinect.getCoM(userId, userposition);
PVector modelrotation = new PVector(userposition.x,userposition.y,userposition.z);
//float angle = acos(modelrotation.dot(userposition));
//PVector axis = modelrotation.cross(userposition); ---> for a neat glitch, turn on!
pushMatrix();
translate(screen.width/2, screen.height/2, 0);
rotateX(radians(rotX));
rotateY(radians(modelrotation.y));
rotateZ(radians(rotZ));
model.draw();
popMatrix();
}
1