예제 #1
0
//--------------------------------------------------------------
void ofApp::setup()
{
    ofEnableAlphaBlending();
    //ofSetLogLevel(OF_LOG_VERBOSE);

    // call setup methods
    setupKinect();
    setupOpenCv();
    cvfilter.setup(kinect.width, kinect.height, WIDTH, HEIGHT);
    //cvfilter.startThread();

    smoke.setup(WIDTH, HEIGHT);
    /*
      for (int i = 4; i < WIDTH; i += 100){
      smoke.addSmokePoint(ofPoint(i, 0), ofFloatColor(0.5, 0.1, 0.0));
      }
    */
    for (int i = 100; i < 701; i += (600/8.0))
    {
        smoke.addSmokePoint(ofPoint(WIDTH, i), ofFloatColor(0.6, 0.1, 0.0));
    }

    // debug HUD boolean
    showDebugVideo = false;
    showDebug = false;

    //kinect.setCameraTiltAngle(9.0);
    //kinect.setCameraTiltAngle(-8.0);
    angle = 4;
    kinect.setCameraTiltAngle(angle);

    oscSender.setup("localhost", 5001);

    /// DMX stuff

    dmxLightsAndSmokeModules = 1;
    dmxLightsAndSmokeChannelsPerModule = 4;
    dmxPort = "/dev/ttyUSB0";
    dmxLightsAndSmokeMessage.resize(dmxLightsAndSmokeModules * dmxLightsAndSmokeChannelsPerModule, 0);
    for (unsigned int i = 0; i < dmxLightsAndSmokeMessage.size(); i++)
    {
        dmxLightsAndSmokeMessage[i] = 0;
    }
    //dmxLightsAndSmoke.connect(dmxPort, dmxLightsAndSmokeModules * dmxLightsAndSmokeChannelsPerModule);
    dmxLightsAndSmoke.connect(0, dmxLightsAndSmokeModules * dmxLightsAndSmokeChannelsPerModule);
    dmxLightsAndSmoke.update(true);

    dmxLightsAndSmokeTimer = -1;
    isDmxLightAndSmokeTimerStarted = false;

    if (dmxLightsAndSmoke.isConnected())
    {
        cout << "DMX!!!!!!!!" << endl;
    }
}
예제 #2
0
//--------------------------------------------------------------
void testApp::setup(){
	
	setupOsc();
	setupKinect();
	setupGraphics();
	mode = Donk::Mode::getInstance();
	// default starting mode
	nextMode = "buzz";
	mode->setMode(nextMode);

}
예제 #3
0
//--------------------------------------------------------------
void kinectUIApp::setup(){
    ofSetWindowTitle("kinectUI");
	ofSetLogLevel(OF_LOG_VERBOSE);
	ofSetFrameRate(60);
	ofEnableAlphaBlending();
	ofEnableSmoothing();

    setupUIApp();

    flip_kinect = false;
    setupKinect();
    setupUIKinect();
}