Lagrange
Loading...
Searching...
No Matches
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
51template <typename Scalar, typename Index>
53
68template <typename Scalar, typename Index>
70
84template <typename Scalar, typename Index>
86
97template <typename Scalar, typename Index>
99{
100 return is_edge_manifold(mesh) && is_vertex_manifold(mesh);
101}
102
107{
109 std::string_view output_attribute_name = "@vertex_is_manifold";
110};
111
123template <typename Scalar, typename Index>
126 const VertexManifoldOptions& options = {});
127
129
130} // 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
bool is_closed(const SurfaceMesh< Scalar, Index > &mesh)
Check if a mesh is closed.
Definition topology.cpp:51
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:98
bool is_edge_manifold(const SurfaceMesh< Scalar, Index > &mesh)
Check if a mesh is edge-manifold.
Definition topology.cpp:125
bool is_vertex_manifold(const SurfaceMesh< Scalar, Index > &mesh)
Check if a mesh is vertex-manifold.
Definition topology.cpp:98
AttributeId compute_vertex_is_manifold(SurfaceMesh< Scalar, Index > &mesh, const VertexManifoldOptions &options={})
Compute a mesh attribute of value type uint8_t indicating vertex manifoldness.
Definition topology.cpp:142
Main namespace for Lagrange.
Option struct for computing manifold flags.
Definition topology.h:107
std::string_view output_attribute_name
Per-vertex attribute indicating whether a vertex is manifold.
Definition topology.h:109