Lagrange
Loading...
Searching...
No Matches
mesh_smoothing.h
1/*
2 * Copyright 2025 Adobe. All rights reserved.
3 * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License. You may obtain a copy
5 * of the License at http://www.apache.org/licenses/LICENSE-2.0
6 *
7 * Unless required by applicable law or agreed to in writing, software distributed under
8 * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9 * OF ANY KIND, either express or implied. See the License for the specific language
10 * governing permissions and limitations under the License.
11 */
12#pragma once
13
14#include <lagrange/SurfaceMesh.h>
15#include <lagrange/filtering/api.h>
16
17#include <string_view>
18
19namespace lagrange::filtering {
20
23
126
143template <typename Scalar, typename Index>
144LA_FILTERING_API void mesh_smoothing(
146 const SmoothingOptions& options = {});
147
149
150} // namespace lagrange::filtering
A general purpose polygonal mesh class.
Definition SurfaceMesh.h:66
LA_FILTERING_API void mesh_smoothing(SurfaceMesh< Scalar, Index > &mesh, const SmoothingOptions &options={})
Perform anisotropic mesh smoothing.
Definition mesh_smoothing.cpp:40
Option struct for anisotropic mesh smoothing.
Definition mesh_smoothing.h:28
double gradient_modulation_scale
Gradient modulation scale: Prescribes the scale factor relating the gradients of the source to those ...
Definition mesh_smoothing.h:103
FilterMethod filter_method
Type of smoothing to be performed.
Definition mesh_smoothing.h:53
double curvature_weight
The curvature/inhomogeneity weight: Specifies the extent to which total curvature should be used to c...
Definition mesh_smoothing.h:66
double normal_smoothing_weight
The normal smoothing weight: Specifies the extent to which normals should be diffused before curvatur...
Definition mesh_smoothing.h:73
double normal_projection_weight
Weight for fitting the surface to prescribed normals.
Definition mesh_smoothing.h:122
double gradient_weight
Gradient fitting weight: Specifies the importance of matching the gradient constraints (objective #2)...
Definition mesh_smoothing.h:90
FilterMethod
The type of smoothing to be performed.
Definition mesh_smoothing.h:32
@ VertexSmoothing
Directly process the vertex positions.
Definition mesh_smoothing.h:39
@ NormalSmoothing
Process the normals and then fit the vertices to the normals.
Definition mesh_smoothing.h:47