Gui(App *a, OscAdapter *o){ app = a; osc = o; gui.setup(); setasPanel.setup(); setasPanel.setPosition(10, 250); init(); bVisible = true; load(); }
void setup() { ofSetFrameRate(60); ofSetVerticalSync(true); dw=ofGetScreenWidth(); dh=ofGetScreenHeight(); ofDisableArbTex(); fbo.allocate(dw,dh); shader.load("shaders/fluid.vert","shaders/fluid.frag"); camera.setFarClip(100000); camera.setNearClip(.1); if ( !allocate_data () ){ cout<<"error allocate!"<<endl; exit(); } clear_data (); gui.setup(); gui.setPosition(ofPoint(10,10)); gui.add(size_cube.setup("size box", 100.0f,0.0f,255.0f)); gui.add(dvel.setup("draw velocity", true)); gui.add(dden.setup("draw density", false)); gui.add(TaddSource.setup("add source",false)); gui.add(Bclear.setup("clear source",false)); gui.add(addX.setup("add x",false)); gui.add(addY.setup("add y",false)); gui.add(addZ.setup("add z",false)); gui.add(dt.setup("time delta", 0.9f,0.0f,25.0f)); gui.add(diff.setup("diffuse", 0.0f,0.0f,25.0f)); gui.add(visc.setup("viscosity", 0.0f,0.0f,25.0f)); gui.add(force.setup("add force",30.0f,0.0f,60.0f)); gui.add(source.setup("density", 200.0f,0.0f,600.0f)); gui.add(source_alpha.setup("alpha",0.05,0.0,1.0)); gui.add(drawAbstacle.setup("draw abstacle",false)); gui.add(drawAxis.setup("draw Axis",true)); gui.add(sourcePosX.setup("source posX", 0,-10,SIZE)); gui.add(sourcePosY.setup("source posY", 0,-10,SIZE)); gui.add(sourcePosZ.setup("source posZ", 0,-10,SIZE)); }
void setup() { ofBackground(255); ofSetFrameRate(60); config.load("config.xml"); defaultLength = config.getFloatValue("cable/length/default"); minLength = config.getFloatValue("cable/length/min"); maxLength = config.getFloatValue("cable/length/max"); host = config.getValue("osc/host"); sendPort = config.getIntValue("osc/sendPort"); receivePort = config.getIntValue("osc/receive"); oscSend.setup(host, sendPort); oscReceive.setup(receivePort); local.setup("Local"); remote.setup("Remote"); zeros.setup("Zeros"); zeros.add(nwZero.setup("NW Zero")); zeros.add(neZero.setup("NE Zero")); zeros.add(seZero.setup("SE Zero")); zeros.add(swZero.setup("SW Zero")); nwZero.addListener(this, &ofApp::zeroNW); neZero.addListener(this, &ofApp::zeroNE); seZero.addListener(this, &ofApp::zeroSE); swZero.addListener(this, &ofApp::zeroSW); local.gui.loadFromFile("settings.xml"); local.gui.setPosition(10, 10); zeros.setPosition(10, 200); remote.gui.setPosition(10, 310); }