ofParameterGroup ofParameterGroup::getGroup(int pos) const{ if(pos>=size()){ return ofParameterGroup(); }else{ if(getType(pos)==typeid(ofParameterGroup).name()){ return *static_cast<ofParameterGroup* >(obj->parameters[pos].get()); }else{ ofLogError("ofParameterGroup") << "get(): bad type for pos " << pos << ", returning empty group"; return ofParameterGroup(); } } }
Force::Force(string namein,bool isAttr){ name = namein; #ifndef GUIMODE shader.load("","shaders/"+name+".frag"); #endif settings = ofParameterGroup(); settings.setName(name); pl.push_back(&isActive); isActive.setName("isActive"); settings.add(isActive); isActive = false; attrFamilly = -2; if(isAttr) { MYPARAM(attrFamilly,0,-1,13); MYPARAM(attrZone,0,0,3); pl.push_back(&attrFamilly); pl.push_back(&attrZone);} }
Force::Force(){ settings = ofParameterGroup(); settings.setName("empty"); isActive = true; }