From e56157968565b449a4e56fc0b90c07af578f2593 Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Mon, 12 May 2014 16:24:40 +0200 Subject: [PATCH] Add moveSelectedSurface by method to projection editor --- src/ofxProjectionEditor.cpp | 11 +++++++++++ src/ofxProjectionEditor.h | 1 + src/ofxSurfaceManagerGui.cpp | 6 +----- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/ofxProjectionEditor.cpp b/src/ofxProjectionEditor.cpp index 6c49856..b1c7bc1 100644 --- a/src/ofxProjectionEditor.cpp +++ b/src/ofxProjectionEditor.cpp @@ -59,6 +59,17 @@ void ofxProjectionEditor::updateJoints() } } +void ofxProjectionEditor::moveSelectedSurface(ofVec2f by) +{ + if ( surfaceManager == NULL ) return; + if ( surfaceManager->getSelectedSurface() == NULL ) return; + vector& vertices = surfaceManager->getSelectedSurface()->getVertices(); + for (int i=0; i& vertices = surfaceManager->getSelectedSurface()->getVertices(); - for ( int i=0; i