Exemple #1
0
void Tracker :: update ()
{
	if( ofGetFrameNum() == 2 )		// automatically set background after a delay.
	{
		updateBackground();
	}
	
	updateVideoGrabber();
	updateVideoPlayer();
	updateTracking();
	
	int blobsFound;
	blobsFound = updateContours();
	
	if( blobsFound > 0 )
	{
		blobUtil.downSampleBlobs( contourFinder.blobs, blobs, 40 );
		blobUtil.scaleBlobs( blobs, renderArea.width / (float)videoSmlRect.width, renderArea.height / (float)videoSmlRect.height );
//		blobUtil.translateBlobs( peeps, renderArea.x, renderArea.y );
	}
	else
	{
		blobs.clear();
	}
}
Exemple #2
0
void MlUVView::clientMouseInput(QMouseEvent *)
{
	if(!FeatherLibrary) return;
	const Ray * ray = getIncidentRay();
	Vector2F p(ray->m_origin.x, ray->m_origin.y);
	Vector2F d = updateTracking(p);
	if(interactMode() ==  ToolContext::MoveInUV) {
		FeatherLibrary->selectedFeatherExample()->translateUV(d);
	}
	else if(interactMode() ==  ToolContext::MoveVertexInUV) {
		if(m_selectedVert) {
			if(m_moveYOnly) {
				*m_selectedVert += d.y;
				m_selectVertWP.y += d.y;
			}
			else {
				m_selectedVert[0] += d.x;
				m_selectedVert[1] += d.y;
				m_selectVertWP += d;
			}
			FeatherLibrary->selectedFeatherExample()->computeTexcoord();
		}
	}
	emit shapeChanged();
}
/**
 * @brief Delete notification bar from visible elements on scroll area
 */
void NotificationScrollArea::updateVisualTracking() {
    updateTracking(nullptr);
}