void display(void) { Matrix m1, m2, m3; Quaternion q1; #ifdef PAR_SCHEDULER if(pVSCThread == NULL) { pVSCThread = ExternalThread::find("VSCScheduler"); } VSC::VSCScheduler::the()->enterSyncBarrier(2); pVSCThread->getChangeList()->applyToCurrent(); pVSCThread->getChangeList()->clearAll(); // VSC::vsc_sleep(100); VSC::VSCScheduler::the()->enterSyncBarrier(2); #endif // tball.getRotation().getValue(m3); // q1.setValue(m3); // m1.setRotate(q1); // cout << "TBROT" << endl << tball.getRotation() << endl; // cout << "M3" << endl << m3 << endl; // cout << "Q1" << endl << q1 << endl; // cout << "M1" << endl << m1 << endl; // m1.setRotate( tball.getRotation() ); // m2.setTranslate( tball.getPosition() ); //cout << "Pos: " << tball.getPosition() << ", Rot: " << tball.getRotation() << endl; // cout << tball.getRotation() << endl; // m1.mult( m2 ); cam_trans->getSFMatrix()->setValue(tball.getFullTrackballMatrix()); /* fprintf(stderr, "%d %d %d %d | %d | %d\r", glutGet(GLUT_WINDOW_RED_SIZE), glutGet(GLUT_WINDOW_GREEN_SIZE), glutGet(GLUT_WINDOW_BLUE_SIZE), glutGet(GLUT_WINDOW_ALPHA_SIZE), glutGet(GLUT_WINDOW_DEPTH_SIZE), glutGet(GLUT_WINDOW_STENCIL_SIZE)); */ win->draw( ract ); }
void display(void) { m1c = tball.getFullTrackballMatrix(); if(move_obj == true) { scene_trans->editSFMatrix()->setValue( m1c ); } else { cam_trans->editSFMatrix()->setValue( m1c ); } commitChanges(); win->render(rentravact); }