Browse Source

Add ofxPiMapper::selectVertex()

master
Krisjanis Rijnieks 8 years ago
parent
commit
b5101a4d7d
  1. 17
      src/Application/Application.cpp
  2. 1
      src/Application/Application.h
  3. 4
      src/ofxPiMapper.cpp
  4. 1
      src/ofxPiMapper.h

17
src/Application/Application.cpp

@ -337,6 +337,23 @@ void Application::selectPrevVertex(){
} }
} }
void Application::selectVertex(int surface, int vertex){
if(getSurfaceManager()->size()){
// TODO: use one command instead of two
getCmdManager()->exec(
new SelSurfaceCmd(
getSurfaceManager(),
getSurfaceManager()->getSurface(surface)));
getCmdManager()->exec(
new SelVertexCmd(
getSurfaceManager(),
vertex));
}
}
void Application::selectNextTexCoord(){ void Application::selectNextTexCoord(){
if(getSurfaceManager()->getSelectedSurface() != 0){ if(getSurfaceManager()->getSelectedSurface() != 0){
getCmdManager()->exec( getCmdManager()->exec(

1
src/Application/Application.h

@ -104,6 +104,7 @@ class Application {
void selectPrevSurface(); void selectPrevSurface();
void selectNextVertex(); void selectNextVertex();
void selectPrevVertex(); void selectPrevVertex();
void selectVertex(int surface, int vertex);
void selectNextTexCoord(); void selectNextTexCoord();
void selectPrevTexCoord(); void selectPrevTexCoord();

4
src/ofxPiMapper.cpp

@ -107,6 +107,10 @@ void ofxPiMapper::selectPrevVertex(){
_application.selectPrevVertex(); _application.selectPrevVertex();
} }
void ofxPiMapper::selectVertex(int surface, int vertex){
_application.selectVertex(surface, vertex);
}
void ofxPiMapper::selectNextTexCoord(){ void ofxPiMapper::selectNextTexCoord(){
_application.selectNextTexCoord(); _application.selectNextTexCoord();
} }

1
src/ofxPiMapper.h

@ -57,6 +57,7 @@ class ofxPiMapper {
void duplicateSurface(); void duplicateSurface();
void selectNextVertex(); void selectNextVertex();
void selectPrevVertex(); void selectPrevVertex();
void selectVertex(int surface, int vertex);
void selectNextTexCoord(); void selectNextTexCoord();
void selectPrevTexCoord(); void selectPrevTexCoord();
void moveLayerUp(); void moveLayerUp();

Loading…
Cancel
Save