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.
 
 

71 lines
1.7 KiB

#pragma once
#include "Application.h"
#include "ofEvents.h"
#include "ofLog.h"
#include "ofGraphics.h"
#include "DeselectTexCoordCmd.h"
#include "SelNextSurfaceCmd.h"
#include "TranslateCanvasCmd.h"
#include "SetTexMapDrawModeCmd.h"
#include "MvTexCoordCmd.h"
#include "MvAllTexCoordsCmd.h"
#include "SaveTexCoordPosCmd.h"
#include "SelTexCoordCmd.h"
#include "Gui.h"
#include "Vec2.h"
namespace ofx {
namespace piMapper {
class TextureMappingMode : public ApplicationBaseMode {
public:
static TextureMappingMode * instance();
void setup(Application * app);
void update(Application * app);
void draw(Application * app);
void onKeyPressed(Application * app, ofKeyEventArgs & args);
void onBackgroundPressed(Application * app, GuiBackgroundEvent & e);
void onMousePressed(Application * app, ofMouseEventArgs & args);
void onMouseReleased(Application * app, ofMouseEventArgs & args);
void onMouseDragged(Application * app, ofMouseEventArgs & args);
void onGuiEvent(Application * app, GuiEvent & e){}
void drawTexture(Application * app);
void moveSelectedTexCoord(Application * app, Vec2 by);
void selectNextVertex(Application * app);
void selectPrevVertex(Application * app);
void setTranslation(ofPoint p);
void setDrawMode(int m);
ofPoint getTranslation();
int getDrawMode();
int getNextDrawMode();
int getPrevDrawMode();
private:
static TextureMappingMode * _instance;
TextureMappingMode();
bool _bTranslateCanvas;
bool _bCropAreaDrag;
int _drawMode;
ofPoint _clickPosition;
ofPoint _canvasTranslate;
ofPoint _prevCanvasTranslate;
ofPoint _clickCanvasTranslate;
Vec2 _texCoordOnClick;
};
} // namespace piMapper
} // namespace ofx