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.
 
 

23 lines
513 B

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