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


C++ ofVideoPlayer::setPosition方法代码示例

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


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

示例1: mousePressed

//--------------------------------------------------------------
void testApp::mousePressed(int x, int y, int button){
	if( mode == "edit" ){
		for(int i = 0; i < thumbs.size(); i++){
			if(thumbs[i].r.inside(x,y)){
				mode = "full";
				selected = i;
				fullVid.loadMovie(thumbs[i].video);
				fullVid.setPosition(thumbs[i].pos);
				fullVid.update();
				break;
			}
		}
	}
	else if(mode == "full" ){
		thumbs[selected].pos = ofMap(x, 0, ofGetWidth(), 0, 0.9999, true);
		fullVid.setPosition(thumbs[selected].pos);
		fullVid.update();	
		bDown = true;			
	}

	if( mode == "move" ){
		for(int i = 0; i < thumbs.size(); i++){
			if(thumbs[i].r.inside(x,y)){
				selected = i;
				bDown = true;
				break;
			}
		}
		placedIndex = selected;
	}
	
}
开发者ID:Giladx,项目名称:autoMovie,代码行数:33,代码来源:testApp.cpp

示例2: nextVideo

void nextVideo(){
	if( whichVideo < thumbs.size() ){
		
		vid.loadMovie(thumbs[whichVideo].video);
		vid.play();
		vid.update();
		vid.setPosition(thumbs[whichVideo].pos);
		
		if( mode == "play" ){
			vid.setSpeed(0.25);
		}
		
		whichVideo++;
		framecounter = 0;
	}else{
		std::exit(0);
	}
}
开发者ID:Giladx,项目名称:autoMovie,代码行数:18,代码来源:testApp.cpp

示例3: mouseReleased

//--------------------------------------------------------------
void testApp::mouseReleased(int x, int y, int button){
	if(mode == "full" && bDown){
		thumbs[selected].pos = ofMap(x, 0, ofGetWidth(), 0, 0.9999, true);
		thumbs[selected].savePos();
		fullVid.setPosition(thumbs[selected].pos);
		fullVid.update();
		fullVid.setPaused(false);		
		fullVid.play();
		timer = ofGetElapsedTimef() + NUM_SECS;		
	}
	
	if( mode == "move" ){
		if( bDown ){
			reorganizeThumbs();
		}
	}
	bDown = false;
}
开发者ID:Giladx,项目名称:autoMovie,代码行数:19,代码来源:testApp.cpp

示例4: mouseDragged

//--------------------------------------------------------------
void testApp::mouseDragged(int x, int y, int button){
	if(mode == "full" && bDown){
		thumbs[selected].pos = ofMap(x, 0, ofGetWidth(), 0, 0.9999, true);
		fullVid.setPosition(thumbs[selected].pos);
		fullVid.update();		
	}
	else if( mode == "move" && bDown ){

		for(int i = 0; i < thumbs.size(); i++){
			ofRectangle tr = thumbs[i].r;
			if( tr.inside(x,y) ){
				placedIndex = i;
				cout << "placedIndex " << placedIndex <<endl;
			}
		}

	}
}
开发者ID:Giladx,项目名称:autoMovie,代码行数:19,代码来源:testApp.cpp

示例5: mouseDragged

//--------------------------------------------------------------
void ofApp::mouseDragged(int x, int y, int button){
  ofLogNotice() << "Position: " << x/w << "";
  video.setPosition(x / w);
}
开发者ID:atmarksharp,项目名称:VideoFrameExporter,代码行数:5,代码来源:ofApp.cpp


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