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.
 
 

44 lines
1.3 KiB

#pragma once
#include "ofMain.h"
#include <string>
#include "BaseSource.h"
using namespace std;
namespace ofx {
namespace piMapper {
class BaseSurface {
public:
BaseSurface();
~BaseSurface();
virtual void setup() {};
virtual void draw() {};
virtual void setVertex(int index, ofVec2f p) {};
virtual void setTexCoord(int index, ofVec2f t) {};
virtual void moveBy(ofVec2f v) {};
virtual int getType() {};
virtual bool hitTest(ofVec2f p) {};
virtual ofPolyline getHitArea() {};
virtual ofPolyline getTextureHitArea() {};
virtual vector<ofVec3f>& getVertices() {};
virtual vector<ofVec2f>& getTexCoords() {};
void drawTexture(ofVec2f position);
void setSource(BaseSource* newSource);
BaseSource* getSource();
BaseSource* getDefaultSource();
void setMoved(bool moved);
bool getMoved();
protected:
ofMesh mesh;
ofTexture defaultTexture;
BaseSource* source;
BaseSource* defaultSource;
void createDefaultTexture();
bool _moved;
};
}
}