#include "ofApp.h" #include "glew.h" #include "pluginpanel.h" //-------------------------------------------------------------- void ofApp::setup(){ ofSetFrameRate(60); plugingui.setup("chaos","",10,10); testsettings.setup("test","",10,160); } #define STEPS_X 8 #define STEPS_Y 6 #define NUM_FRAMES 10 void ofApp::update(){ plugingui.update(); //seed the pipeline of drawing for the chaos algorithm /* n-> delete n-1 -> chaos -> n n-2 -> chaos -> n-1 . . . 1 -> chaos -> 2 new frame -> chaos -> 1 */ vector frame; for (int i=ofGetWidth()/STEPS_X;iNUM_FRAMES){ drawing.pop_back(); } } void ofApp::draw(){ ofBackground(0); ofSetColor(255); ofNoFill(); plugingui.draw(); testsettings.draw(); glLineWidth(2); for (auto i=drawing.begin();i!=drawing.end();i++){ for (auto j=i->begin();j!=i->end();j++){ for (int k=0;ksize();k++){ (*j)[k]=plugingui.calc((*j)[k]); } j->draw(); } } ofSetWindowTitle(ofToString(ofGetFrameRate(), 2)+" fps"); } void ofApp::exit() { } void ofApp::keyPressed(ofKeyEventArgs &args){ } void ofApp::keyReleased(ofKeyEventArgs &args){ } void ofApp::mouseMoved(int x, int y ){ } void ofApp::mouseDragged(int x, int y, int button){ } void ofApp::mousePressed(int x, int y, int button){ } void ofApp::mouseReleased(int x, int y, int button){ } void ofApp::mouseEntered(int x, int y){ } void ofApp::mouseExited(int x, int y){ } void ofApp::windowResized(int w, int h){ } void ofApp::dragEvent(ofDragInfo dragInfo){ }