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.
24 lines
532 B
24 lines
532 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");
|
|
Vec3 step = _previousVertices[0] - _surface->getVertices()[0];
|
|
_surface->moveBy(step);
|
|
}
|
|
|
|
} // namespace piMapper
|
|
} // namespace ofx
|
|
|
|
|