diff --git a/src/Application/Modes/ApplicationBaseMode.h b/src/Application/Modes/ApplicationBaseMode.h index c5d867f..b809b04 100644 --- a/src/Application/Modes/ApplicationBaseMode.h +++ b/src/Application/Modes/ApplicationBaseMode.h @@ -36,6 +36,8 @@ class ApplicationBaseMode { virtual void selectSurface(Application * app, int i){} virtual void selectNextSurface(Application * app){} virtual void selectPrevSurface(Application * app){} + virtual void selectNextVertex(Application * app){} + virtual void selectPrevVertex(Application * app){} virtual void moveSelection(Application * app, ofVec2f by){} }; diff --git a/src/Application/Modes/ProjectionMappingMode.cpp b/src/Application/Modes/ProjectionMappingMode.cpp index f16bcce..114c9eb 100644 --- a/src/Application/Modes/ProjectionMappingMode.cpp +++ b/src/Application/Modes/ProjectionMappingMode.cpp @@ -452,6 +452,18 @@ void ProjectionMappingMode::selectPrevSurface(Application * app){ } } +void ProjectionMappingMode::selectNextVertex(Application * app){ + if(app->getSurfaceManager()->getSelectedSurface() != 0){ + app->getCmdManager()->exec(new SelNextVertexCmd(app->getSurfaceManager())); + } +} + +void ProjectionMappingMode::selectPrevVertex(Application * app){ + if(app->getSurfaceManager()->getSelectedSurface() != 0){ + app->getCmdManager()->exec(new SelPrevVertexCmd(app->getSurfaceManager())); + } +} + void ProjectionMappingMode::moveSelection(Application * app, ofVec2f by){ app->getCmdManager()->exec( new MvSelectionCmd( diff --git a/src/Application/Modes/ProjectionMappingMode.h b/src/Application/Modes/ProjectionMappingMode.h index 802c80c..a732a97 100644 --- a/src/Application/Modes/ProjectionMappingMode.h +++ b/src/Application/Modes/ProjectionMappingMode.h @@ -58,6 +58,8 @@ class ProjectionMappingMode : public ApplicationBaseMode { void selectSurface(Application * app, int i); void selectNextSurface(Application * app); void selectPrevSurface(Application * app); + void selectNextVertex(Application * app); + void selectPrevVertex(Application * app); void moveSelection(Application * app, ofVec2f by); private: diff --git a/src/ofxPiMapper.cpp b/src/ofxPiMapper.cpp index 85bbf35..7e50b7b 100644 --- a/src/ofxPiMapper.cpp +++ b/src/ofxPiMapper.cpp @@ -52,6 +52,14 @@ void ofxPiMapper::selectPrevSurface(){ _application.getState()->selectPrevSurface(&_application); } +void ofxPiMapper::selectNextVertex(){ + _application.getState()->selectNextVertex(&_application); +} + +void ofxPiMapper::selectPrevVertex(){ + _application.getState()->selectPrevVertex(&_application); +} + void ofxPiMapper::togglePauseForSurface(unsigned int i){ ofx::piMapper::BaseSource * s = _application.getSurfaceManager()->getActivePreset()->getSurfaces().at(i)->getSource(); diff --git a/src/ofxPiMapper.h b/src/ofxPiMapper.h index 513d0b9..82577c7 100644 --- a/src/ofxPiMapper.h +++ b/src/ofxPiMapper.h @@ -59,6 +59,8 @@ class ofxPiMapper { void selectSurface(int i); void selectNextSurface(); void selectPrevSurface(); + void selectNextVertex(); + void selectPrevVertex(); void togglePauseForSurface(unsigned int i); void moveSelection(ofVec2f by);