From 4d813b38a35ac04adece480d8637cf4a810ddce9 Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Mon, 12 May 2014 16:18:03 +0200 Subject: [PATCH] Add posibility to move surfaces again --- src/ofxProjectionEditor.cpp | 8 +++++++ src/ofxProjectionEditor.h | 1 + src/ofxSurfaceManagerGui.cpp | 43 ++++++++++++++++++++++++++++++++++-- src/ofxSurfaceManagerGui.h | 6 +++++ 4 files changed, 56 insertions(+), 2 deletions(-) diff --git a/src/ofxProjectionEditor.cpp b/src/ofxProjectionEditor.cpp index cc7f377..6c49856 100644 --- a/src/ofxProjectionEditor.cpp +++ b/src/ofxProjectionEditor.cpp @@ -51,6 +51,14 @@ void ofxProjectionEditor::createJoints() } } +void ofxProjectionEditor::updateJoints() +{ + vector& vertices = surfaceManager->getSelectedSurface()->getVertices(); + for ( int i=0; iposition = ofVec2f(vertices[i].x, vertices[i].y); + } +} + bool ofxProjectionEditor::hitTestJoints(ofVec2f pos) { for ( int i=0; i& vertices = surfaceManager->getSelectedSurface()->getVertices(); + for ( int i=0; i