本文整理汇总了C++中ofxTuioCursor::getMotionAccel方法的典型用法代码示例。如果您正苦于以下问题:C++ ofxTuioCursor::getMotionAccel方法的具体用法?C++ ofxTuioCursor::getMotionAccel怎么用?C++ ofxTuioCursor::getMotionAccel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ofxTuioCursor
的用法示例。
在下文中一共展示了ofxTuioCursor::getMotionAccel方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: tuioUpdated
void electromagnetica::tuioUpdated(ofxTuioCursor &tuioCursor){
int mx = W_WIDTH*tuioCursor.getX();
int my = W_HEIGHT*tuioCursor.getY();
hands.notifySlide(mx, my,tuioCursor.getSessionId(),tuioCursor.getMotionAccel());
wavesm.slide(mx, my,tuioCursor.getSessionId(),tuioCursor.getMotionAccel());
// updateMagneticField(100,mx,my);
}
示例2: tuioUpdated
void menu::tuioUpdated(ofxTuioCursor &tuioCursor){
// int mx = W_WIDTH*tuioCursor.getX();
//// int mx = W_WIDTH*(tuioCursor.getX()+0.5);
// int my = W_HEIGHT*tuioCursor.getY();
// ofPoint loc = ofPoint(mx,my);
ofPoint loc = transf_PosTUIO(tuioCursor);
// cout << "Point n" << tuioCursor.getSessionId() << " updated at " << loc << endl;
hands.notifySlide(loc.x, loc.y, tuioCursor.getSessionId(),tuioCursor.getMotionAccel());
// touchElements.notifySlide(loc.x, loc.y,tuioCursor.getSessionId(),tuioCursor.getMotionAccel());
}
示例3: tuioUpdated
void testApp::tuioUpdated(ofxTuioCursor &tuioCursor){
ofLog()<< "tuioUpdated" << endl;
int mx = W_WIDTH*tuioCursor.getX();
int my = W_HEIGHT*tuioCursor.getY();
ofPoint loc = ofPoint(tuioCursor.getX()*W_WIDTH,tuioCursor.getY()*W_HEIGHT);
//cout << "Point n" << tuioCursor.getSessionId() << " updated at " << loc << endl;
//o1.slide(loc.x, loc.y,tuioCursor.getSessionId(),tuioCursor.getMotionAccel());
// h1.slide(loc.x, loc.y,tuioCursor.getSessionId(),tuioCursor.getMotionAccel());
touchElements.notifySlide(loc.x, loc.y,tuioCursor.getSessionId(),tuioCursor.getMotionAccel());
puntoX=tuioCursor.getX();
puntoY=tuioCursor.getY();
cout << tuioCursor.getX() << endl;
}
示例4: cursorUpdated
// FINGER UPDATED //////////////////////////////////////////////////////
void testApp::cursorUpdated(ofxTuioCursor & tuioCursor)
{
int finger_id = tuioCursor.getFingerId();
pos.x = wFbo * tuioCursor.getX();
pos.y = hFbo * tuioCursor.getY();
int x_speed = tuioCursor.getXSpeed();
int y_speed = tuioCursor.getYSpeed();
int motion_speed = tuioCursor.getMotionSpeed();
int motion_accel = tuioCursor.getMotionAccel();
for (list<Finger*>::iterator it=dito_list.begin(); it !=dito_list.end(); ++it)
{
if ( (*it)->get_finger_id() == finger_id)
{
(*it)->update_interrupt(&pos);
break;
}
}
}