MCPcopy Create free account
hub / github.com/GeometryCollective/ddg-exercises / flipZ

Function flipZ

projects/parameterization/src/main.cpp:43–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41
42
43void 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
56void showSelected() {
57 // pass

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected