Browse Source

Add initial SetTexMapDrawModeCmd

master
Krisjanis Rijnieks 9 years ago
parent
commit
164d95c21e
  1. 24
      src/Commands/SetTexMapDrawModeCmd.cpp
  2. 29
      src/Commands/SetTexMapDrawModeCmd.h

24
src/Commands/SetTexMapDrawModeCmd.cpp

@ -0,0 +1,24 @@
#include "SetTexMapDrawModeCmd.h"
namespace ofx {
namespace piMapper {
SetTexMapDrawModeCmd::SetTexMapDrawModeCmd(TextureMappingState * s, int m){
_state = s;
_newMode = m;
}
void SetTexMapDrawModeCmd::exec(){
ofLogNotice("SetTexMapDrawModeCmd", "undo");
_oldMode = 0; // _state->getDrawMode();
// _state->setDrawMode(_newMode);
}
void SetTexMapDrawModeCmd::undo(){
ofLogNotice("SetTexMapDrawModeCmd", "undo");
// _state->setDrawMode(_oldMode);
}
} // namespace piMapper
} // namespace ofx

29
src/Commands/SetTexMapDrawModeCmd.h

@ -0,0 +1,29 @@
// SetTexMapDrawMode
// Sets draw mode of the texture mapping state
// Created by Krisjanis Rijnieks 2016-09-16
#pragma once
#include "BaseCmd.h"
#include "TextureMappingState.h"
namespace ofx {
namespace piMapper {
class SetTexMapDrawModeCmd : public BaseUndoCmd {
public:
SetTexMapDrawModeCmd(TextureMappingState * s, int m);
void exec();
void undo();
private:
TextureMappingState * _state;
int _oldMode;
int _newMode;
};
} // namespace piMapper
} // namespace ofx
Loading…
Cancel
Save