Commit 8090f50b authored by Jan Möbius's avatar Jan Möbius

Merge branch 'fix_typos' into 'master'

fix typos

See merge request !245
parents 54ad9946 105c3ebd
Pipeline #13278 passed with stages
in 238 minutes and 54 seconds
...@@ -42,15 +42,15 @@ int main(int argc, char** argv) ...@@ -42,15 +42,15 @@ int main(int argc, char** argv)
for (const auto& vh : mesh.vertices()) for (const auto& vh : mesh.vertices())
laplace(vh) = vh.vertices().avg(points) - points(vh); laplace(vh) = vh.vertices().avg(points) - points(vh);
// Iterate over all vertices to compte update vectors as the negative of the laplace of the laplace damped by 0.5 // Iterate over all vertices to compute the laplace vector of the laplace vectors
for (const auto& vh : mesh.vertices()) for (const auto& vh : mesh.vertices())
bi_laplace(vh) = (vh.vertices().avg(laplace) - laplace(vh)); bi_laplace(vh) = (vh.vertices().avg(laplace) - laplace(vh));
// update points // update points by substracting the bi-laplacian damped by a factor of 0.5
for (const auto& vh : mesh.vertices()) for (const auto& vh : mesh.vertices())
points(vh) += -0.5 * bi_laplace(vh); points(vh) += -0.5 * bi_laplace(vh);
} }
} // The laplace and update properties are removed is removed from the mesh at the end of this scope. } // The laplace and update properties are removed from the mesh at the end of this scope.
// Write mesh file // Write mesh file
......
...@@ -82,7 +82,7 @@ If, instead, a property is desired to survive its local scope, it should be crea ...@@ -82,7 +82,7 @@ If, instead, a property is desired to survive its local scope, it should be crea
auto face_area = OpenMesh::FProp<double>(mesh, "face_area"); auto face_area = OpenMesh::FProp<double>(mesh, "face_area");
\endcode \endcode
At a later time, we can access the same property by using the same name. If we want to make sure, that we access a property that has already been created earler, we can use hasProperty() to test whether a mesh has the desired property: At a later time, we can access the same property by using the same name. If we want to make sure, that we access a property that has already been created earlier, we can use hasProperty() to test whether a mesh has the desired property:
\code \code
if (OpenMesh::hasProperty<OpenMesh::FaceHandle, double>(mesh, "face_area")) { if (OpenMesh::hasProperty<OpenMesh::FaceHandle, double>(mesh, "face_area")) {
// Property exists. Do something with it. // Property exists. Do something with it.
......
...@@ -906,15 +906,15 @@ TEST_F(OpenMeshTutorials, using_smart_handles_and_smart_ranges) { ...@@ -906,15 +906,15 @@ TEST_F(OpenMeshTutorials, using_smart_handles_and_smart_ranges) {
for (const auto& vh : mesh.vertices()) for (const auto& vh : mesh.vertices())
laplace(vh) = vh.vertices().avg(points) - points(vh); laplace(vh) = vh.vertices().avg(points) - points(vh);
// Iterate over all vertices to compte update vectors as the negative of the laplace of the laplace damped by 0.5 // Iterate over all vertices to compute the laplace vector of the laplace vectors
for (const auto& vh : mesh.vertices()) for (const auto& vh : mesh.vertices())
bi_laplace(vh) = (vh.vertices().avg(laplace) - laplace(vh)); bi_laplace(vh) = (vh.vertices().avg(laplace) - laplace(vh));
// update points // update points by substracting the bi-laplacian damped by a factor of 0.5
for (const auto& vh : mesh.vertices()) for (const auto& vh : mesh.vertices())
points(vh) += -0.5 * bi_laplace(vh); points(vh) += -0.5 * bi_laplace(vh);
} }
} // The laplace and update properties are removed is removed from the mesh at the end of this scope. } // The laplace and update properties are removed from the mesh at the end of this scope.
// write mesh // write mesh
ok = OpenMesh::IO::write_mesh(mesh, "smoothed_smart_output.off"); ok = OpenMesh::IO::write_mesh(mesh, "smoothed_smart_output.off");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment