From 0cd7ec9fa4017af7b2b257270fb6cdd58867107e Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks <krisjanis.rijnieks@gmail.com> Date: Sat, 10 May 2014 01:26:56 +0200 Subject: [PATCH] Add moving joints moves surface vertices now --- src/ofxSurfaceGui.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ofxSurfaceGui.cpp b/src/ofxSurfaceGui.cpp index f860393..d26ac63 100644 --- a/src/ofxSurfaceGui.cpp +++ b/src/ofxSurfaceGui.cpp @@ -48,6 +48,9 @@ void ofxSurfaceGui::mouseDragged(int x, int y, int button) { for ( int i=0; i<joints.size(); i++ ) { joints[i].mouseDragged(x, y, button); + if ( joints[i].isDragged() ) { + surface->setVertex(i, joints[i].position); + } } }