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.
32 lines
728 B
32 lines
728 B
#pragma once
|
|
|
|
#include "ofMain.h"
|
|
#include "BaseSurface.h"
|
|
#include "SurfaceType.h"
|
|
|
|
namespace ofx {
|
|
namespace piMapper {
|
|
class TriangleSurface : public BaseSurface {
|
|
public:
|
|
TriangleSurface();
|
|
~TriangleSurface();
|
|
|
|
void setup();
|
|
void setup(ofVec2f p1, ofVec2f p2, ofVec2f p3, ofVec2f t1, ofVec2f t2,
|
|
ofVec2f t3, BaseSource* newSource);
|
|
void draw();
|
|
void setVertex(int index, ofVec2f p);
|
|
void setTexCoord(int index, ofVec2f t);
|
|
void moveBy(ofVec2f v);
|
|
|
|
int getType();
|
|
bool hitTest(ofVec2f p);
|
|
ofVec2f getVertex(int index);
|
|
ofVec2f getTexCoord(int index);
|
|
ofPolyline getHitArea();
|
|
ofPolyline getTextureHitArea();
|
|
vector<ofVec3f>& getVertices();
|
|
vector<ofVec2f>& getTexCoords();
|
|
};
|
|
}
|
|
}
|