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.
 
 

45 lines
1009 B

#pragma once
#include "ofEvents.h"
#include "BaseSurface.h"
#include "GridWarpSurface.h"
#include "CircleJoint.h"
#include "SurfaceType.h"
namespace ofx {
namespace piMapper {
class TextureEditor {
public:
TextureEditor();
void update(); // Maybe the Application pointer would make sense there. Not sure yet.
void mousePressed(ofMouseEventArgs & args);
void mouseDragged(ofMouseEventArgs & args);
void draw();
void drawJoints();
void setSurface(BaseSurface * newSurface);
void clear();
void createJoints();
void clearJoints();
void unselectAllJoints();
void selectNextTexCoord();
void selectPrevTexCoord();
void moveTexCoords(ofVec2f by);
void stopDragJoints();
void moveSelection(ofVec2f by);
void constrainJointsToQuad(int selectedJointIndex);
CircleJoint * hitTestJoints(ofVec2f pos);
vector <CircleJoint *> & getJoints();
private:
BaseSurface * surface;
vector <CircleJoint *> joints;
bool bShiftKeyDown;
};
} // namespace piMapper
} // namespace ofx