* User-defined buttons */
| 64 | * User-defined buttons |
| 65 | */ |
| 66 | void functionCallback() { |
| 67 | |
| 68 | if (ImGui::Button("Mean curvature flow")) { |
| 69 | MCF.integrate(TIMESTEP); |
| 70 | geometry->normalize(CoM, false); |
| 71 | redraw(); |
| 72 | } |
| 73 | if (ImGui::Button("Modified mean curvature flow")) { |
| 74 | ModMCF.integrate(TIMESTEP); |
| 75 | geometry->normalize(CoM, false); |
| 76 | redraw(); |
| 77 | } |
| 78 | if (ImGui::Button("Reset")) { |
| 79 | geometry->inputVertexPositions = ORIG_VPOS; |
| 80 | psMesh->updateVertexPositions(ORIG_VPOS); |
| 81 | polyscope::requestRedraw(); |
| 82 | } |
| 83 | ImGui::SliderFloat("Timestep", &TIMESTEP, 0.001, 0.1); |
| 84 | } |
| 85 | |
| 86 | |
| 87 | int main(int argc, char** argv) { |