Lagrange
Loading...
Searching...
No Matches
compute_principal_curvatures.h
1/*
2 * Copyright 2026 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/polyddg/DifferentialOperators.h>
16#include <lagrange/polyddg/api.h>
17
18#include <string_view>
19
20namespace lagrange::polyddg {
21
24
29{
31 std::string_view kappa_min_attribute = "@kappa_min";
32
34 std::string_view kappa_max_attribute = "@kappa_max";
35
37 std::string_view direction_min_attribute = "@principal_direction_min";
38
40 std::string_view direction_max_attribute = "@principal_direction_max";
41};
42
60
77template <typename Scalar, typename Index>
81 PrincipalCurvaturesOptions options = {});
82
93template <typename Scalar, typename Index>
94LA_POLYDDG_API PrincipalCurvaturesResult compute_principal_curvatures(
96 PrincipalCurvaturesOptions options = {});
97
99
100} // namespace lagrange::polyddg
A general purpose polygonal mesh class.
Definition SurfaceMesh.h:66
Polygonal mesh discrete differential operators.
Definition DifferentialOperators.h:38
uint32_t AttributeId
Identified to be used to access an attribute.
Definition AttributeFwd.h:73
constexpr AttributeId invalid_attribute_id()
Invalid attribute id.
Definition AttributeFwd.h:76
LA_POLYDDG_API PrincipalCurvaturesResult compute_principal_curvatures(SurfaceMesh< Scalar, Index > &mesh, const DifferentialOperators< Scalar, Index > &ops, PrincipalCurvaturesOptions options={})
Compute per-vertex principal curvatures and principal curvature directions.
Definition compute_principal_curvatures.cpp:35
Options for compute_principal_curvatures().
Definition compute_principal_curvatures.h:29
std::string_view kappa_max_attribute
Output attribute name for the maximum principal curvature (scalar, per vertex).
Definition compute_principal_curvatures.h:34
std::string_view kappa_min_attribute
Output attribute name for the minimum principal curvature (scalar, per vertex).
Definition compute_principal_curvatures.h:31
std::string_view direction_max_attribute
Output attribute name for the principal direction of kappa_max (3-D vector, per vertex).
Definition compute_principal_curvatures.h:40
std::string_view direction_min_attribute
Output attribute name for the principal direction of kappa_min (3-D vector, per vertex).
Definition compute_principal_curvatures.h:37
Result of compute_principal_curvatures().
Definition compute_principal_curvatures.h:47
AttributeId kappa_min_id
Attribute ID of the minimum principal curvature attribute.
Definition compute_principal_curvatures.h:49
AttributeId kappa_max_id
Attribute ID of the maximum principal curvature attribute.
Definition compute_principal_curvatures.h:52
AttributeId direction_min_id
Attribute ID of the principal direction for kappa_min.
Definition compute_principal_curvatures.h:55
AttributeId direction_max_id
Attribute ID of the principal direction for kappa_max.
Definition compute_principal_curvatures.h:58