From e4fb63c38f42babcc60aa18a5b5c5aed9be65776 Mon Sep 17 00:00:00 2001 From: Krisjanis Rijnieks Date: Fri, 5 Jan 2018 11:38:54 +0100 Subject: [PATCH] Update example_gamepad with ofx::piMapper::Vec3 --- example_gamepad/src/ofApp.cpp | 8 ++++---- example_gamepad/src/ofApp.h | 3 ++- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/example_gamepad/src/ofApp.cpp b/example_gamepad/src/ofApp.cpp index d72ba5c..495460b 100644 --- a/example_gamepad/src/ofApp.cpp +++ b/example_gamepad/src/ofApp.cpp @@ -49,13 +49,13 @@ void ofApp::messageReceived(ofMessage & message){ */ void ofApp::handleController(ControllerCommand com){ if(com == ControllerCommand::COMMAND_LEFT){ - mapper.moveSelection(ofVec2f(-5.0f, 0.0f)); + mapper.moveSelection(ofx::piMapper::Vec3(-5.0f, 0.0f, 0.0f)); }else if(com == ControllerCommand::COMMAND_RIGHT){ - mapper.moveSelection(ofVec2f(5.0f, 0.0f)); + mapper.moveSelection(ofx::piMapper::Vec3(5.0f, 0.0f, 0.0f)); }else if(com == ControllerCommand::COMMAND_UP){ - mapper.moveSelection(ofVec2f(0.0f, -5.0f)); + mapper.moveSelection(ofx::piMapper::Vec3(0.0f, -5.0f, 0.0f)); }else if(com == ControllerCommand::COMMAND_DOWN){ - mapper.moveSelection(ofVec2f(0.0f, 5.0f)); + mapper.moveSelection(ofx::piMapper::Vec3(0.0f, 5.0f, 0.0f)); }else if(com == ControllerCommand::COMMAND_A){ if(mapper.getMode() == ofx::piMapper::Mode::MAPPING_MODE){ mapper.selectNextVertex(); diff --git a/example_gamepad/src/ofApp.h b/example_gamepad/src/ofApp.h index 748b58c..8b75536 100644 --- a/example_gamepad/src/ofApp.h +++ b/example_gamepad/src/ofApp.h @@ -3,6 +3,7 @@ #include "ofMain.h" #include "ofxPiMapper.h" #include "InputHandler.h" +#include "Vec3.h" class ofApp : public ofBaseApp { public: @@ -22,4 +23,4 @@ class ofApp : public ofBaseApp { void handleController(ControllerCommand com); ofxPiMapper mapper; -}; \ No newline at end of file +};