本文整理汇总了C++中TuioObject::getTuioTime方法的典型用法代码示例。如果您正苦于以下问题:C++ TuioObject::getTuioTime方法的具体用法?C++ TuioObject::getTuioTime怎么用?C++ TuioObject::getTuioTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TuioObject
的用法示例。
在下文中一共展示了TuioObject::getTuioTime方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
std::list<TuioObject*> TuioManager::getUntouchedObjects() {
std::list<TuioObject*> untouched;
for (std::list<TuioObject*>::iterator tuioObject = objectList.begin(); tuioObject!=objectList.end(); tuioObject++) {
TuioObject *tobj = (*tuioObject);
if (tobj->getTuioTime()!=currentFrameTime) untouched.push_back(tobj);
}
return untouched;
}
示例2: commitFrame
void TuioServer::commitFrame()
{
if (updateCursor)
{
startCursorBundle();
for (std::list<TuioCursor *>::iterator tuioCursor = cursorList.begin(); tuioCursor != cursorList.end(); tuioCursor++)
{
// start a new packet if we exceed the packet capacity
if ((oscPacket->Capacity() - oscPacket->Size()) < CUR_MESSAGE_SIZE)
{
sendCursorBundle(currentFrame);
startCursorBundle();
}
TuioCursor *tcur = (*tuioCursor);
if ((full_update) || (tcur->getTuioTime() == currentFrameTime))
addCursorMessage(tcur);
}
sendCursorBundle(currentFrame);
}
else if ((!periodic_update) && (lastCursorUpdate < currentFrameTime.getSeconds()))
{
lastCursorUpdate = currentFrameTime.getSeconds();
startCursorBundle();
sendCursorBundle(currentFrame);
}
updateCursor = false;
if (updateObject)
{
startObjectBundle();
for (std::list<TuioObject *>::iterator tuioObject = objectList.begin(); tuioObject != objectList.end(); tuioObject++)
{
// start a new packet if we exceed the packet capacity
if ((oscPacket->Capacity() - oscPacket->Size()) < OBJ_MESSAGE_SIZE)
{
sendObjectBundle(currentFrame);
startObjectBundle();
}
TuioObject *tobj = (*tuioObject);
if ((full_update) || (tobj->getTuioTime() == currentFrameTime))
addObjectMessage(tobj);
}
sendObjectBundle(currentFrame);
}
else if ((!periodic_update) && (lastObjectUpdate < currentFrameTime.getSeconds()))
{
lastObjectUpdate = currentFrameTime.getSeconds();
startObjectBundle();
sendObjectBundle(currentFrame);
}
updateObject = false;
}
示例3: removeUntouchedStoppedObjects
void TuioManager::removeUntouchedStoppedObjects() {
std::list<TuioObject*>::iterator tuioObject = objectList.begin();
while (tuioObject!=objectList.end()) {
TuioObject *tobj = (*tuioObject);
if ((tobj->getTuioTime()!=currentFrameTime) && (!tobj->isMoving())) {
removeTuioObject(tobj);
tuioObject = objectList.begin();
} else tuioObject++;
}
}
示例4: removeUntouchedStoppedObjects
void TuioServer::removeUntouchedStoppedObjects() {
for (std::list<TuioObject*>::iterator tuioObject = objectList.begin(); tuioObject!=objectList.end(); tuioObject++) {
TuioObject *tobj = (*tuioObject);
if ((tobj->getTuioTime()!=currentFrameTime) && (!tobj->getTuioState()==TUIO_ADDED) && (!tobj->isMoving())) {
removeTuioObject(tobj);
removeUntouchedStoppedObjects();
break;
}
}
}
示例5: stopUntouchedMovingObjects
void TuioManager::stopUntouchedMovingObjects() {
std::list<TuioObject*> untouched;
for (std::list<TuioObject*>::iterator tuioObject = objectList.begin(); tuioObject!=objectList.end(); tuioObject++) {
TuioObject *tobj = (*tuioObject);
if ((tobj->getTuioTime()!=currentFrameTime) && (tobj->isMoving())) {
tobj->stop(currentFrameTime);
updateObject = true;
if (verbose)
std::cout << "set obj " << tobj->getSymbolID() << " (" << tobj->getSessionID() << ") "<< tobj->getX() << " " << tobj->getY() << " " << tobj->getAngle()
<< " " << tobj->getXSpeed() << " " << tobj->getYSpeed() << " " << tobj->getRotationSpeed() << " " << tobj->getMotionAccel() << " " << tobj->getRotationAccel() << std::endl;
}
}
}