예제 #1
0
파일: testApp.cpp 프로젝트: ARTSAT/INVADER
//--------------------------------------------------------------
void testApp::setup()
{ 
	ofEnableSmoothing(); 
	ofBackground(0); 
	
	setGUI1(); 
	setGUI2(); 
    setGUI3(); 
    setGUI4();     

    gui1->setDrawBack(false);
    gui2->setDrawBack(false);
    gui3->setDrawBack(false);
    gui4->setDrawBack(false);    

//    gui1->setDrawBack(true);
//    gui2->setDrawBack(true);
//    gui3->setDrawBack(true);
//    gui4->setDrawBack(true);    
    
//    gui1->setDrawPadding(false);
//    gui2->setDrawPadding(false);
//    gui3->setDrawPadding(false);
//    
    ofBackground(red, green, blue); 
}
예제 #2
0
//--------------------------------------------------------------
void testApp::setup()
{
    ofSetFrameRate(60);
	ofEnableSmoothing(); 
	ofBackground(0); 
	
	setGUI1(); 
	setGUI2(); 
    setGUI3(); 
    setGUI4();     

    gui1->setDrawBack(false);
    gui2->setDrawBack(false);
    gui3->setDrawBack(false);
    gui4->setDrawBack(false);    

//    gui1->setDrawBack(true);
//    gui2->setDrawBack(true);
//    gui3->setDrawBack(true);
//    gui4->setDrawBack(true);    
    
//    gui1->setDrawPadding(false);
//    gui2->setDrawPadding(false);
//    gui3->setDrawPadding(false);
//    
    ofBackground(red, green, blue);
    
    sender.setup(HOST, PORT);
    receiver.setup(PORT_FROM_VIZ);
}
예제 #3
0
파일: ofApp.cpp 프로젝트: Aharobot/ofxUI
//--------------------------------------------------------------
void ofApp::setup(){
	
    ofSetCircleResolution(120);
    red = 233; blue = 233; green = 233;
    hideGUI = false;
    bdrawGrid = false;
	bdrawPadding = false;

    ddl = NULL;
    textInput = NULL;
    img = new ofImage();
    img->loadImage("nerd_me.png");
    buffer = new float[256];
    for(int i = 0; i < 256; i++) { buffer[i] = ofNoise(i/100.0); }
    
	setGUI1();
	setGUI2();
    setGUI3();
    setGUI4();
    setGUI5();
    
    gui1->loadSettings("gui1Settings.xml");
    gui2->loadSettings("gui2Settings.xml");
    gui3->loadSettings("gui3Settings.xml");
    gui4->loadSettings("gui4Settings.xml");
    gui5->loadSettings("gui5Settings.xml");
}
//--------------------------------------------------------------
void testApp::setup(){

    ofSetLogLevel(OF_LOG_VERBOSE);

    sender.setup(HOST, PORT);

    setGUI1(); 

    serial.listDevices();
	vector <ofSerialDeviceInfo> deviceList = serial.getDeviceList();
		
	serial.setup(5, 9600); //open the 5th in list
	//serial.setup("COM4"); // windows example
	//serial.setup("/dev/tty.usbserial-A4001JEC",9600); // mac osx example
    
    Logo.loadImage("logo.png");
    diagram.loadImage("diagram.png");
    table.loadModel("table3.obj");
    A0.loadModel("arrows/0.obj");
    A45.loadModel("arrows/45.obj");
    A90.loadModel("arrows/90.obj");
    A135.loadModel("arrows/135.obj");
    A180.loadModel("arrows/180.obj");
    A225.loadModel("arrows/225.obj");
    A270.loadModel("arrows/270.obj");
    A225.loadModel("arrows/225.obj");
    A315.loadModel("arrows/315.obj");
    cam.setDistance(1200);
    ofSetBackgroundColor(0, 0, 0);

}
예제 #5
0
void GameConfig::setCurrentPanel(ePanel panel) {
	switch(panel) {
		case PANEL_GAME:
			setGUI1();
			break;
		case PANEL_PLAYERS:
			setGUI2();
			break;
	}
	
	currentPanel = panel;
}
예제 #6
0
파일: testApp.cpp 프로젝트: ARTSAT/INVADER
//--------------------------------------------------------------
void testApp::setup()
{ 
//	ofEnableSmoothing(); 
	ofBackground(0); 
	
	setGUI1(); 
	setGUI2(); 
    setGUI3(); 
	ofBackground(red, green, blue); 
    gui1->loadSettings("GUI/guiSettings.xml"); 
    gui2->loadSettings("GUI/guiSettings2.xml"); 
    gui3->loadSettings("GUI/guiSettings3.xml");     
    
}
예제 #7
0
void testApp::setup() {
	ofEnableAlphaBlending();
    ofSetVerticalSync( ( true ) );
    ofSetFrameRate(30);
	ofBackground(4, 5, 6);
    ofSetLogLevel(OF_LOG_VERBOSE);
    cameraOne = ofxEdsdk::Camera::getInstance();
    setGUI1();
    bSetup = false;
    
    //mClient = new ofxClientOSCManager();
    //mClient->init();
    
    //mTime = mClient->getCommonTimeOscObj();
}
예제 #8
0
파일: testApp.cpp 프로젝트: Giladx/lpmt_gui
//--------------------------------------------------------------
void testApp::setup(){

    host = "localhost";
    port = 12345;


    // gui variables
    activeQuad = 3;

    isOn = true;
    useTimeline = false;
    timelineDurationSeconds = 10.0;
    bTimelineColor = false;
    bTimelineAlpha = false;
    bTimelineSlideChange = false;
    imgBg = false;
    imgMultX = 1.0;
    imgMultY = 1.0;
    imgHFlip = false;
    imgVFlip = false;
    imgColorize.r = 1.0;
    imgColorize.g = 1.0;
    imgColorize.b = 1.0;
    imgColorize.a = 1.0;
    colorBg = false;
    bgColor.r = 0.0;
    bgColor.g = 0.0;
    bgColor.b = 0.0;
    bgColor.a = 0.0;
    transBg = false;
    secondColor.r = 0.0;
    secondColor.g = 0.0;
    secondColor.b = 0.0;
    secondColor.a = 0.0;
    transDuration = 1.0;
    bBlendModes = false;

    // open an outgoing connection to HOST:PORT
	guiOscSender.setup( host, port );

	setGUI1();
    ofBackground(150,150,150);


}
예제 #9
0
//--------------------------------------------------------------
void myGUI::buildGUI(int & i){
    
    if (gui1 != NULL && gui2 != NULL && gui3 != NULL) {
        exit();
    }
    
    // setup GUI
    setGUI1();
    setGUI2();
    setGUI3();
    
    gui1->setDrawBack(false);
    gui2->setDrawBack(false);
    gui3->setDrawBack(false);
    
    if (appName != "left") {
        gui1->toggleVisible();
        gui2->toggleVisible();
        gui3->toggleVisible();
    }
    printf("build GUI\n");
}
예제 #10
0
파일: ofApp.cpp 프로젝트: Aharobot/ofxUI
//--------------------------------------------------------------
void ofApp::setup(){
	
    red = 233; blue = 52; green = 27;
    hideGUI = false;
    bdrawGrid = false;
	bdrawPadding = false;
    
    img = new ofImage();
    img->loadImage("nerd_me.png");
    buffer = new float[256];
    for(int i = 0; i < 256; i++) { buffer[i] = ofNoise(i/100.0); }
    
	setGUI1();
	setGUI2();
    setGUI3();
    setGUI4();
    setGUI5();
    
    gui1->loadSettings("gui1.xml");
    gui2->loadSettings("gui2.xml");
    gui3->loadSettings("gui3.xml");
    gui4->loadSettings("gui4.xml");
    gui5->loadSettings("gui5.xml");
}
예제 #11
0
//--------------------------------------------------------------
void testApp::setup(){
    
	ofSetVerticalSync(true);
	ofSetFrameRate(60);
	ofEnableSmoothing();
	ofBackground(0);
    
    /*------------------ SYPHON ------------------*/
//	syphon.setName("ciel_etoile");
    individualTextureSyphonServer.setName("Texture Output");
	mClient.setup();
    mClient.set("","Simple Server");
    /*--------------------------------------------*/

    
    /*-------------------- FBO -------------------*/
    fbo.allocate(ofGetWidth(), ofGetHeight(), GL_RGBA);
    fbo.begin();
    ofClear(0);
    fbo.end();
    /*---------------------------------------------*/
    
    /*------------------- WI-FLY ------------------*/
    //create the socket and bind to port 11999
	udpConnection.Create();
	udpConnection.Bind(11999);
	udpConnection.SetNonBlocking(true);
    /*---------------------------------------------*/

    /*-------------------- FOG --------------------*/
    //    fogMovie.loadMovie("movies/fog.mov");
    fogMovie.loadMovie("movies/smoke_duck.mp4");
	fogMovie.play();
    //    fogMovie.setLoopState();
    videoAlpha = 100;
    /*---------------------------------------------*/
    
    /*------------------- SOUND -------------------*/
    soundStream.listDevices();
  	soundStream.setDeviceID(2);
    
    //soundstream setup
    soundStream.setup(this, 0, 2, 44100, BUFFER_SIZE, 4);
    
	FFTanalyzer.setup(44100, BUFFER_SIZE/2, 2);
	
	FFTanalyzer.peakHoldTime = 15; // hold longer
	FFTanalyzer.peakDecayRate = 0.95f; // decay slower
	FFTanalyzer.linearEQIntercept = 0.9f; // reduced gain at lowest frequency
	FFTanalyzer.linearEQSlope = 0.01f; // increasing gain at higher frequencies
    /*---------------------------------------------*/
    
    
    /*----------------- PARTICLES -----------------*/
    modes.push_back("static");
    modes.push_back("walk");
    modes.push_back("fuzz");
    selectedMode = modes[2];
    
    shapes.push_back("circle");
    shapes.push_back("spiral");
    shapes.push_back("star");
    shapes.push_back("grid");
    selectedShape = shapes[0];
    
    expansion = 0;
    rotation = 0;
    shapeSize = ofGetHeight()/2 - 100;
    particleSize = 1;
    nVertices = 1;
    
    particleGUImode = true;
    
    for(int i=0; i < NUM_PARTICLES; i++){
        Particle thisParticle;
        thisParticle.init(NUM_PARTICLES, i, shapeSize, particleSize, selectedShape);
        myParticles.push_back(thisParticle);
    }
    /*---------------------------------------------*/
    
    
    /*---------------- BACKGROUND -----------------*/
	tileModes.push_back("3D");
	tileModes.push_back("fragments");
	tileModes.push_back("rotation");
    selectedTileMode = tileModes[0];
    
    int nTiles = int(ofGetWidth()/40) *  int(ofGetHeight()/40);
    int i = 0;
	for (int gridY=0; gridY <= ofGetHeight(); gridY += 40) {
		for (int gridX=0; gridX <= ofGetWidth(); gridX+= 40) {
			Tiles thisTile;
			thisTile.setup(nTiles, i, selectedTileMode, gridX, gridY);
			myTiles.push_back(thisTile);
            //            cout << gridX << endl;
            i++;
		}
	}
    /*---------------------------------------------*/
    
    setGUI1();
    setGUI2();
    
}