| 41 | |
| 42 | |
| 43 | void flipZ() { |
| 44 | // Don't know how best way to change <polyscope::view::viewMat>/homeview |
| 45 | // externally Rotate mesh 180 deg about up-axis on startup |
| 46 | glm::mat4x4 rot = glm::rotate(glm::mat4x4(1.0f), static_cast<float>(PI), glm::vec3(0, 1, 0)); |
| 47 | for (Vertex v : mesh->vertices()) { |
| 48 | Vector3 vec = geometry->inputVertexPositions[v]; |
| 49 | glm::vec4 rvec = {vec[0], vec[1], vec[2], 1.0}; |
| 50 | rvec = rot * rvec; |
| 51 | geometry->inputVertexPositions[v] = {rvec[0], rvec[1], rvec[2]}; |
| 52 | } |
| 53 | psMesh->updateVertexPositions(geometry->inputVertexPositions); |
| 54 | } |
| 55 | |
| 56 | void showSelected() { |
| 57 | // pass |