//-------------------------------------------------------------- void ofApp::draw(){ ofEnableAlphaBlending(); ofSetColor(255,255,255,64); ofRect(0,0,ofGetWidth(),ofGetHeight()); ofSetColor(0); ofPushMatrix(); ofTranslate(ofGetWidth()/2,ofGetHeight()/2); //ofRotate(t); for(int i=0;i<numBoids;i++){ Boid * b = boids.at(i); b->draw(); } ofPopMatrix(); gui.draw(); if(doSetup) generateBoids(); }
void Flock::draw() const{ for(std::vector<Boid * >::const_iterator it = boids.begin(); it != boids.end(); ++it) { Boid * boid = *it; boid->draw(); } }