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


C++ UserGenerator::GetTimestamp方法代码示例

本文整理汇总了C++中UserGenerator::GetTimestamp方法的典型用法代码示例。如果您正苦于以下问题:C++ UserGenerator::GetTimestamp方法的具体用法?C++ UserGenerator::GetTimestamp怎么用?C++ UserGenerator::GetTimestamp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在UserGenerator的用法示例。


在下文中一共展示了UserGenerator::GetTimestamp方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: startRecord

static inline void startRecord(){
	actionStartTime = g_user.GetTimestamp();
	rawDatas.clear();
	takeFrame();
}
开发者ID:nwoedf,项目名称:Chinese-Sign-Language-Recognition-and-Translation-System,代码行数:5,代码来源:UserRecorderProductor.cpp

示例2: updateRecognizeRecord

void updateRecognizeRecord(){
	//printf("2. Start Update Skeleton Thread\n");
	fflush(stdout);

	printf("State: %d, DataSize: %d\n", recordState, rawDatas.size());
	switch(recordState){
	case WAIT_TRACING:
		{
			if(g_user.GetSkeletonCap().IsTracking(g_userID)){
				notifyStateChanged(recordState = WAIT_READY);
				//printf("Current State : WAIT READY <- WAIT TRACING\n");
			}

			break;
		}
	case WAIT_READY:
		{
			g_motor.ChangeLED(KinectDevice::LED_BLINK_YELLOW);
			updateHandPosition();

			if(isReadyPose()){
				recordState = WAIT_MOVING;
				//printf("Current State : WAIT MOVING <- WAIT READY\n");
			}

			break;
		}
	case WAIT_MOVING:
		{
			static int stopFrame = 0;
			g_motor.ChangeLED(KinectDevice::LED_BLINK_RED_YELLOW);
			updateHandPosition();

			if(isMoving()){
				stopFrame = 0;
				notifyStateChanged(recordState = TAKING_RECORD);
				startRecord();

				printf("Current State : TAKING RECORD <- WAIT MOVING\n");				
			}else{
				stopFrame++;
				if(stopFrame > MAX_STOP_FRAME){
					stopFrame = 0;
					endRecord();
					notifySentenceCompleted();
				}else{
					takeFrame();
				}
			}
			break;
		}
	case TAKING_RECORD:
		{
			g_motor.ChangeLED(KinectDevice::LED_BLINK_GREEN);
			actionStartTime = 0;
			updateHandPosition();

			if(isReadyPose()){
				if(!isMoving()){
					//notifyStateChanged(recordState = WAIT_READY);
					recordState = WAIT_READY;

					printf("Frame Recorded: %u, Time used: %llu\n", rawDatas.size(), g_user.GetTimestamp()-actionStartTime);
					actionEndClearUp();
					actionStartTime = 0;
					printf("Current State : WAIT READY <- TAKING RECORD\n");					
				}else{
					takeFrame();

					printf("READY AND MOVING\n");
				}
			}else{
				takeFrame();

				if(!isMoving()){
					printf("NOT READY AND NOT MOVING\n");
				}		
			}
			break;
		}
	}

	//printf("2. End Update Skeleton Thread, User Frame: %llu\n", g_user.GetTimestamp());
	fflush(stdout);
}
开发者ID:nwoedf,项目名称:Chinese-Sign-Language-Recognition-and-Translation-System,代码行数:85,代码来源:UserRecorderProductor.cpp


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