#include "ofApp.h" //-------------------------------------------------------------- void ofApp::setup() { ofSetLogLevel(OF_LOG_NOTICE); ofBackground(ofColor::black); NDI.init(); int framenum=0; } //-------------------------------------------------------------- void ofApp::exit() { NDI.stopThread(); } //-------------------------------------------------------------- void ofApp::update() { } ofPolyline ofApp::polyLineTransform(const ofPolyline& poly, ofMatrix4x4 xform){ ofPolyline tempPoly; for (auto& p:poly){ tempPoly.addVertex(ofVec3f(p)*xform); } return tempPoly; } ofPolyline ofApp::makePolygon(int num,float diam){ ofPolyline poly; float step=PI*2/num; for (int i=0;i<=num;i++){ poly.addVertex(cos(step*i)*diam,sin(step*i)*diam); } return poly; } void ofApp::drawPoly(ofPolyline poly,float x,float y){ glPushMatrix(); ofTranslate(x,y); poly.draw(); for (int i=0;i