Lagrange
topology.h
1/*
2 * Copyright 2023 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
16namespace lagrange {
17
25
36template <typename Scalar, typename Index>
38
53template <typename Scalar, typename Index>
55
69template <typename Scalar, typename Index>
71
82template <typename Scalar, typename Index>
84{
85 return is_edge_manifold(mesh) && is_vertex_manifold(mesh);
86}
87
92{
94 std::string_view output_attribute_name = "@vertex_is_manifold";
95};
96
108template <typename Scalar, typename Index>
111 const VertexManifoldOptions& options = {});
112
114
115} // namespace lagrange
A general purpose polygonal mesh class.
Definition: SurfaceMesh.h:66
uint32_t AttributeId
Identified to be used to access an attribute.
Definition: AttributeFwd.h:73
int compute_euler(const SurfaceMesh< Scalar, Index > &mesh)
Compute Euler characteristic of a mesh.
Definition: topology.cpp:35
bool is_manifold(const SurfaceMesh< Scalar, Index > &mesh)
Check if a mesh is both vertex-manifold and edge-manifold.
Definition: topology.h:83
bool is_edge_manifold(const SurfaceMesh< Scalar, Index > &mesh)
Check if a mesh is edge-manifold.
Definition: topology.cpp:111
bool is_vertex_manifold(const SurfaceMesh< Scalar, Index > &mesh)
Check if a mesh is vertex-manifold.
Definition: topology.cpp:84
AttributeId compute_vertex_is_manifold(SurfaceMesh< Scalar, Index > &mesh, const VertexManifoldOptions &options={})
Compute a mesh attribute indicating vertex and edge manifoldness.
Definition: topology.cpp:128
Main namespace for Lagrange.
Definition: AABBIGL.h:30
Option struct for computing manifold flags.
Definition: topology.h:92
std::string_view output_attribute_name
Per-vertex attribute indicating whether a vertex is manifold.
Definition: topology.h:94