|
Lagrange
|
Common utility functions for mesh and attribute smoothing. More...
Functions | |
| template<typename Scalar, typename Index> | |
| void | get_triangles (const SurfaceMesh< Scalar, Index > &t_mesh, std::vector< SimplexIndex< K, int > > &triangles) |
| Extract triangles from a mesh. | |
| template<typename Scalar, typename Index> | |
| void | get_vertices_and_normals (const SurfaceMesh< Scalar, Index > &t_mesh, std::vector< Vector< Real, Dim > > &vertices, std::vector< Vector< Real, Dim > > &normals, AttributeId normal_id) |
| Extract vertices and normals from a mesh. | |
| template<typename Scalar, typename Index> | |
| void | set_vertices (SurfaceMesh< Scalar, Index > &mesh, const std::vector< Vector< Real, Dim > > &vertices) |
| Set vertices in a mesh. | |
| template<typename Scalar, typename Index> | |
| std::unique_ptr< FEM::RiemannianMesh< Real > > | setup_for_smoothing (SurfaceMesh< Scalar, Index > &mesh, SurfaceMesh< Scalar, Index > &_mesh, std::vector< SimplexIndex< K, int > > &triangles, std::vector< Vector< Real, Dim > > &vertices, std::vector< Vector< Real, Dim > > &normals, Solver &solver, Real &original_area) |
| Setup a mesh for smoothing operations. | |
| void | adjust_metric_for_curvature (FEM::RiemannianMesh< Real > &r_mesh, const std::vector< Vector< Real, Dim > > &vertices, const std::vector< Vector< Real, Dim > > &normals, Real original_area, double curvature_weight, double normal_smoothing_weight, Solver &solver) |
| Adjust the metric based on curvature. | |
Common utility functions for mesh and attribute smoothing.
| void get_triangles | ( | const SurfaceMesh< Scalar, Index > & | t_mesh, |
| std::vector< SimplexIndex< K, int > > & | triangles ) |
Extract triangles from a mesh.
| Scalar | The scalar type used for mesh coordinates |
| Index | The index type used for mesh connectivity |
| t_mesh | The input mesh |
| triangles | Output vector of triangles |
| void get_vertices_and_normals | ( | const SurfaceMesh< Scalar, Index > & | t_mesh, |
| std::vector< Vector< Real, Dim > > & | vertices, | ||
| std::vector< Vector< Real, Dim > > & | normals, | ||
| AttributeId | normal_id ) |
Extract vertices and normals from a mesh.
| Scalar | The scalar type used for mesh coordinates |
| Index | The index type used for mesh connectivity |
| t_mesh | The input mesh |
| vertices | Output vector of vertices |
| normals | Output vector of normals |
| normal_id | The attribute ID for normals |
| void set_vertices | ( | SurfaceMesh< Scalar, Index > & | mesh, |
| const std::vector< Vector< Real, Dim > > & | vertices ) |
Set vertices in a mesh.
| Scalar | The scalar type used for mesh coordinates |
| Index | The index type used for mesh connectivity |
| mesh | The mesh to update |
| vertices | The new vertex positions |
| std::unique_ptr< FEM::RiemannianMesh< Real > > setup_for_smoothing | ( | SurfaceMesh< Scalar, Index > & | mesh, |
| SurfaceMesh< Scalar, Index > & | _mesh, | ||
| std::vector< SimplexIndex< K, int > > & | triangles, | ||
| std::vector< Vector< Real, Dim > > & | vertices, | ||
| std::vector< Vector< Real, Dim > > & | normals, | ||
| Solver & | solver, | ||
| Real & | original_area ) |
Setup a mesh for smoothing operations.
This function performs common setup operations for both mesh and attribute smoothing:
| Scalar | The scalar type used for mesh coordinates |
| Index | The index type used for mesh connectivity |
| mesh | The input mesh |
| _mesh | Output triangulated mesh |
| triangles | Output vector of triangles |
| vertices | Output vector of vertices |
| normals | Output vector of normals |
| solver | The solver to use |
| original_area | Output original mesh area |
| void adjust_metric_for_curvature | ( | FEM::RiemannianMesh< Real > & | r_mesh, |
| const std::vector< Vector< Real, Dim > > & | vertices, | ||
| const std::vector< Vector< Real, Dim > > & | normals, | ||
| Real | original_area, | ||
| double | curvature_weight, | ||
| double | normal_smoothing_weight, | ||
| Solver & | solver ) |
Adjust the metric based on curvature.
| r_mesh | The Riemannian mesh |
| vertices | The mesh vertices |
| normals | The mesh normals |
| original_area | The original mesh area |
| curvature_weight | The curvature weight |
| normal_smoothing_weight | The normal smoothing weight |
| solver | The solver to use |