From 03eacae3ff028f7e565b3aebf28af48a0b08c585 Mon Sep 17 00:00:00 2001 From: Tim Redfern Date: Fri, 18 Aug 2023 15:53:23 +0100 Subject: starfield randomisation --- lasertext/src/ofApp.cpp | 85 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 55 insertions(+), 30 deletions(-) (limited to 'lasertext/src/ofApp.cpp') diff --git a/lasertext/src/ofApp.cpp b/lasertext/src/ofApp.cpp index 391aa37..e58e361 100644 --- a/lasertext/src/ofApp.cpp +++ b/lasertext/src/ofApp.cpp @@ -22,20 +22,15 @@ void ofApp::setup(){ ofLogNotice()<<"found "< laserstars=stars.getPoints(); + vector laserstars; + int numstars=0; + + laserstars=stars1.getPoints(); + num+=laser.draw(laserstars); + numstars+=laserstars.size(); - num+=laser.draw(laserstars); + laserstars=stars2.getPoints(); + num+=laser.draw(laserstars); + numstars+=laserstars.size(); if (num>0){ - ofSetWindowTitle(ofToString(ofGetFrameRate(), 2)+" fps laser points: "+ofToString(num)+", stars: "+ofToString(laserstars.size())); + ofSetWindowTitle(ofToString(ofGetFrameRate(), 2)+" fps laser points: "+ofToString(num)+", stars: "+ofToString(numstars)); } else { - ofSetWindowTitle(ofToString(ofGetFrameRate(), 2)+" fps laser power off, stars: "+ofToString(laserstars.size())); + ofSetWindowTitle(ofToString(ofGetFrameRate(), 2)+" fps laser power off, stars: "+ofToString(numstars)); } -- cgit v1.2.3