Ejemplo n.º 1
0
void testApp::tuioUpdated(ofxTuioObject &tuioObject){
	//cout << "TUIO object " << tuioObject.getFiducialId() << " updated at angle " << tuioObject.getAngle()<< " x= " << tuioObject.getXpos() <<endl;
	int sel;
	switch (tuioObject.getFiducialId()) {
		case 17:
			sel=1; //selection = 1;
			theScenes[sel-1]->setRotation(tuioObject.getAngle());
			theScenes[sel-1]->setTargetLocPct(tuioObject.getXpos(), tuioObject.getYpos());
			break;
		case 14:
			sel=2; //selection = 2;
			theScenes[sel-1]->setRotation(tuioObject.getAngle());
			theScenes[sel-1]->setTargetLocPct(tuioObject.getXpos(), tuioObject.getYpos());
			break;
		default:
			break;
	}

}
Ejemplo n.º 2
0
void testApp::tuioUpdated(ofxTuioObject &tuioObject){
	//cout << "TUIO object " << tuioObject.getFiducialId() << " updated at angle " << tuioObject.getAngle()<< " x= " << tuioObject.getXpos() <<endl;
	
	switch (tuioObject.getFiducialId()) {
		case 12:
			selection = 5;
			theVideos[selection-1]->setRotation(tuioObject.getAngle());
			theVideos[selection-1]->setTargetLocPct(tuioObject.getXpos(), tuioObject.getYpos());
			break;
        case 15:
			selection = 6;
			theVideos[selection-1]->setRotation(tuioObject.getAngle());
			theVideos[selection-1]->setTargetLocPct(tuioObject.getXpos(), tuioObject.getYpos());
			break;
		case 16:
			selection = 1;
			theVideos[selection-1]->setRotation(tuioObject.getAngle());
			theVideos[selection-1]->setTargetLocPct(tuioObject.getXpos(), tuioObject.getYpos());
			break;
		case 17:
			selection = 2;
			theVideos[selection-1]->setRotation(tuioObject.getAngle());
			theVideos[selection-1]->setTargetLocPct(tuioObject.getXpos(), tuioObject.getYpos());
			break;
        case 18:
			selection = 3;
			theVideos[selection-1]->setRotation(tuioObject.getAngle());
			theVideos[selection-1]->setTargetLocPct(tuioObject.getXpos(), tuioObject.getYpos());
			break;
        case 19:
			selection = 4;
			theVideos[selection-1]->setRotation(tuioObject.getAngle());
			theVideos[selection-1]->setTargetLocPct(tuioObject.getXpos(), tuioObject.getYpos());
        
		default:
			break;
	}
	if (selection != prevselection) {
		//update all the videos as to the selection state 
		for (int i=0; i < NUMOFCLIPS; i++) {
			if (i+1 != selection) {
				theVideos[i]->setSelected(false);
			}else {
				theVideos[i]->setSelected(true);
			}
		}
		prevselection = selection;
	}
}