ofxPiMapper fixed for C++17 & oF 12.0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

29 lines
629 B

#include "MvSurfaceCmd.h"
namespace ofx {
namespace piMapper {
MvSurfaceCmd::MvSurfaceCmd(BaseSurface * surface,
ProjectionEditor * projectionEditor){
_surface = surface;
_projectionEditor = projectionEditor;
}
void MvSurfaceCmd::exec(){
ofLogNotice("MvSurfaceCmd", "exec");
_previousVertices = _surface->getVertices();
_surface->setMoved(false);
}
void MvSurfaceCmd::undo(){
ofLogNotice("MvSurfaceCmd", "undo");
_surface->moveBy(_previousVertices[0] - _surface->getVertices()[0]);
_projectionEditor->updateJoints();
_previousVertices.clear();
_surface = 0;
}
} // namespace piMapper
} // namespace ofx