OCP::OCP( const double &tStart_, const Parameter &tEnd_ , const int &N_ ) :MultiObjectiveFunctionality(){ setupGrid( tStart_, tStart_ + 1.0, N_+1); }
Grid::Grid(int a, int b) { width = a; height = b; grid = new Square* [width * height]; setupGrid(); }
void DlgPass::resetPanel() { m_PG->Clear(); m_PG->AddPage(wxT("Properties")); setupGrid(); }
void StateLevel::setupLevel() { LevelData data = GAME_MANAGER.getLevelData(); setupBackground( data ); setupGrid( data ); setupTHolder(); }
OCP::OCP( const double &tStart_, const Parameter &tEnd_ , const int &N_ ) :MultiObjectiveFunctionality(){ if( N_ <= 0 ) ACADOERROR( RET_INVALID_ARGUMENTS ); setupGrid( tStart_, tStart_ + 1.0, N_+1); }
void ofxMarchingCubes::setGridRes(unsigned int _gridResX, unsigned int _gridResY, unsigned int _gridResZ){ if(_gridResX == gridResX and _gridResY == gridResY and _gridResZ == gridResZ)return; clear(); gridResX = MAX(2, _gridResX); gridResY = MAX(2, _gridResY); gridResZ = MAX(2, _gridResZ); setupGrid(); }
void ofxMarchingCubes::init(const ofPoint& _iniGridPos,const ofPoint& _gridSize, unsigned int _gridResX, unsigned int _gridResY,unsigned int _gridResZ){ iniGridPos = _iniGridPos; gridResX = MAX(2, _gridResX); gridResY = MAX(2, _gridResY); gridResZ = MAX(2, _gridResZ); gridSize = _gridSize; setupGrid(); }
void DlgViewports::updateDlg() { EVENTMANAGER->addListener("NEW_VIEWPORT", this); EVENTMANAGER->addListener("VIEWPORT_CHANGED", this); setupGrid(); updateList(); m_List->SetSelection(0); update(); m_parent->Refresh(); }
BEGIN_NAMESPACE_ACADO // // PUBLIC MEMBER FUNCTIONS: // OCP::OCP( const double &tStart_, const double &tEnd_, const int &N_ ) :MultiObjectiveFunctionality(){ setupGrid( tStart_, tEnd_, N_+1 ); }
BEGIN_NAMESPACE_ACADO // // PUBLIC MEMBER FUNCTIONS: // OCP::OCP( const double &tStart_, const double &tEnd_, const int &N_ ) :MultiObjectiveFunctionality(){ if( N_ <= 0 ) ACADOERROR( RET_INVALID_ARGUMENTS ); setupGrid( tStart_, tEnd_, N_+1 ); }
OCP::OCP( const double &tStart_, const double &tEnd_, const Vector& _numSteps ) :MultiObjectiveFunctionality(){ if( _numSteps.getDim() <= 0 ) ACADOERROR( RET_INVALID_ARGUMENTS ); Vector times( _numSteps.getDim()+1 ); times(0) = tStart_; double totalSteps = 0; uint i; for( i = 0; i < _numSteps.getDim(); i++ ) { totalSteps += _numSteps(i); } double h = (tEnd_ - tStart_)/totalSteps; for( i = 0; i < _numSteps.getDim(); i++ ) { times(i+1) = times(i) + h*_numSteps(i); } setupGrid( times ); modelData.setIntegrationGrid(grid, totalSteps); }
ApplicationSettingsDialog::ApplicationSettingsDialog(QWidget *parent) : Dialog(parent) { setWindowTitle(tr("Kst Settings")); _generalTab = new GeneralTab(this); _gridTab = new GridTab(this); connect(_generalTab, SIGNAL(apply()), this, SLOT(generalChanged())); connect(_gridTab, SIGNAL(apply()), this, SLOT(gridChanged())); DialogPage *general = new DialogPage(this); general->setPageTitle(tr("General")); general->addDialogTab(_generalTab); addDialogPage(general); DialogPage *grid = new DialogPage(this); grid->setPageTitle(tr("Grid")); grid->addDialogTab(_gridTab); addDialogPage(grid); setupGeneral(); setupGrid(); }
void DlgPass::updatePipelines() { std::vector<std::string> *pips = RENDERMANAGER->getPipelineNames(); std::vector<std::string>::iterator iter; //wxString sel = m_PipelineList->GetStringSelection(); wxString sel = wxString(RENDERMANAGER->getActivePipelineName()); m_PipelineList->Clear(); for (iter = pips->begin(); iter != pips->end(); ++iter) m_PipelineList->Append(wxString(iter->c_str())); delete pips; if (! m_PipelineList->SetStringSelection(sel)) m_PipelineList->SetSelection(0); sel = m_PipelineList->GetStringSelection(); m_ActivePipText->SetLabelText(sel); std::string pipName = std::string(sel.mb_str()); Pipeline *pip = RENDERMANAGER->getPipeline(pipName); std::vector<std::string> *passes = pip->getPassNames(); sel = m_PassList->GetStringSelection(); m_PassList->Clear(); for (iter = passes->begin(); iter != passes->end(); ++iter) m_PassList->Append(wxString(iter->c_str())); delete passes; if (! m_PassList->SetStringSelection(sel)) m_PassList->SetSelection(0); Pass *p = getPass(); m_PG->ClearPage(0); m_PG->Append(new wxStringProperty(wxT("Class"), wxPG_LABEL, wxT(""))); m_PG->DisableProperty(wxT("Class")); m_pgCamList.Add(wxT("dummy")); m_pgPropCam = new wxEnumProperty(wxT("Camera"),wxPG_LABEL,m_pgCamList); m_PG->Append(m_pgPropCam); m_pgViewportList.Add(wxT("From Camera")); m_pgPropViewport = new wxEnumProperty(wxT("Viewport"),wxPG_LABEL,m_pgViewportList); m_PG->Append(m_pgPropViewport); m_PG->Append(new wxBoolProperty(wxT("Use Render Target"), wxPG_LABEL, true)); m_PG->SetPropertyAttribute( wxT("Use Render Target"), wxPG_BOOL_USE_CHECKBOX, true ); m_pgRenderTargetList.Add(wxT("None")); m_pgPropRenderTarget = new wxEnumProperty(wxT("Render Target"),wxPG_LABEL,m_pgRenderTargetList); m_PG->Append(m_pgPropRenderTarget); //m_PG->Append(new wxBoolProperty(wxT("Clear Color"), wxPG_LABEL, true)); //m_PG->SetPropertyAttribute( wxT("Clear Color"), // wxPG_BOOL_USE_CHECKBOX, // true ); //m_PG->Append(new wxBoolProperty(wxT("Clear Depth"), wxPG_LABEL, true)); //m_PG->SetPropertyAttribute( wxT("Clear Depth"), // wxPG_BOOL_USE_CHECKBOX, // true ); updateLists(p); setupGrid(); updateProperties(p) ; }
void FlowAnalysis::run(){ dem=static_cast<DemField*>(field.get()); if(data.size()==0) setupGrid(); addCurrentData(); if(nDone>0) timeSpan+=scene->time-virtPrev; }
void ofxMarchingCubes::setGridSize(const ofPoint& _gridSize){ if(_gridSize.x == gridSize.x and _gridSize.y == gridSize.y and _gridSize.z == gridSize.z)return; clear(); gridSize = _gridSize; setupGrid(); }