void MyFrame::SelectView(UIState::viewModeType viewMode) { myGLCanvas->ShowRenderingMesh(false); myGLCanvas->ShowSimulationMesh(false); myGLCanvas->ShowLinearModes(false); myGLCanvas->ShowNonLinearModes(false); this->uiState.viewMode = viewMode; switch(viewMode) { case UIState::VIEW_NONE: viewText->SetLabel(" View: No model loaded"); break; case UIState::VIEW_RENDERING_MESH: myGLCanvas->ShowRenderingMesh(true); menuBar->Check(ID_ViewRenderingMesh, true); viewText->SetLabel(" View: Triangle mesh"); EnableModalToolbar(false); ActivateVertexSelection(false); break; case UIState::VIEW_SIMULATION_MESH: myGLCanvas->ShowSimulationMesh(true); menuBar->Check(ID_ViewSimulationMesh, true); viewText->SetLabel(" View: Simulation mesh"); ActivateVertexSelection(true, 1); EnableModalToolbar(false); break; case UIState::VIEW_LINEAR_MODES: myGLCanvas->ShowLinearModes(true); menuBar->Check(ID_ViewLinearModes, true); viewText->SetLabel(" View: Linear modes"); EnableModalToolbar(true); modeSelectionControl->SetRange(1, precomputationState.rLin); if (modeSelectionControl->GetValue() > precomputationState.rLin) modeSelectionControl->SetValue(precomputationState.rLin); ActivateVertexSelection(false); break; case UIState::VIEW_NONLINEAR_MODES: myGLCanvas->ShowNonLinearModes(true); menuBar->Check(ID_ViewNonLinearModes, true); viewText->SetLabel(" View: Nonlinear modes"); EnableModalToolbar(true); modeSelectionControl->SetRange(1, precomputationState.rNonLin); ActivateVertexSelection(false); break; default: ActivateVertexSelection(false); break; } myGLCanvas->Refresh(); }
void MyFrame::OnSelectFixedVertices(wxCommandEvent& event) { ActivateVertexSelection(event.IsChecked()); }