From 2b6c19dd192b07fe5980f667e26015da51c3106d Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Wed, 31 Jan 2018 01:30:24 +0000 Subject: much progress --- ofxHelios/example-squares/src/ofApp.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'ofxHelios/example-squares') diff --git a/ofxHelios/example-squares/src/ofApp.cpp b/ofxHelios/example-squares/src/ofApp.cpp index bddbc58..faf4ad9 100644 --- a/ofxHelios/example-squares/src/ofApp.cpp +++ b/ofxHelios/example-squares/src/ofApp.cpp @@ -8,6 +8,7 @@ int LASER_INTENSITY=37; void testApp::setup(){ laser.set_pts(MAX_POINTS); laser.set_intensity(LASER_INTENSITY); + } //-------------------------------------------------------------- @@ -38,14 +39,18 @@ void testApp::draw(){ ofBackground(0); ofSetColor(255,255,255); - ofMatrix4x4 m = ofMatrix4x4::newIdentityMatrix(); - m.rotateRad(ofGetElapsedTimef(),0,0,1); - m.translate(ofGetWidth()/2,ofGetHeight()/2,0); - ofPolyline square=polyLineTransform(makePolygon(4,200),m); + vector squares; - square.draw(); + for (int i=0;i<4;i++){ + ofMatrix4x4 m = ofMatrix4x4::newIdentityMatrix(); + m.rotateRad(ofGetElapsedTimef(),0,0,1); + m.translate(ofGetWidth()/2+(cos(i*PI*0.5)*300),ofGetHeight()/2+(sin(i*PI*0.5)*300),0); + ofPolyline square=polyLineTransform(makePolygon(4,400),m); + square.draw(); + squares.push_back(square); + } - int num = laser.draw(square); + int num = laser.draw(squares); if (num>0){ ofSetWindowTitle(ofToString(ofGetFrameRate(), 2)+" fps laser points: "+ofToString(num)); -- cgit v1.2.3