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.
 
 

47 lines
949 B

#pragma once
#include "SurfaceManager.h"
#include "CircleJoint.h"
namespace ofx {
namespace piMapper {
class ProjectionEditor {
public:
ProjectionEditor();
void registerAppEvents();
void unregisterAppEvents();
void enable();
void disable();
void update();
void draw();
void mouseDragged(ofMouseEventArgs & args);
void gotMessage(ofMessage & msg);
void setSurfaceManager(SurfaceManager * newSurfaceManager);
void clearJoints();
void createJoints();
void updateJoints();
void unselectAllJoints();
void moveSelectedSurface(ofVec2f by);
void stopDragJoints();
void updateVertices();
void setSnapDistance(float newSnapDistance);
CircleJoint * hitTestJoints(ofVec2f pos);
vector <CircleJoint *> * getJoints();
private:
SurfaceManager * surfaceManager;
vector <CircleJoint *> joints;
bool bShiftKeyDown;
float fSnapDistance;
void drawJoints();
};
} // namespace piMapper
} // namespace ofx