当前位置: 首页>>代码示例>>C++>>正文


C++ TuioObject::getTuioTime方法代码示例

本文整理汇总了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;
}
开发者ID:030ii,项目名称:Multitouch-Hockey-Game,代码行数:9,代码来源:TuioManager.cpp

示例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;
}
开发者ID:nixz,项目名称:covise,代码行数:57,代码来源:TuioServer.cpp

示例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++;
	}
}
开发者ID:030ii,项目名称:Multitouch-Hockey-Game,代码行数:11,代码来源:TuioManager.cpp

示例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;
		}
	}
}
开发者ID:Ahmedn1,项目名称:ccv-hand,代码行数:12,代码来源:TuioServer.cpp

示例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;
		}
	}
}
开发者ID:030ii,项目名称:Multitouch-Hockey-Game,代码行数:15,代码来源:TuioManager.cpp


注:本文中的TuioObject::getTuioTime方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。