diff --git a/src/ofxBaseSurface.h b/src/ofxBaseSurface.h index 300df97..9cd98b6 100644 --- a/src/ofxBaseSurface.h +++ b/src/ofxBaseSurface.h @@ -14,6 +14,7 @@ public: virtual void draw(){}; virtual void setVertex(int index, ofVec2f p){}; virtual void setTexCoord(int index, ofVec2f t){}; + virtual void moveBy(ofVec2f v){}; virtual int getType(){}; virtual bool hitTest(ofVec2f p){}; virtual ofPolyline getHitArea(){}; diff --git a/src/ofxProjectionEditor.cpp b/src/ofxProjectionEditor.cpp index 2762f82..7560ba8 100644 --- a/src/ofxProjectionEditor.cpp +++ b/src/ofxProjectionEditor.cpp @@ -209,10 +209,11 @@ void ofxProjectionEditor::moveSelectedSurface(ofVec2f by) { if ( surfaceManager == NULL ) return; if ( surfaceManager->getSelectedSurface() == NULL ) return; - vector& vertices = surfaceManager->getSelectedSurface()->getVertices(); + surfaceManager->getSelectedSurface()->moveBy(by); + /*vector& vertices = surfaceManager->getSelectedSurface()->getVertices(); for (int i=0; i& vertices = getVertices(); + for (int i=0; i& vertices = getVertices(); + for (int i=0; i