diff options
| author | Tim Redfern <tim@getdrop.com> | 2018-01-31 01:30:24 +0000 |
|---|---|---|
| committer | Tim Redfern <tim@getdrop.com> | 2018-01-31 01:30:24 +0000 |
| commit | 2b6c19dd192b07fe5980f667e26015da51c3106d (patch) | |
| tree | 0677f035268f251ba15a46ba36548ac073ac8c15 /ofxHelios/example-squares | |
| parent | b7f80bdefd3c639307043787860ff1cbd01f4573 (diff) | |
much progress
Diffstat (limited to 'ofxHelios/example-squares')
| -rw-r--r-- | ofxHelios/example-squares/src/ofApp.cpp | 17 |
1 files changed, 11 insertions, 6 deletions
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 <ofPolyline> 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)); |
